public bool ReportInput(InputDevice device, InputReport inputReport) { if (this._isDisposed) { throw new InvalidOperationException(); } bool flag = false; InputReportEventArgs input = new InputReportEventArgs(device, inputReport) { RoutedEvent = GHIElectronics.TinyCLR.UI.Input.InputManager.PreviewInputReportEvent }; if (this._inputManager != null) { flag = this._inputManager.ProcessInput(input); } return(flag); }
/// <summary> /// Reports input to the input manager. /// </summary> /// <returns> /// Whether or not any event generated as a consequence of this /// event was handled. /// </returns> // do we really need this? Make the "providers" call InputManager.ProcessInput themselves. // we currently need to map back to providers for other reasons. public bool ReportInput(InputDevice device, InputReport inputReport) { if (this._isDisposed) { throw new InvalidOperationException(); } var handled = false; var input = new InputReportEventArgs(device, inputReport) { RoutedEvent = InputManager.PreviewInputReportEvent }; if (this._inputManager != null) { handled = this._inputManager.ProcessInput(input); } return(handled); }
public InputReportArgs(object dev, object report) { this.Device = (InputDevice)dev; this.Report = (InputReport)report; }
public InputReportEventArgs(InputDevice inputDevice, InputReport report) : base(inputDevice, (report != null) ? report.Timestamp : DateTime.MinValue) { this.Report = report ?? throw new ArgumentNullException("report"); }