/// <summary>
        ///     Initializes a new instance of the InputReportEventArgs class.
        /// </summary>
        /// <param name="inputDevice">
        ///     The input device to associate this input with.
        /// </param>
        /// <param name="report">
        ///     The input report being processed.
        /// </param>
        public InputReportEventArgs(InputDevice inputDevice, 
                                    InputReport report) : base(inputDevice, ((report != null) ? report.Timestamp : -1))
        {
            if (report == null)
                throw new ArgumentNullException("report");

            _report = report;
        }
Esempio n. 2
0
        /// <summary>
        ///     Initializes a new instance of the InputReportEventArgs class.
        /// </summary>
        /// <param name="inputDevice">
        ///     The input device to associate this input with.
        /// </param>
        /// <param name="report">
        ///     The input report being processed.
        /// </param>
        public InputReportEventArgs(InputDevice inputDevice,
                                    InputReport report) : base(inputDevice, ((report != null) ? report.Timestamp : -1))
        {
            if (report == null)
            {
                throw new ArgumentNullException("report");
            }

            _report = report;
        }
Esempio n. 3
0
        /// <summary>
        ///     Reports input to the input manager.
        /// </summary>
        /// <returns>
        ///     Whether or not any event generated as a consequence of this
        ///     event was handled.
        /// </returns>
        /// <remarks>
        ///  Do we really need this?  Make the "providers" call InputManager.ProcessInput themselves.
        ///  we currently need to map back to providers for other reasons.
        /// </remarks>
        public bool ReportInput(InputReport inputReport)
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException(SR.Get(SRID.InputProviderSiteDisposed));
            }

            bool handled = false;

            InputReportEventArgs input = new InputReportEventArgs(null, inputReport);

            input.RoutedEvent = InputManager.PreviewInputReportEvent;

            if (_inputManager != null)
            {
                handled = _inputManager.Value.ProcessInput(input);
            }

            return(handled);
        }
Esempio n. 4
0
 public InputReportEventArgs(InputDevice inputDevice, InputReport report)
 {
 }
		public InputReportEventArgs (InputDevice inputDevice, InputReport report)
		{
		}
Esempio n. 6
0
        public bool ReportInput(InputReport inputReport)
        { 
            if(IsDisposed)
            { 
                throw new ObjectDisposedException(SR.Get(SRID.InputProviderSiteDisposed)); 
            }
 
            bool handled = false;

            InputReportEventArgs input = new InputReportEventArgs(null, inputReport);
            input.RoutedEvent=InputManager.PreviewInputReportEvent; 

            if(_inputManager != null) 
            { 
                handled = _inputManager.Value.ProcessInput(input);
            } 

            return handled;
        }