Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusSystemGestureEventArgs.cs / 1305600 / StylusSystemGestureEventArgs.cs
using System; using System.Collections; using System.ComponentModel; using System.Windows.Media; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// The StylusSystemGestureEventArgs class provides access to the logical /// Stylus device for all derived event args. /// public class StylusSystemGestureEventArgs : StylusEventArgs { ///////////////////////////////////////////////////////////////////// ////// Initializes a new instance of the StylusSystemGestureEventArgs class. /// /// /// The logical Stylus device associated with this event. /// /// /// The time when the input occured. /// /// /// The type of system gesture. /// public StylusSystemGestureEventArgs( StylusDevice stylusDevice, int timestamp, SystemGesture systemGesture) : base(stylusDevice, timestamp) { if (!RawStylusSystemGestureInputReport.IsValidSystemGesture(systemGesture, false, false)) { throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, "systemGesture")); } _id = systemGesture; } ///////////////////////////////////////////////////////////////////// ////// Initializes a new instance of the StylusSystemGestureEventArgs class. /// /// /// The logical Stylus device associated with this event. /// /// /// The time when the input occured. /// /// /// The type of system gesture. /// /// /// The X location reported with this system gesture. In tablet /// device coordinates. /// /// /// The Y location reported with this system gesture. In tablet /// device coordinates. /// /// /// The button state at the time of the system gesture. /// Note: A flick gesture will pass the flick data in the parameter. /// internal StylusSystemGestureEventArgs( StylusDevice stylusDevice, int timestamp, SystemGesture systemGesture, int gestureX, int gestureY, int buttonState) : base(stylusDevice, timestamp) { if (!RawStylusSystemGestureInputReport.IsValidSystemGesture(systemGesture, true, false)) { throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, "systemGesture")); } _id = systemGesture; _buttonState = buttonState; _gestureX = gestureX; _gestureY = gestureY; } ///////////////////////////////////////////////////////////////////// ////// Field to retrieve which gesture occurred. /// public SystemGesture SystemGesture { get { return _id; } } ///////////////////////////////////////////////////////////////////// ////// Field to retrieve the button state reported with this /// system gesture. /// /// NOTE: For a Flick gesture this param contains the flick /// and not the button state. /// internal int ButtonState { get { return _buttonState; } } ///////////////////////////////////////////////////////////////////// ////// Field to retrieve the X location of the system gesture. /// This is in tablet device coordinates. /// internal int GestureX { get { return _gestureX; } } ///////////////////////////////////////////////////////////////////// ////// Field to retrieve the Y location of the system gesture. /// This is in tablet device coordinates. /// internal int GestureY { get { return _gestureY; } } ///////////////////////////////////////////////////////////////////// ////// 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) { StylusSystemGestureEventHandler handler = (StylusSystemGestureEventHandler) genericHandler; handler(genericTarget, this); } ///////////////////////////////////////////////////////////////////// SystemGesture _id; int _buttonState; int _gestureX; int _gestureY; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections; using System.ComponentModel; using System.Windows.Media; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// The StylusSystemGestureEventArgs class provides access to the logical /// Stylus device for all derived event args. /// public class StylusSystemGestureEventArgs : StylusEventArgs { ///////////////////////////////////////////////////////////////////// ////// Initializes a new instance of the StylusSystemGestureEventArgs class. /// /// /// The logical Stylus device associated with this event. /// /// /// The time when the input occured. /// /// /// The type of system gesture. /// public StylusSystemGestureEventArgs( StylusDevice stylusDevice, int timestamp, SystemGesture systemGesture) : base(stylusDevice, timestamp) { if (!RawStylusSystemGestureInputReport.IsValidSystemGesture(systemGesture, false, false)) { throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, "systemGesture")); } _id = systemGesture; } ///////////////////////////////////////////////////////////////////// ////// Initializes a new instance of the StylusSystemGestureEventArgs class. /// /// /// The logical Stylus device associated with this event. /// /// /// The time when the input occured. /// /// /// The type of system gesture. /// /// /// The X location reported with this system gesture. In tablet /// device coordinates. /// /// /// The Y location reported with this system gesture. In tablet /// device coordinates. /// /// /// The button state at the time of the system gesture. /// Note: A flick gesture will pass the flick data in the parameter. /// internal StylusSystemGestureEventArgs( StylusDevice stylusDevice, int timestamp, SystemGesture systemGesture, int gestureX, int gestureY, int buttonState) : base(stylusDevice, timestamp) { if (!RawStylusSystemGestureInputReport.IsValidSystemGesture(systemGesture, true, false)) { throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, "systemGesture")); } _id = systemGesture; _buttonState = buttonState; _gestureX = gestureX; _gestureY = gestureY; } ///////////////////////////////////////////////////////////////////// ////// Field to retrieve which gesture occurred. /// public SystemGesture SystemGesture { get { return _id; } } ///////////////////////////////////////////////////////////////////// ////// Field to retrieve the button state reported with this /// system gesture. /// /// NOTE: For a Flick gesture this param contains the flick /// and not the button state. /// internal int ButtonState { get { return _buttonState; } } ///////////////////////////////////////////////////////////////////// ////// Field to retrieve the X location of the system gesture. /// This is in tablet device coordinates. /// internal int GestureX { get { return _gestureX; } } ///////////////////////////////////////////////////////////////////// ////// Field to retrieve the Y location of the system gesture. /// This is in tablet device coordinates. /// internal int GestureY { get { return _gestureY; } } ///////////////////////////////////////////////////////////////////// ////// 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) { StylusSystemGestureEventHandler handler = (StylusSystemGestureEventHandler) genericHandler; handler(genericTarget, this); } ///////////////////////////////////////////////////////////////////// SystemGesture _id; int _buttonState; int _gestureX; int _gestureY; } } // 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
- ExitEventArgs.cs
- SemaphoreSecurity.cs
- ADRoleFactoryConfiguration.cs
- AppDomainShutdownMonitor.cs
- CompilerTypeWithParams.cs
- DataViewListener.cs
- ExtendedProperty.cs
- TypeConverterAttribute.cs
- UnmanagedMemoryStream.cs
- JavaScriptString.cs
- designeractionbehavior.cs
- HtmlInputCheckBox.cs
- HttpHandlerActionCollection.cs
- RouteItem.cs
- TextParagraphView.cs
- SplashScreen.cs
- TraceXPathNavigator.cs
- FixedTextView.cs
- FamilyMap.cs
- TranslateTransform.cs
- TreeViewItem.cs
- MultipartContentParser.cs
- RemoveFromCollection.cs
- ProfileGroupSettingsCollection.cs
- ParserContext.cs
- TableLayoutSettingsTypeConverter.cs
- JulianCalendar.cs
- WorkflowInstanceProxy.cs
- QueueNameHelper.cs
- ThreadLocal.cs
- TemplateComponentConnector.cs
- CodeDirectionExpression.cs
- BrowserCapabilitiesCompiler.cs
- Attributes.cs
- CreateRefExpr.cs
- Translator.cs
- UnsafeNativeMethods.cs
- DiagnosticsConfigurationHandler.cs
- MultipleViewPattern.cs
- SerializationStore.cs
- AnnotationComponentManager.cs
- CategoryState.cs
- QilTernary.cs
- XmlWriterTraceListener.cs
- Splitter.cs
- InternalControlCollection.cs
- SchemaManager.cs
- ContentElementAutomationPeer.cs
- DesignConnectionCollection.cs
- URIFormatException.cs
- BindingManagerDataErrorEventArgs.cs
- Axis.cs
- UnmanagedMemoryAccessor.cs
- CompilerInfo.cs
- DataGridTextBox.cs
- ClusterSafeNativeMethods.cs
- EntityDesignerUtils.cs
- SystemPens.cs
- EntityContainer.cs
- CodeIdentifier.cs
- HMACSHA384.cs
- QilXmlWriter.cs
- FixedSOMFixedBlock.cs
- ParseNumbers.cs
- IsolatedStorageFilePermission.cs
- ListViewSelectEventArgs.cs
- ScrollProviderWrapper.cs
- TextSelection.cs
- AxisAngleRotation3D.cs
- assertwrapper.cs
- AttachedPropertyMethodSelector.cs
- AdjustableArrowCap.cs
- EdmSchemaAttribute.cs
- XmlWriterTraceListener.cs
- XmlHierarchicalDataSourceView.cs
- EntityDataSourceMemberPath.cs
- VScrollBar.cs
- ToolStripScrollButton.cs
- Expressions.cs
- IsolatedStorageFile.cs
- UndoEngine.cs
- StorageAssociationSetMapping.cs
- RegexInterpreter.cs
- TdsValueSetter.cs
- Context.cs
- TreeNodeEventArgs.cs
- CurrentChangingEventArgs.cs
- _CommandStream.cs
- DynamicUpdateCommand.cs
- OdbcPermission.cs
- DataColumnChangeEvent.cs
- ListBase.cs
- ComponentResourceKeyConverter.cs
- ConfigurationSectionCollection.cs
- ClassDataContract.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- HitTestWithPointDrawingContextWalker.cs
- DataRecordInfo.cs
- TrueReadOnlyCollection.cs
- UdpReplyToBehavior.cs