Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusSystemGestureEventArgs.cs / 1 / 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 (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 != SystemGesture.None)
{
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 (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 != SystemGesture.Flick &&
systemGesture != SystemGesture.None)
{
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 (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 != SystemGesture.None)
{
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 (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 != SystemGesture.Flick &&
systemGesture != SystemGesture.None)
{
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
- PathGeometry.cs
- RC2CryptoServiceProvider.cs
- SchemaMapping.cs
- FileEnumerator.cs
- CompilationUtil.cs
- ScrollPattern.cs
- ListViewItem.cs
- ChtmlImageAdapter.cs
- BaseDataListActionList.cs
- Style.cs
- HideDisabledControlAdapter.cs
- SqlDependency.cs
- SchemaName.cs
- WebReferencesBuildProvider.cs
- StructuralObject.cs
- CodeLinePragma.cs
- WindowInteropHelper.cs
- IntSecurity.cs
- CodeGenerator.cs
- TargetControlTypeCache.cs
- WindowsGraphics.cs
- ScrollableControl.cs
- HttpRawResponse.cs
- GetPageCompletedEventArgs.cs
- TypeConverterAttribute.cs
- OledbConnectionStringbuilder.cs
- Property.cs
- ReadOnlyDictionary.cs
- NativeMethods.cs
- EventLogPermission.cs
- WebPartVerbCollection.cs
- EnumCodeDomSerializer.cs
- FixedSOMLineRanges.cs
- ViewPort3D.cs
- DbConnectionOptions.cs
- SynchronizedInputProviderWrapper.cs
- NetworkInformationPermission.cs
- HttpResponseHeader.cs
- IEnumerable.cs
- FacetDescription.cs
- AlgoModule.cs
- CodeGenerator.cs
- Baml2006ReaderContext.cs
- UnauthorizedAccessException.cs
- ADMembershipUser.cs
- ListControlDataBindingHandler.cs
- ManagementNamedValueCollection.cs
- WindowsGraphics2.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ProgressChangedEventArgs.cs
- SortDescription.cs
- AppearanceEditorPart.cs
- ADRole.cs
- EdmToObjectNamespaceMap.cs
- PromptBuilder.cs
- StreamGeometry.cs
- AttributeQuery.cs
- ColorContextHelper.cs
- SqlInternalConnectionTds.cs
- TextServicesCompartmentContext.cs
- LocatorGroup.cs
- VectorKeyFrameCollection.cs
- ItemCollection.cs
- InvalidDocumentContentsException.cs
- DataServiceProviderWrapper.cs
- RangeContentEnumerator.cs
- CustomCategoryAttribute.cs
- InfoCardAsymmetricCrypto.cs
- TextChange.cs
- SystemUnicastIPAddressInformation.cs
- MediaContext.cs
- ToolStripScrollButton.cs
- ServiceChannelProxy.cs
- ContextMenuService.cs
- MediaElement.cs
- Pens.cs
- WebPartMenu.cs
- ButtonChrome.cs
- Listbox.cs
- ColorKeyFrameCollection.cs
- PreservationFileWriter.cs
- ErrorRuntimeConfig.cs
- LabelDesigner.cs
- TypographyProperties.cs
- StrokeCollection2.cs
- IncomingWebResponseContext.cs
- FixedDocumentPaginator.cs
- ClassValidator.cs
- AssemblyBuilderData.cs
- ImageCollectionCodeDomSerializer.cs
- RegistrySecurity.cs
- Opcode.cs
- WSTrust.cs
- HtmlTable.cs
- MediaContextNotificationWindow.cs
- SmtpFailedRecipientsException.cs
- HostVisual.cs
- UrlPath.cs
- SslStream.cs
- JpegBitmapEncoder.cs