void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e) { if (e.KeyCode == CSLibrary.Notification.Key.BUTTON) { if (e.KeyDown) { _keyPressStartTime = DateTime.Now; } else { double duration = (DateTime.Now - _keyPressStartTime).TotalMilliseconds; for (int cnt = 0; cnt < BleMvxApplication._config.RFID_Shortcut.Length; cnt++) { if (duration >= BleMvxApplication._config.RFID_Shortcut[cnt].DurationMin && duration <= BleMvxApplication._config.RFID_Shortcut[cnt].DurationMax) { switch (BleMvxApplication._config.RFID_Shortcut[cnt].Function) { case CONFIG.MAINMENUSHORTCUT.FUNCTION.INVENTORY: BleMvxApplication._inventoryEntryPoint = 0; OnInventoryButtonClicked(); break; case CONFIG.MAINMENUSHORTCUT.FUNCTION.BARCODE: BleMvxApplication._inventoryEntryPoint = 1; OnInventoryButtonClicked(); break; } break; } } } } }
void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e) { Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { if (e.KeyCode == CSLibrary.Notification.Key.BUTTON) { if (e.KeyDown) { if (switchRFID.IsOn) { firstTime = true; RFIDInventoryOn(); } if (switchBarcode.IsOn) { BarcodeScanningOn(); } } else { RFIDInventoryOff(); barcodescanning = false; BarcodeScanningOff(); } } }); }
void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e) { if (e.KeyCode == CSLibrary.Notification.Key.BUTTON) { if (e.KeyDown) { StartInventory(); } else { StopInventory(); } } }
void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e) { Page currentPage; if (!CheckPageActive()) { return; } if (e.KeyCode == CSLibrary.Notification.Key.BUTTON) { if (e.KeyDown) { StartGeiger(); } else { StopGeiger(); } } }
void HotKeys_OnKeyEvent(object sender, CSLibrary.Notification.HotKeyEventArgs e) { Page currentPage; Trace.Message("Receive Key Event"); if (e.KeyCode == CSLibrary.Notification.Key.BUTTON) { if (e.KeyDown) { if (!_InventoryScanning) { StartInventory(); } } else { StopInventory(); } } }