Пример #1
0
        public MainWindow()
        {
            InitializeComponent();


            keyboard = new KeyboardInput();

            keyboard.KeyBoardKeyPressed += keyboard_KeyBoardKeyPressed;

            savedKey = keyboard.GetKey();

            mouse             = new MouseInput();
            mouse.MouseMoved += mouse_MouseMoved;

            lastInput      = new AllInputSources();
            timer          = new DispatcherTimer();
            timer.Interval = new TimeSpan();
            timer.Interval = new TimeSpan(0, 0, 0, 0, 100);
            timer.Tick    += timer_Tick;
            timer.Start();
        }
Пример #2
0
 void keyboard_KeyBoardKeyPressed(object sender, EventArgs e)
 {
     keyboardTime.Content = FormatDateTime(DateTime.Now);
     savedKey             = keyboard.GetKey();
     mouse.savedKey       = savedKey;
 }