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 / StylusButton.cs / 1 / StylusButton.cs
using System; using System.Globalization; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// StylusButton class /// public class StylusButton { ///////////////////////////////////////////////////////////////////// internal StylusButton(string name, Guid id) { _name = name; _guid = id; } ///////////////////////////////////////////////////////////////////// ////// Returns the hardware Guid of the StylusDevice button. /// public Guid Guid { get { return _guid; } } ///////////////////////////////////////////////////////////////////// ////// Returns the current state of the button. /// public StylusButtonState StylusButtonState { // get { StylusPointCollection stylusPoints = StylusDevice.GetStylusPoints(null); if (stylusPoints == null || stylusPoints.Count == 0) return CachedButtonState; return (StylusButtonState)stylusPoints[stylusPoints.Count - 1].GetPropertyValue(new StylusPointProperty(Guid, true)); } } internal StylusButtonState CachedButtonState { get { return _cachedButtonState; } set { _cachedButtonState = value; } } ///////////////////////////////////////////////////////////////////// ////// Returns the name of the button. /// public string Name { get { return _name; } } ///////////////////////////////////////////////////////////////////// ////// Returns StylusDevice object that owns this button. /// public StylusDevice StylusDevice { get { return _stylusDevice; } } ///////////////////////////////////////////////////////////////////// /// internal void SetOwner(StylusDevice stylusDevice) { _stylusDevice = stylusDevice; } ///////////////////////////////////////////////////////////////////// ////// Returns the friendly representation of the button object /// ///public override string ToString() { return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), this.Name); } ///////////////////////////////////////////////////////////////////// StylusDevice _stylusDevice; string _name; Guid _guid; StylusButtonState _cachedButtonState = StylusButtonState.Up; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Globalization; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// /// name of the tablet /// StylusButton class /// public class StylusButton { ///////////////////////////////////////////////////////////////////// internal StylusButton(string name, Guid id) { _name = name; _guid = id; } ///////////////////////////////////////////////////////////////////// ////// Returns the hardware Guid of the StylusDevice button. /// public Guid Guid { get { return _guid; } } ///////////////////////////////////////////////////////////////////// ////// Returns the current state of the button. /// public StylusButtonState StylusButtonState { // get { StylusPointCollection stylusPoints = StylusDevice.GetStylusPoints(null); if (stylusPoints == null || stylusPoints.Count == 0) return CachedButtonState; return (StylusButtonState)stylusPoints[stylusPoints.Count - 1].GetPropertyValue(new StylusPointProperty(Guid, true)); } } internal StylusButtonState CachedButtonState { get { return _cachedButtonState; } set { _cachedButtonState = value; } } ///////////////////////////////////////////////////////////////////// ////// Returns the name of the button. /// public string Name { get { return _name; } } ///////////////////////////////////////////////////////////////////// ////// Returns StylusDevice object that owns this button. /// public StylusDevice StylusDevice { get { return _stylusDevice; } } ///////////////////////////////////////////////////////////////////// /// internal void SetOwner(StylusDevice stylusDevice) { _stylusDevice = stylusDevice; } ///////////////////////////////////////////////////////////////////// ////// Returns the friendly representation of the button object /// ///public override string ToString() { return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), this.Name); } ///////////////////////////////////////////////////////////////////// StylusDevice _stylusDevice; string _name; Guid _guid; StylusButtonState _cachedButtonState = StylusButtonState.Up; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. name of the tablet
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MDIControlStrip.cs
- RegexEditorDialog.cs
- BaseParagraph.cs
- DataBoundLiteralControl.cs
- ResizeGrip.cs
- Debug.cs
- FormViewUpdateEventArgs.cs
- Vector.cs
- VectorAnimation.cs
- InsufficientExecutionStackException.cs
- ManipulationDeltaEventArgs.cs
- SecurityContextKeyIdentifierClause.cs
- DataGrid.cs
- LayoutSettings.cs
- fixedPageContentExtractor.cs
- DetailsViewRowCollection.cs
- SequenceDesigner.cs
- TryExpression.cs
- ObjectCloneHelper.cs
- ApplicationId.cs
- PowerModeChangedEventArgs.cs
- HttpClientChannel.cs
- KeyInfo.cs
- TraceLog.cs
- XLinq.cs
- TextControlDesigner.cs
- StopStoryboard.cs
- ECDiffieHellmanCngPublicKey.cs
- InvalidComObjectException.cs
- WebPartCloseVerb.cs
- AutoResetEvent.cs
- ConfigViewGenerator.cs
- DependsOnAttribute.cs
- SafeViewOfFileHandle.cs
- TextBoxBase.cs
- ScrollChrome.cs
- ProjectionPruner.cs
- ScriptResourceAttribute.cs
- EntityProviderServices.cs
- ItemList.cs
- CompilerHelpers.cs
- followingsibling.cs
- CustomValidator.cs
- NativeObjectSecurity.cs
- ContentControl.cs
- AsymmetricSignatureDeformatter.cs
- IndicShape.cs
- LinkedList.cs
- __Filters.cs
- GridViewColumnHeader.cs
- HuffCodec.cs
- baseaxisquery.cs
- SqlUserDefinedTypeAttribute.cs
- TextAnchor.cs
- AsyncStreamReader.cs
- BitmapEffectrendercontext.cs
- WebPartTransformerCollection.cs
- TransformerInfoCollection.cs
- SerializationStore.cs
- ItemChangedEventArgs.cs
- FormsAuthenticationModule.cs
- HeaderedContentControl.cs
- DataTableMapping.cs
- AstTree.cs
- WorkflowRuntimeServicesBehavior.cs
- ProviderBase.cs
- OpCodes.cs
- TextFormatterContext.cs
- TimeSpanConverter.cs
- PromptEventArgs.cs
- StreamWriter.cs
- KeySpline.cs
- XmlDeclaration.cs
- SqlDependency.cs
- ReflectionServiceProvider.cs
- SqlConnection.cs
- Thickness.cs
- ServiceNotStartedException.cs
- WebPartCatalogAddVerb.cs
- XmlWriterSettings.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- XmlReflectionMember.cs
- WindowsRebar.cs
- CommandConverter.cs
- XmlBinaryWriterSession.cs
- PathSegmentCollection.cs
- ExportFileRequest.cs
- XmlAtomErrorReader.cs
- TabOrder.cs
- AdjustableArrowCap.cs
- VirtualPath.cs
- CachedTypeface.cs
- XsdDuration.cs
- DoubleKeyFrameCollection.cs
- IndependentAnimationStorage.cs
- InlineCollection.cs
- BitmapSizeOptions.cs
- DBAsyncResult.cs
- NamespaceDecl.cs
- ControlSerializer.cs