// starts user input polling public void Start() { lock (timerLock) { initialInfo.Update(); actualInfo = (InputInfo)initialInfo.Clone(); timer.Start(); } }
public InputTracker(EventHandler<InputChangedEventArgs> changed) { var handler = changed; if (handler != null) Changed += handler; disposed = false; timerLock = new object(); timer = new Timer { AutoReset = true, Enabled = false }; timer.Elapsed += timer_Elapsed; initialInfo = InputInfo.Create(); actualInfo = (InputInfo)initialInfo.Clone(); }
public InputTracker(EventHandler <InputChangedEventArgs> changed) { var handler = changed; if (handler != null) { Changed += handler; } disposed = false; timerLock = new object(); timer = new Timer { AutoReset = true, Enabled = false }; timer.Elapsed += timer_Elapsed; initialInfo = InputInfo.Create(); actualInfo = (InputInfo)initialInfo.Clone(); }