Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / InputEventArgs.cs / 1305600 / InputEventArgs.cs
using System.Collections; using System; using System.Security; using MS.Internal.PresentationCore; // for FriendAccessAllowed namespace System.Windows.Input { ////// The InputEventArgs class represents a type of RoutedEventArgs that /// are relevant to all input events. /// [FriendAccessAllowed ] // expose UserInitiated public class InputEventArgs : RoutedEventArgs { ////// Initializes a new instance of the InputEventArgs class. /// /// /// The input device to associate with this event. /// /// /// The time when the input occured. /// public InputEventArgs(InputDevice inputDevice, int timestamp) { /* inputDevice parameter being null is valid*/ /* timestamp parameter is valuetype, need not be checked */ _inputDevice = inputDevice; _timestamp = timestamp; } ////// Read-only access to the input device that initiated this /// event. /// public InputDevice Device { get {return _inputDevice;} internal set {_inputDevice = value;} } ////// Read-only access to the input timestamp. /// public int Timestamp { get {return _timestamp;} } ////// The mechanism used to call the type-specific handler on the /// target. /// /// /// The generic handler to call in a type-specific way. /// /// /// The target to call the handler on. /// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { InputEventHandler handler = (InputEventHandler) genericHandler; handler(genericTarget, this); } private InputDevice _inputDevice; private static int _timestamp; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System.Collections; using System; using System.Security; using MS.Internal.PresentationCore; // for FriendAccessAllowed namespace System.Windows.Input { ////// The InputEventArgs class represents a type of RoutedEventArgs that /// are relevant to all input events. /// [FriendAccessAllowed ] // expose UserInitiated public class InputEventArgs : RoutedEventArgs { ////// Initializes a new instance of the InputEventArgs class. /// /// /// The input device to associate with this event. /// /// /// The time when the input occured. /// public InputEventArgs(InputDevice inputDevice, int timestamp) { /* inputDevice parameter being null is valid*/ /* timestamp parameter is valuetype, need not be checked */ _inputDevice = inputDevice; _timestamp = timestamp; } ////// Read-only access to the input device that initiated this /// event. /// public InputDevice Device { get {return _inputDevice;} internal set {_inputDevice = value;} } ////// Read-only access to the input timestamp. /// public int Timestamp { get {return _timestamp;} } ////// The mechanism used to call the type-specific handler on the /// target. /// /// /// The generic handler to call in a type-specific way. /// /// /// The target to call the handler on. /// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { InputEventHandler handler = (InputEventHandler) genericHandler; handler(genericTarget, this); } private InputDevice _inputDevice; private static int _timestamp; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AsymmetricKeyExchangeDeformatter.cs
- HttpRequestTraceRecord.cs
- XmlSchemaProviderAttribute.cs
- ListBindingHelper.cs
- CompilationUtil.cs
- CngKeyCreationParameters.cs
- DateTimeFormat.cs
- SchemaDeclBase.cs
- CacheModeValueSerializer.cs
- EventProviderClassic.cs
- PropertyEntry.cs
- TraceXPathNavigator.cs
- AutomationPropertyInfo.cs
- MenuItemStyle.cs
- SpellerError.cs
- TabPanel.cs
- Currency.cs
- EntitySqlQueryCacheKey.cs
- Drawing.cs
- MarginsConverter.cs
- HtmlValidatorAdapter.cs
- DynamicMethod.cs
- ReadOnlyDictionary.cs
- GridSplitterAutomationPeer.cs
- BamlLocalizableResource.cs
- HtmlUtf8RawTextWriter.cs
- FontStretches.cs
- GroupItemAutomationPeer.cs
- ExecutionContext.cs
- ColorTransformHelper.cs
- TypeSystem.cs
- RTLAwareMessageBox.cs
- DetailsViewUpdatedEventArgs.cs
- SoapAttributes.cs
- SimplePropertyEntry.cs
- DataGridViewCellStyleConverter.cs
- Types.cs
- CalendarDateChangedEventArgs.cs
- StylusButton.cs
- WeakReadOnlyCollection.cs
- WindowsMenu.cs
- PropertyChangingEventArgs.cs
- GiveFeedbackEvent.cs
- Timer.cs
- CompositeCollectionView.cs
- DataAdapter.cs
- RegisteredHiddenField.cs
- CompensationDesigner.cs
- CounterSample.cs
- MobileControlsSection.cs
- XmlUtf8RawTextWriter.cs
- ApplicationSettingsBase.cs
- ReadWriteObjectLock.cs
- LicenseManager.cs
- XPathAncestorIterator.cs
- ListBoxAutomationPeer.cs
- MsmqTransportElement.cs
- UrlMapping.cs
- AddInSegmentDirectoryNotFoundException.cs
- ObjectHelper.cs
- AsyncDataRequest.cs
- MessageUtil.cs
- DateTime.cs
- PageAdapter.cs
- AutomationProperties.cs
- XmlSerializerAssemblyAttribute.cs
- ClientCultureInfo.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- DeviceSpecificDesigner.cs
- InternalTypeHelper.cs
- MulticastNotSupportedException.cs
- CreateUserWizard.cs
- ClientScriptManager.cs
- FramingFormat.cs
- BinaryObjectInfo.cs
- SerializationStore.cs
- DataGridViewColumnTypePicker.cs
- ItemChangedEventArgs.cs
- SamlNameIdentifierClaimResource.cs
- RuleSettings.cs
- TagPrefixAttribute.cs
- TraceData.cs
- ReaderWriterLockWrapper.cs
- XmlQueryRuntime.cs
- GenericEnumerator.cs
- Schema.cs
- RegistryExceptionHelper.cs
- ListItemViewAttribute.cs
- EntityCommandExecutionException.cs
- FrameworkElementFactoryMarkupObject.cs
- PasswordPropertyTextAttribute.cs
- SchemaImporterExtension.cs
- StackBuilderSink.cs
- X509ScopedServiceCertificateElementCollection.cs
- InternalRelationshipCollection.cs
- AssemblyCollection.cs
- Convert.cs
- ClientSession.cs
- GridLengthConverter.cs
- DocumentApplicationDocumentViewer.cs