我正在使用 C# Windows CE 應用程序對 Symbol Motorola Hand Held 進行編程,我需要在按下手持設備的物理觸發器時運行代碼。我怎樣才能做到這一點?我已經嘗試將表單的按鈕指定為默認按鈕,但無法在表單的屬性中執行此操作。此外,我嘗試在 Symbol.ResourceCoordination 中使用觸發器類。 private void Form1_Load(object sender, EventArgs e) { Symbol.ResourceCoordination.Triggertrigger = new Trigger(); //trigger.Stage1Notify += new Symbol.ResourceCoordination.Trigger.TriggerEventHandler(Trigger_Stage2Notify); trigger.Stage2Notify += new Symbol.ResourceCoordination.Trigger.TriggerEventHandler(Trigger_Stage2Notify); } void Trigger_Stage2Notify(object sender, Symbol.ResourceCoordination.TriggerEventArgs e) { MessageBox.Show("Pressed trigger"); }
按下物理觸發器時如何運行代碼?
慕碼人8056858
2022-12-31 11:14:05