protected override void HandleDataReceived(InputReport inputReport) { var report = (InputEvent)inputReport; // Fire generic data received event if (DataRecieved != null) { if (report.EventType != EventType.Unspecified) { var args = new MirrorEventReceivedArgs(report); DataRecieved(this, args); } } // Fire specific events switch (report.EventType) { case EventType.ShowTag: if (TagShown != null) TagShown(this, new TagEventArgs(report.Data)); break; case EventType.HideTag: if (TagHid != null) TagHid(this, new TagEventArgs(report.Data)); break; case EventType.OrientationDown : if( OrientationChanged != null ) OrientationChanged(this, new OrientationChangedEventArgs(Orientation.Down)); break; case EventType.OrientationUp : if( OrientationChanged != null ) OrientationChanged(this, new OrientationChangedEventArgs(Orientation.Up)); break; } }
/// <summary> /// virtual handler for any action to be taken when data is received. Override to use. /// </summary> /// <param name="inputReport">The input report that was received</param> protected virtual void HandleDataReceived(InputReport inputReport) { }