Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Input / Stylus / RawStylusSystemGestureInputReport.cs / 1 / RawStylusSystemGestureInputReport.cs
using System; using System.ComponentModel; using System.Security; using System.Security.Permissions; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// [TBS] /// internal class RawStylusSystemGestureInputReport : RawStylusInputReport { // We don't want to publically expose the double tap system gesture so we define it here. internal const SystemGesture InternalSystemGestureDoubleTap = (SystemGesture)0x11; ///////////////////////////////////////////////////////////////////// ////// Constructs an instance of the RawStylusSystemGestureInputReport class. /// /// /// The mode in which the input is being provided. /// /// /// The time when the input occured. /// /// /// The PresentationSource over which the stylus moved. /// /// /// PenContext that generated this event. /// /// /// tablet id. /// /// /// Stylus device id. /// /// /// System Gesture. /// /// /// X location of the system gesture (in tablet device coordindates). /// /// /// Y location of the system gesture (in tablet device coordindates). /// /// /// Button state info data. /// ////// Critical:This handles critical data in the form of PresentationSource /// TreatAsSafe:There are demands on the critical data(PresentationSource) /// [SecurityCritical,SecurityTreatAsSafe] internal RawStylusSystemGestureInputReport( InputMode mode, int timestamp, PresentationSource inputSource, PenContext penContext, int tabletId, int stylusDeviceId, SystemGesture systemGesture, int gestureX, int gestureY, int buttonState) : base( mode, timestamp, inputSource, penContext, RawStylusActions.SystemGesture, tabletId, stylusDeviceId, new int[] {}) { if (systemGesture != SystemGesture.None && systemGesture != SystemGesture.Tap && systemGesture != SystemGesture.RightTap && systemGesture != SystemGesture.Drag && systemGesture != SystemGesture.RightDrag && systemGesture != SystemGesture.HoldEnter && systemGesture != SystemGesture.HoldLeave && systemGesture != SystemGesture.HoverEnter && systemGesture != SystemGesture.HoverLeave && systemGesture != InternalSystemGestureDoubleTap && systemGesture != SystemGesture.Flick) { throw new InvalidEnumArgumentException(SR.Get( SRID.Enum_Invalid, "systemGesture")); } _id = systemGesture; _gestureX = gestureX; _gestureY = gestureY; _buttonState = buttonState; } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the stylus gesture id. /// internal SystemGesture SystemGesture { get { return _id; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the X location of the system gesture /// in tablet device coordinates. /// internal int GestureX { get { return _gestureX; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the Y location of the system gesture /// in tablet device coordinates. /// internal int GestureY { get { return _gestureY; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the button state info (useful for flicks). /// internal int ButtonState { get { return _buttonState; } } ///////////////////////////////////////////////////////////////////// SystemGesture _id; int _gestureX;// gesture location in tablet device coordinates int _gestureY; int _buttonState; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.ComponentModel; using System.Security; using System.Security.Permissions; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// [TBS] /// internal class RawStylusSystemGestureInputReport : RawStylusInputReport { // We don't want to publically expose the double tap system gesture so we define it here. internal const SystemGesture InternalSystemGestureDoubleTap = (SystemGesture)0x11; ///////////////////////////////////////////////////////////////////// ////// Constructs an instance of the RawStylusSystemGestureInputReport class. /// /// /// The mode in which the input is being provided. /// /// /// The time when the input occured. /// /// /// The PresentationSource over which the stylus moved. /// /// /// PenContext that generated this event. /// /// /// tablet id. /// /// /// Stylus device id. /// /// /// System Gesture. /// /// /// X location of the system gesture (in tablet device coordindates). /// /// /// Y location of the system gesture (in tablet device coordindates). /// /// /// Button state info data. /// ////// Critical:This handles critical data in the form of PresentationSource /// TreatAsSafe:There are demands on the critical data(PresentationSource) /// [SecurityCritical,SecurityTreatAsSafe] internal RawStylusSystemGestureInputReport( InputMode mode, int timestamp, PresentationSource inputSource, PenContext penContext, int tabletId, int stylusDeviceId, SystemGesture systemGesture, int gestureX, int gestureY, int buttonState) : base( mode, timestamp, inputSource, penContext, RawStylusActions.SystemGesture, tabletId, stylusDeviceId, new int[] {}) { if (systemGesture != SystemGesture.None && systemGesture != SystemGesture.Tap && systemGesture != SystemGesture.RightTap && systemGesture != SystemGesture.Drag && systemGesture != SystemGesture.RightDrag && systemGesture != SystemGesture.HoldEnter && systemGesture != SystemGesture.HoldLeave && systemGesture != SystemGesture.HoverEnter && systemGesture != SystemGesture.HoverLeave && systemGesture != InternalSystemGestureDoubleTap && systemGesture != SystemGesture.Flick) { throw new InvalidEnumArgumentException(SR.Get( SRID.Enum_Invalid, "systemGesture")); } _id = systemGesture; _gestureX = gestureX; _gestureY = gestureY; _buttonState = buttonState; } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the stylus gesture id. /// internal SystemGesture SystemGesture { get { return _id; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the X location of the system gesture /// in tablet device coordinates. /// internal int GestureX { get { return _gestureX; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the Y location of the system gesture /// in tablet device coordinates. /// internal int GestureY { get { return _gestureY; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the button state info (useful for flicks). /// internal int ButtonState { get { return _buttonState; } } ///////////////////////////////////////////////////////////////////// SystemGesture _id; int _gestureX;// gesture location in tablet device coordinates int _gestureY; int _buttonState; } } // 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
- DesigntimeLicenseContext.cs
- DictionaryBase.cs
- EastAsianLunisolarCalendar.cs
- ActivityMarkupSerializationProvider.cs
- TreeView.cs
- DetailsViewModeEventArgs.cs
- FixedSOMImage.cs
- DBNull.cs
- StreamWithDictionary.cs
- MetadataSet.cs
- InternalConfigConfigurationFactory.cs
- Rights.cs
- DataFormat.cs
- IFlowDocumentViewer.cs
- SafeRightsManagementEnvironmentHandle.cs
- CodeDirectionExpression.cs
- DoubleAnimationUsingPath.cs
- EntityParameter.cs
- ObjectQuery_EntitySqlExtensions.cs
- ConfigurationException.cs
- SqlTransaction.cs
- AssociationSet.cs
- LinqDataSourceDeleteEventArgs.cs
- PrivacyNoticeBindingElement.cs
- StringCollection.cs
- HtmlShim.cs
- WorkerRequest.cs
- EdmToObjectNamespaceMap.cs
- UnsafeNetInfoNativeMethods.cs
- streamingZipPartStream.cs
- StateMachine.cs
- FixedHyperLink.cs
- QuaternionValueSerializer.cs
- DbParameterHelper.cs
- RadioButton.cs
- WindowsFormsHelpers.cs
- ScaleTransform.cs
- hresults.cs
- EncoderBestFitFallback.cs
- EntitySetDataBindingList.cs
- XpsS0ValidatingLoader.cs
- SessionPageStatePersister.cs
- ToolBar.cs
- BuilderInfo.cs
- MDIControlStrip.cs
- ProfilePropertyNameValidator.cs
- Vector3dCollection.cs
- DropDownButton.cs
- DetailsViewInsertEventArgs.cs
- XmlTypeAttribute.cs
- SingleStorage.cs
- StructuredTypeEmitter.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ListBoxAutomationPeer.cs
- SpellerError.cs
- RouteItem.cs
- MoveSizeWinEventHandler.cs
- RadialGradientBrush.cs
- SecurityTokenValidationException.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ReadOnlyPropertyMetadata.cs
- GiveFeedbackEvent.cs
- RSAOAEPKeyExchangeDeformatter.cs
- BridgeDataRecord.cs
- InvalidEnumArgumentException.cs
- View.cs
- Crypto.cs
- Attribute.cs
- IPAddress.cs
- InlineCollection.cs
- MsmqVerifier.cs
- AutomationProperties.cs
- AuthorizationRuleCollection.cs
- RemoteDebugger.cs
- AssociationSetMetadata.cs
- Monitor.cs
- WebPartUtil.cs
- SqlTriggerContext.cs
- BaseTransportHeaders.cs
- CodeCatchClauseCollection.cs
- PackWebResponse.cs
- MetadataSource.cs
- WebBrowserPermission.cs
- CompiledRegexRunnerFactory.cs
- XmlSchemaType.cs
- GroupItemAutomationPeer.cs
- CodeParameterDeclarationExpression.cs
- X509RawDataKeyIdentifierClause.cs
- _SpnDictionary.cs
- TokenBasedSet.cs
- BitmapPalettes.cs
- QilSortKey.cs
- remotingproxy.cs
- AutomationEvent.cs
- Normalization.cs
- SQLChars.cs
- CalendarKeyboardHelper.cs
- Error.cs
- StringKeyFrameCollection.cs