Example #1
0
        public MainWindow()
        {
            InitializeComponent();

            WindowExe.SetDefaultIcon(Properties.Resources.application);

            _viewModel             = new ViewModel.ViewModel();
            _viewModel.Timer.Tick += DispatcherTimer_Tick;
            DataContext            = _viewModel;

            _stopwatch = new Stopwatch();
            _stopwatch.Start();

            _mouseListener = new MouseHookListener(new GlobalHooker())
            {
                Enabled = true
            };
            _mouseListener.MouseDownExt += ActionListener;
            _mouseListener.MouseMove    += ActionListener;
            _mouseListener.MouseWheel   += ActionListener;

            _keyboardListener = new KeyboardHookListener(new GlobalHooker())
            {
                Enabled = true
            };
            _keyboardListener.KeyDown += ActionListener;

            _viewModel.LoadFromDisk();

            Stop();
        }
Example #2
0
        public MainWindow()
        {
            InitializeComponent();
            _viewModel             = new ViewModel.ViewModel();
            _viewModel.Timer.Tick += DispatcherTimer_Tick;
            DataContext            = _viewModel;

            _stopwatch = new Stopwatch();
            _stopwatch.Start();

            _mouseListener = new MouseHookListener(new GlobalHooker())
            {
                Enabled = true
            };
            _mouseListener.MouseDownExt += ActionListener;
            _mouseListener.MouseMove    += ActionListener;
            _mouseListener.MouseWheel   += ActionListener;

            _keyboardListener = new KeyboardHookListener(new GlobalHooker())
            {
                Enabled = true
            };
            _keyboardListener.KeyDown += ActionListener;
        }