예제 #1
0
        public void Start()
        {
            timer           = new Timer(1000);
            timer.AutoReset = false;
            timer.Elapsed  += OnElapsed;

            handler.KeyDown += OnKeyDown;
            handler.Start();
            handler.Wait();
        }
예제 #2
0
        public override void Run()
        {
            var listener = new ConsoleInputHandler();

            listener.MouseMoved         += OnMouseMoved;
            listener.MouseDoubleClicked += OnMouseDoubleClicked;
            listener.MouseWheelChanged  += OnMouseWheelChanged;
            listener.KeyDown            += OnKeyDown;
            listener.Start();
            listener.Wait();
        }