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 / 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
- PTUtility.cs
- Context.cs
- RelationshipEndCollection.cs
- PathGradientBrush.cs
- VerticalAlignConverter.cs
- MultipleViewPatternIdentifiers.cs
- HtmlMobileTextWriter.cs
- SafeRegistryHandle.cs
- _LocalDataStoreMgr.cs
- WebControl.cs
- ISO2022Encoding.cs
- AssociationSetMetadata.cs
- ContextMenuService.cs
- BinaryObjectWriter.cs
- TextEditorTyping.cs
- X509CertificateCollection.cs
- SctClaimSerializer.cs
- TypeRefElement.cs
- QuaternionAnimation.cs
- VisualStateManager.cs
- XmlSchemaComplexContent.cs
- VisualSerializer.cs
- StylusShape.cs
- StateMachineDesignerPaint.cs
- NamespaceTable.cs
- SourceItem.cs
- DbgUtil.cs
- GeneratedCodeAttribute.cs
- XsdBuildProvider.cs
- HttpHeaderCollection.cs
- NullableFloatAverageAggregationOperator.cs
- ObjectDataSourceSelectingEventArgs.cs
- ProtocolsConfiguration.cs
- EditorBrowsableAttribute.cs
- SeverityFilter.cs
- UIPermission.cs
- CommandConverter.cs
- SqlException.cs
- PersonalizationProviderCollection.cs
- XmlWriterSettings.cs
- MonthCalendar.cs
- AlternateView.cs
- AmbientLight.cs
- PeerPresenceInfo.cs
- PassportAuthenticationEventArgs.cs
- BindingListCollectionView.cs
- XmlNodeComparer.cs
- ICspAsymmetricAlgorithm.cs
- AppSecurityManager.cs
- WsdlContractConversionContext.cs
- ExplicitDiscriminatorMap.cs
- InsufficientMemoryException.cs
- AttachedPropertyInfo.cs
- BezierSegment.cs
- CollectionViewSource.cs
- altserialization.cs
- ButtonFlatAdapter.cs
- InstanceDescriptor.cs
- XsdValidatingReader.cs
- SqlCommand.cs
- PartialClassGenerationTaskInternal.cs
- PageCatalogPart.cs
- CodeExpressionStatement.cs
- MembershipValidatePasswordEventArgs.cs
- GenericAuthenticationEventArgs.cs
- SinglePhaseEnlistment.cs
- SharedStatics.cs
- DataGridGeneralPage.cs
- ToolStripRendererSwitcher.cs
- StateMachineWorkflowInstance.cs
- Configuration.cs
- XPathAxisIterator.cs
- IdentifierCollection.cs
- EmbeddedObject.cs
- Brush.cs
- SvcMapFileSerializer.cs
- QilGenerator.cs
- MsmqIntegrationProcessProtocolHandler.cs
- IconEditor.cs
- BindingExpressionBase.cs
- ProfilePropertySettings.cs
- ObservableDictionary.cs
- ModelItemDictionary.cs
- _NegoState.cs
- CompilerHelpers.cs
- BinaryConverter.cs
- NameTable.cs
- SqlSelectClauseBuilder.cs
- AppDomainResourcePerfCounters.cs
- ConfigurationPropertyCollection.cs
- NavigationPropertySingletonExpression.cs
- WebEventTraceProvider.cs
- PrimitiveXmlSerializers.cs
- CodeLinePragma.cs
- SafeThreadHandle.cs
- CryptoConfig.cs
- ACE.cs
- MultipleCopiesCollection.cs
- MessageBox.cs
- CompilerCollection.cs