Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusButton.cs / 1305600 / 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
- TokenBasedSetEnumerator.cs
- XmlBindingWorker.cs
- ObjectHelper.cs
- XpsResourcePolicy.cs
- MetaForeignKeyColumn.cs
- TrustLevel.cs
- __Filters.cs
- UserControlDesigner.cs
- TransformerConfigurationWizardBase.cs
- UdpSocket.cs
- ObjectAnimationBase.cs
- DBConnectionString.cs
- CheckBoxField.cs
- PtsContext.cs
- TextTreeTextBlock.cs
- EntityFrameworkVersions.cs
- InstanceNameConverter.cs
- TableRowGroupCollection.cs
- XPathDocumentIterator.cs
- MarkupCompiler.cs
- ValidationSummary.cs
- TabRenderer.cs
- RootCodeDomSerializer.cs
- XmlWriter.cs
- _OSSOCK.cs
- ScalarRestriction.cs
- DbParameterHelper.cs
- EmptyWithCancelationCheckWorkItem.cs
- Geometry3D.cs
- FileDialog_Vista_Interop.cs
- XmlJsonWriter.cs
- ConfigurationPropertyAttribute.cs
- FormsAuthenticationCredentials.cs
- XmlTextEncoder.cs
- HttpCapabilitiesBase.cs
- FileAuthorizationModule.cs
- SqlCacheDependencyDatabaseCollection.cs
- OneWayElement.cs
- RegexBoyerMoore.cs
- WorkflowInstanceExtensionCollection.cs
- KeyInterop.cs
- TransactionInformation.cs
- AssemblyResourceLoader.cs
- MobileControlBuilder.cs
- SQLBinary.cs
- DecoratedNameAttribute.cs
- ServiceModelExtensionElement.cs
- FontDriver.cs
- SqlUDTStorage.cs
- PropertySet.cs
- HTMLTextWriter.cs
- ConfigXmlElement.cs
- ToolboxItemCollection.cs
- SqlPersonalizationProvider.cs
- FileDialogCustomPlacesCollection.cs
- XmlSchemas.cs
- StandardCommands.cs
- CharacterMetricsDictionary.cs
- WindowsContainer.cs
- NamedPipeAppDomainProtocolHandler.cs
- StreamGeometryContext.cs
- BindingExpressionUncommonField.cs
- Soap12ServerProtocol.cs
- ErrorStyle.cs
- Endpoint.cs
- XmlWriterTraceListener.cs
- CalendarTable.cs
- TailCallAnalyzer.cs
- ControllableStoryboardAction.cs
- DataObjectCopyingEventArgs.cs
- TraceContextEventArgs.cs
- OdbcUtils.cs
- TemplatedEditableDesignerRegion.cs
- While.cs
- WsdlWriter.cs
- XmlSchemaDocumentation.cs
- GridViewCancelEditEventArgs.cs
- GroupBoxAutomationPeer.cs
- ContentElement.cs
- DataGridViewColumnCollection.cs
- LicFileLicenseProvider.cs
- ClientType.cs
- DataGridViewColumn.cs
- MatrixIndependentAnimationStorage.cs
- SqlMultiplexer.cs
- ExpressionWriter.cs
- OptimalTextSource.cs
- GACMembershipCondition.cs
- BitArray.cs
- BamlLocalizableResourceKey.cs
- FormViewUpdatedEventArgs.cs
- ByteAnimation.cs
- ITreeGenerator.cs
- Border.cs
- ContextProperty.cs
- ResponseStream.cs
- ByteStream.cs
- Triplet.cs
- CachedFontFamily.cs
- DocumentOrderComparer.cs