コード例 #1
0
 /// <summary>
 /// Check if an event is mouse event or not.
 /// </summary>
 /// <param name="deviceEvent">Device event.</param>
 /// <returns>Mouse event or not.</returns>
 public static bool IsMouseEvent(this DeviceEvent deviceEvent)
 {
     return(deviceEvent.GetDevice() == Device.Mouse);
 }
コード例 #2
0
 /// <summary>
 /// Check if an event is key event or not.
 /// </summary>
 /// <param name="deviceEvent">Device event.</param>
 /// <returns>Key event or not.</returns>
 public static bool IsKeyEvent(this DeviceEvent deviceEvent)
 {
     return(deviceEvent.GetDevice() == Device.Keyboard);
 }