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
- InkCanvas.cs
- ElementAction.cs
- GridItemProviderWrapper.cs
- SecurityRuntime.cs
- FamilyCollection.cs
- _NetworkingPerfCounters.cs
- WCFModelStrings.Designer.cs
- _UriSyntax.cs
- ContainerActivationHelper.cs
- EntityRecordInfo.cs
- ClientConfigurationHost.cs
- NativeRecognizer.cs
- ScrollViewer.cs
- JsonDeserializer.cs
- WeakReferenceEnumerator.cs
- ToolStripItem.cs
- StrongNameHelpers.cs
- ConstructorNeedsTagAttribute.cs
- AncillaryOps.cs
- Transform3DGroup.cs
- AlignmentYValidation.cs
- MD5.cs
- EmptyCollection.cs
- ArgumentException.cs
- ObfuscateAssemblyAttribute.cs
- Thumb.cs
- Rotation3DAnimationBase.cs
- IEnumerable.cs
- ConditionalAttribute.cs
- WindowsRebar.cs
- MetafileEditor.cs
- Properties.cs
- ResourceDefaultValueAttribute.cs
- ClusterSafeNativeMethods.cs
- TrustManagerPromptUI.cs
- GZipStream.cs
- BamlReader.cs
- Point3DIndependentAnimationStorage.cs
- ComponentResourceManager.cs
- CopyNamespacesAction.cs
- SessionState.cs
- ParameterCollection.cs
- VisualStateChangedEventArgs.cs
- StringPropertyBuilder.cs
- ApplicationActivator.cs
- ParameterModifier.cs
- ManagementInstaller.cs
- StrongTypingException.cs
- TransformedBitmap.cs
- NegotiateStream.cs
- BasicDesignerLoader.cs
- SqlCacheDependencySection.cs
- DeobfuscatingStream.cs
- SafeEventLogReadHandle.cs
- RangeValuePattern.cs
- PropertiesTab.cs
- Pair.cs
- BaseValidatorDesigner.cs
- PhysicalFontFamily.cs
- SessionParameter.cs
- ApplicationDirectoryMembershipCondition.cs
- Size.cs
- DictionaryTraceRecord.cs
- ProxyRpc.cs
- Floater.cs
- PixelFormatConverter.cs
- SQLInt16Storage.cs
- FilePrompt.cs
- ArraySubsetEnumerator.cs
- Int64Converter.cs
- GeneralTransform.cs
- __ConsoleStream.cs
- BamlBinaryReader.cs
- ReachPrintTicketSerializerAsync.cs
- EventSinkActivity.cs
- GcHandle.cs
- ServiceHostFactory.cs
- NoneExcludedImageIndexConverter.cs
- DynamicPropertyHolder.cs
- TransactionScope.cs
- RedirectionProxy.cs
- OdbcError.cs
- LifetimeServices.cs
- COM2ExtendedBrowsingHandler.cs
- SkipStoryboardToFill.cs
- SamlAssertion.cs
- SecurityDocument.cs
- BrowserTree.cs
- TranslateTransform.cs
- UIElementIsland.cs
- FixedDocumentPaginator.cs
- XmlSortKeyAccumulator.cs
- CodeCatchClauseCollection.cs
- WebBaseEventKeyComparer.cs
- Run.cs
- CodeGenerator.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- FamilyMapCollection.cs
- PathGeometry.cs
- Renderer.cs