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
- BasicCellRelation.cs
- SerializationSectionGroup.cs
- SymDocumentType.cs
- FrameAutomationPeer.cs
- StylusButton.cs
- MessageEventSubscriptionService.cs
- SizeChangedInfo.cs
- ExistsInCollection.cs
- UpdateCompiler.cs
- BindingContext.cs
- StyleModeStack.cs
- TemplateKeyConverter.cs
- PlanCompiler.cs
- SizeChangedInfo.cs
- TimeSpanMinutesConverter.cs
- FixedPage.cs
- RootBrowserWindow.cs
- RemoteWebConfigurationHostServer.cs
- XamlToRtfWriter.cs
- _ProxyRegBlob.cs
- TaskFileService.cs
- ObjectItemAssemblyLoader.cs
- EntityContainer.cs
- METAHEADER.cs
- SignalGate.cs
- MetabaseReader.cs
- XhtmlBasicValidatorAdapter.cs
- ObjectDataSourceEventArgs.cs
- CssStyleCollection.cs
- OverflowException.cs
- ManagementPath.cs
- FeedUtils.cs
- CompositeActivityValidator.cs
- QueryComponents.cs
- BamlBinaryReader.cs
- HiddenFieldPageStatePersister.cs
- AbandonedMutexException.cs
- SqlError.cs
- DockingAttribute.cs
- ScaleTransform.cs
- ParserStreamGeometryContext.cs
- MethodAccessException.cs
- X509SecurityTokenParameters.cs
- CardSpaceShim.cs
- PagesSection.cs
- ProgressiveCrcCalculatingStream.cs
- DbDataSourceEnumerator.cs
- SiteMapHierarchicalDataSourceView.cs
- ChineseLunisolarCalendar.cs
- SpStreamWrapper.cs
- CharacterBuffer.cs
- CodeAttributeDeclaration.cs
- StaticFileHandler.cs
- DbMetaDataCollectionNames.cs
- XamlStyleSerializer.cs
- WindowsFormsSynchronizationContext.cs
- ToolStripArrowRenderEventArgs.cs
- PersianCalendar.cs
- RewritingValidator.cs
- WeakReference.cs
- HMAC.cs
- ComplexLine.cs
- ActivityTypeDesigner.xaml.cs
- DetailsViewRow.cs
- DataPagerFieldItem.cs
- Underline.cs
- DomainConstraint.cs
- DesignerDataSchemaClass.cs
- SortableBindingList.cs
- ChangeConflicts.cs
- SubMenuStyle.cs
- AttachedAnnotationChangedEventArgs.cs
- AsyncMethodInvoker.cs
- AddressUtility.cs
- TdsParserStaticMethods.cs
- Base64Encoder.cs
- PkcsMisc.cs
- QuotedPrintableStream.cs
- WorkflowInstance.cs
- MultilineStringConverter.cs
- EntityClientCacheEntry.cs
- CodeMethodReturnStatement.cs
- RC2.cs
- Stream.cs
- PageTextBox.cs
- xmlglyphRunInfo.cs
- QilTargetType.cs
- MarkupCompilePass2.cs
- Int64KeyFrameCollection.cs
- ConfigurationManagerHelper.cs
- CodeSnippetTypeMember.cs
- DynamicMetaObjectBinder.cs
- MetadataItemCollectionFactory.cs
- ReadOnlyPropertyMetadata.cs
- ReadOnlyCollection.cs
- SerialReceived.cs
- DateTimeValueSerializerContext.cs
- CompensationToken.cs
- _NetRes.cs
- Button.cs