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
- ServicePointManager.cs
- StorageMappingFragment.cs
- SplitterCancelEvent.cs
- TemplateBamlRecordReader.cs
- InvokeGenerator.cs
- Focus.cs
- RectangleConverter.cs
- ProfileServiceManager.cs
- SimpleMailWebEventProvider.cs
- ReadOnlyDictionary.cs
- CodeMemberMethod.cs
- DisplayMemberTemplateSelector.cs
- ConfigurationSectionCollection.cs
- OutputWindow.cs
- exports.cs
- OleDbParameterCollection.cs
- SqlDataSourceView.cs
- StateChangeEvent.cs
- HierarchicalDataSourceControl.cs
- XmlDictionaryReaderQuotas.cs
- Pkcs9Attribute.cs
- XslVisitor.cs
- RadialGradientBrush.cs
- DateTimeFormat.cs
- SystemFonts.cs
- GeneratedView.cs
- DBSqlParserColumnCollection.cs
- MobileUITypeEditor.cs
- CalendarModeChangedEventArgs.cs
- CultureMapper.cs
- FormsAuthenticationCredentials.cs
- DataPagerFieldItem.cs
- DrawingCollection.cs
- ResourceProviderFactory.cs
- cookiecollection.cs
- unitconverter.cs
- DataGridRowClipboardEventArgs.cs
- MbpInfo.cs
- TabletDeviceInfo.cs
- PathFigureCollectionValueSerializer.cs
- CircleHotSpot.cs
- LinearGradientBrush.cs
- SourceChangedEventArgs.cs
- WebBrowserBase.cs
- HMAC.cs
- XamlTemplateSerializer.cs
- WindowsUpDown.cs
- Paragraph.cs
- SelectionItemProviderWrapper.cs
- XmlSerializationGeneratedCode.cs
- PersonalizablePropertyEntry.cs
- CurrentChangedEventManager.cs
- HexParser.cs
- TemplateBaseAction.cs
- SqlServices.cs
- ProvideValueServiceProvider.cs
- PrintPreviewControl.cs
- CompilerTypeWithParams.cs
- MaterialGroup.cs
- XmlLoader.cs
- PixelFormatConverter.cs
- RoleGroup.cs
- Rectangle.cs
- WinFormsComponentEditor.cs
- FunctionNode.cs
- EventListener.cs
- DocumentPageViewAutomationPeer.cs
- CallbackHandler.cs
- Inflater.cs
- EntityCollectionChangedParams.cs
- PolicyException.cs
- Rotation3DAnimationUsingKeyFrames.cs
- NoClickablePointException.cs
- PropertyChangedEventManager.cs
- SortedDictionary.cs
- CodeMemberProperty.cs
- FixedHyperLink.cs
- ChildChangedEventArgs.cs
- MessageFormatterConverter.cs
- versioninfo.cs
- CodeAttributeArgument.cs
- SqlDataAdapter.cs
- TransactionWaitAsyncResult.cs
- PersonalizableAttribute.cs
- AssemblyCollection.cs
- TreeViewAutomationPeer.cs
- EmptyCollection.cs
- RepeatButton.cs
- PathGeometry.cs
- HostedElements.cs
- MessageDescriptionCollection.cs
- ButtonField.cs
- CatalogPart.cs
- KnownTypes.cs
- MediaContextNotificationWindow.cs
- XmlTextAttribute.cs
- XmlSerializerAssemblyAttribute.cs
- DockPatternIdentifiers.cs
- PeerTransportListenAddressConverter.cs
- HostedTcpTransportManager.cs