public ActionController() { this.processController = new ProcessController(); this.commandController = new CommandController(); var keyboardList = new Dictionary <int, KeyboardInput>(1); KeyboardInput ki = new KeyboardInput(IntPtr.Zero); ki.KeyBoardKeyPressed += this.Keyboard_KeyBoardKeyPressed; keyboardList.Add(0, ki); this.keyboards = keyboardList; this.commandController.MessageAction += this.CommandController_MessageAction; }
public MainWindow() { InitializeComponent(); keyboard = new KeyboardInput(); keyboard.KeyBoardKeyPressed += keyboard_KeyBoardKeyPressed; 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(); }