Esempio n. 1
0
 // starts user input polling
 public void Start()
 {
     lock (timerLock)
     {
         initialInfo.Update();
         actualInfo = (InputInfo)initialInfo.Clone();
         timer.Start();
     }
 }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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();
        }