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
- TdsParameterSetter.cs
- AccessedThroughPropertyAttribute.cs
- Font.cs
- TextServicesDisplayAttribute.cs
- WindowsPrincipal.cs
- dsa.cs
- HttpHandlerActionCollection.cs
- XPathBuilder.cs
- RouteUrlExpressionBuilder.cs
- SqlOuterApplyReducer.cs
- RelatedCurrencyManager.cs
- Size.cs
- SHA384Managed.cs
- Send.cs
- Variant.cs
- ContextBase.cs
- ThreadBehavior.cs
- _RequestCacheProtocol.cs
- SystemSounds.cs
- WindowsToolbarItemAsMenuItem.cs
- Filter.cs
- NoneExcludedImageIndexConverter.cs
- TextTreeInsertUndoUnit.cs
- ObjectViewFactory.cs
- SqlConnectionPoolGroupProviderInfo.cs
- MulticastOption.cs
- SqlCachedBuffer.cs
- RelationshipConverter.cs
- ImpersonationOption.cs
- DataGridViewCellEventArgs.cs
- ProcessHost.cs
- EndpointPerformanceCounters.cs
- dataprotectionpermission.cs
- PaperSource.cs
- BinaryConverter.cs
- DateTimeSerializationSection.cs
- CreateUserWizardAutoFormat.cs
- ComponentEditorForm.cs
- ConfigurationHelpers.cs
- _LocalDataStoreMgr.cs
- StackSpiller.Generated.cs
- FrameworkElementAutomationPeer.cs
- rsa.cs
- SuppressMergeCheckAttribute.cs
- ValueProviderWrapper.cs
- ResourceExpressionBuilder.cs
- GeometryModel3D.cs
- Int16AnimationBase.cs
- TextFragmentEngine.cs
- EntityDataSourceDataSelection.cs
- SiteMap.cs
- SqlNodeAnnotations.cs
- PatternMatcher.cs
- RelationshipDetailsRow.cs
- CollectionEditor.cs
- WindowsSysHeader.cs
- ViewKeyConstraint.cs
- DataGridViewColumnCollectionEditor.cs
- LocalizeDesigner.cs
- brushes.cs
- ToolstripProfessionalRenderer.cs
- FrameSecurityDescriptor.cs
- oledbmetadatacollectionnames.cs
- CaretElement.cs
- NonBatchDirectoryCompiler.cs
- SafeNativeMethods.cs
- PackageDigitalSignatureManager.cs
- MenuEventArgs.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- CompositionCommandSet.cs
- DocumentViewerHelper.cs
- DataObjectEventArgs.cs
- assertwrapper.cs
- DBCSCodePageEncoding.cs
- BoundingRectTracker.cs
- cryptoapiTransform.cs
- EmptyEnumerator.cs
- ManagementInstaller.cs
- VoiceInfo.cs
- ScrollBarAutomationPeer.cs
- SQLSingle.cs
- SharedUtils.cs
- ObjectStorage.cs
- CopyNamespacesAction.cs
- XmlSerializationGeneratedCode.cs
- ButtonBase.cs
- Int32Collection.cs
- RemotingAttributes.cs
- ISAPIWorkerRequest.cs
- Misc.cs
- KeyFrames.cs
- TextParagraphView.cs
- System.Data_BID.cs
- XmlStreamStore.cs
- PrivateFontCollection.cs
- ComPlusInstanceProvider.cs
- SecurityUtils.cs
- ApplicationSecurityManager.cs
- ButtonRenderer.cs
- ValidationRuleCollection.cs