Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Input / InputEventArgs.cs / 1 / 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
- IPAddress.cs
- RectAnimationBase.cs
- PriorityRange.cs
- XmlFormatWriterGenerator.cs
- OLEDB_Enum.cs
- JumpItem.cs
- SystemIPv6InterfaceProperties.cs
- OleDbError.cs
- RootBrowserWindow.cs
- formatter.cs
- DesignTimeVisibleAttribute.cs
- CapabilitiesUse.cs
- TypeReference.cs
- DocumentOrderComparer.cs
- TableRowGroup.cs
- MessageBox.cs
- HashRepartitionEnumerator.cs
- RuntimeVariableList.cs
- RestHandlerFactory.cs
- UInt32Storage.cs
- KeyFrames.cs
- FileVersionInfo.cs
- TextEditorThreadLocalStore.cs
- ActivityMarkupSerializer.cs
- BindingsSection.cs
- PerfCounters.cs
- SystemPens.cs
- HeaderedItemsControl.cs
- AnnotationResource.cs
- KeyValuePairs.cs
- PeerPresenceInfo.cs
- DefaultValueTypeConverter.cs
- Funcletizer.cs
- DbProviderFactory.cs
- HttpWebRequestElement.cs
- MenuScrollingVisibilityConverter.cs
- DecimalConstantAttribute.cs
- HwndTarget.cs
- IPAddressCollection.cs
- NoPersistProperty.cs
- AttributeCollection.cs
- HwndProxyElementProvider.cs
- FontInfo.cs
- SID.cs
- Cloud.cs
- TextFindEngine.cs
- PenThread.cs
- IdentityModelDictionary.cs
- SimpleType.cs
- PrePostDescendentsWalker.cs
- WebHostUnsafeNativeMethods.cs
- StateDesigner.Helpers.cs
- StylusDownEventArgs.cs
- ProfileGroupSettings.cs
- CustomCredentialPolicy.cs
- FixedElement.cs
- SystemThemeKey.cs
- Menu.cs
- PageAsyncTask.cs
- LineServices.cs
- OleStrCAMarshaler.cs
- NameValuePair.cs
- UnaryQueryOperator.cs
- DataFormats.cs
- HostedElements.cs
- DataGridRowEventArgs.cs
- PlacementWorkspace.cs
- DesignerValidatorAdapter.cs
- RequestCachingSection.cs
- EntityDataSourceState.cs
- CompositeControl.cs
- StreamGeometry.cs
- TreeNodeCollectionEditor.cs
- ToolStripSystemRenderer.cs
- PrivilegedConfigurationManager.cs
- Pen.cs
- URIFormatException.cs
- AmbientProperties.cs
- ValidationSummary.cs
- ViewCellRelation.cs
- PrivilegedConfigurationManager.cs
- Interlocked.cs
- PropertyStore.cs
- TreeIterator.cs
- StylusPointPropertyId.cs
- DataGridTable.cs
- ArgumentNullException.cs
- DockPanel.cs
- HostSecurityManager.cs
- GridViewCancelEditEventArgs.cs
- XmlSchemaDatatype.cs
- WindowsMenu.cs
- TransformGroup.cs
- Error.cs
- SqlInfoMessageEvent.cs
- AppDomainManager.cs
- SoapReflector.cs
- XXXOnTypeBuilderInstantiation.cs
- CorrelationActionMessageFilter.cs
- UDPClient.cs