public void Start() { timer = new Timer(1000); timer.AutoReset = false; timer.Elapsed += OnElapsed; handler.KeyDown += OnKeyDown; handler.Start(); handler.Wait(); }
public override void Run() { var listener = new ConsoleInputHandler(); listener.MouseMoved += OnMouseMoved; listener.MouseDoubleClicked += OnMouseDoubleClicked; listener.MouseWheelChanged += OnMouseWheelChanged; listener.KeyDown += OnKeyDown; listener.Start(); listener.Wait(); }