Provides an asyncronous Input Event system that can be used to monitor Keyboard and Mouse events.
Inheritance: MessageHook
Beispiel #1
0
 public InputManager(IntPtr handle)
 {
     m_WndProc = new WndProc(handle);
     m_WndProc.MouseWheel += OnMouseWheel;
     m_WndProc.MouseMove += OnMouseMove;
     m_WndProc.MouseUp += OnMouseUp;
     m_WndProc.MouseDown += OnMouseDown;
     m_WndProc.KeyDown += OnKeyDown;
     m_WndProc.KeyUp += OnKeyUp;
     m_WndProc.KeyChar += OnKeyChar;
 }
Beispiel #2
0
 public void Dispose()
 {
     m_WndProc.MouseWheel -= OnMouseWheel;
     m_WndProc.MouseMove -= OnMouseMove;
     m_WndProc.MouseUp -= OnMouseUp;
     m_WndProc.MouseDown -= OnMouseDown;
     m_WndProc.KeyDown -= OnKeyDown;
     m_WndProc.KeyUp -= OnKeyUp;
     m_WndProc.KeyChar -= OnKeyChar;
     m_WndProc.Dispose();
     m_WndProc = null;
 }