private void Awake() { DeviceChangeDetector = new DeviceChangeDetector(); DeviceChangeDetector.OnDeviceChanged += DeviceChangeDetector_OnDeviceChanged; Controller = new MAJIKAInput(); CurrentActiveDeviceType = DeviceClass.TouchScreen; }
public HITAGReader(string devicePattern = "assaabloy") { _devicePattern = devicePattern; Application.Current.Exit += Current_Exit; _checkKeyDownTimer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(1000) }; _checkKeyDownTimer.Tick += (sender, args) => { _checkKeyDownTimer.Stop(); IsKeyDown = false; }; context = TaskScheduler.FromCurrentSynchronizationContext(); changeDetector = new DeviceChangeDetector(); changeDetector.SomethingChanged += SomeDeviceChanged; changeDetector.Init(Application.Current.MainWindow); }