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
- XXXOnTypeBuilderInstantiation.cs
- HMACSHA512.cs
- MetaColumn.cs
- DocumentPageView.cs
- FilterableAttribute.cs
- ThrowHelper.cs
- _RequestLifetimeSetter.cs
- ShutDownListener.cs
- TextUtf8RawTextWriter.cs
- EngineSite.cs
- DrawToolTipEventArgs.cs
- SqlUdtInfo.cs
- ReferenceEqualityComparer.cs
- DependentList.cs
- ValueSerializer.cs
- ControlPropertyNameConverter.cs
- Soap12ProtocolImporter.cs
- XPathScanner.cs
- ApplicationProxyInternal.cs
- QueryExecutionOption.cs
- TypeConverterHelper.cs
- ComEventsSink.cs
- SafeNativeMethods.cs
- SafeRegistryHandle.cs
- MarginsConverter.cs
- DataGridViewRowHeaderCell.cs
- PinnedBufferMemoryStream.cs
- InvalidProgramException.cs
- MeasureItemEvent.cs
- GlyphsSerializer.cs
- RouteUrlExpressionBuilder.cs
- MenuItem.cs
- PropertyTabAttribute.cs
- DesignerView.Commands.cs
- ChannelCacheDefaults.cs
- TrackingRecord.cs
- WebServiceTypeData.cs
- HwndAppCommandInputProvider.cs
- FileDataSource.cs
- WebPartConnectionsCloseVerb.cs
- SortDescription.cs
- ContextMenuStripGroupCollection.cs
- ProcessThreadCollection.cs
- Section.cs
- WorkflowDefinitionDispenser.cs
- SqlMethodTransformer.cs
- InteropAutomationProvider.cs
- WebReferenceCollection.cs
- MultiAsyncResult.cs
- ManagementScope.cs
- TextServicesCompartmentEventSink.cs
- ImageListDesigner.cs
- HtmlTitle.cs
- TextCollapsingProperties.cs
- ListViewInsertionMark.cs
- CodeDelegateInvokeExpression.cs
- RequestCachePolicy.cs
- CapacityStreamGeometryContext.cs
- ControlPaint.cs
- TypeForwardedToAttribute.cs
- TextDecoration.cs
- NumericExpr.cs
- ParamArrayAttribute.cs
- XamlRtfConverter.cs
- CompositeCollectionView.cs
- TypeExtensionSerializer.cs
- SecondaryIndexDefinition.cs
- Avt.cs
- Input.cs
- MenuCommandsChangedEventArgs.cs
- ListViewGroupConverter.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- AstTree.cs
- WindowVisualStateTracker.cs
- TextBlockAutomationPeer.cs
- TextBoxDesigner.cs
- BinaryFormatter.cs
- DrawingImage.cs
- JsonWriterDelegator.cs
- Number.cs
- HandledEventArgs.cs
- PeerNameRecord.cs
- __FastResourceComparer.cs
- FixedFindEngine.cs
- BooleanProjectedSlot.cs
- Menu.cs
- PrintingPermissionAttribute.cs
- smtpconnection.cs
- CharEnumerator.cs
- PreProcessor.cs
- NullableIntAverageAggregationOperator.cs
- WebPartManagerDesigner.cs
- CompiledXpathExpr.cs
- ProviderConnectionPointCollection.cs
- CustomWebEventKey.cs
- CompoundFileStorageReference.cs
- Site.cs
- DetailsViewUpdatedEventArgs.cs
- TextSelectionHighlightLayer.cs
- DataStreams.cs