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
- Popup.cs
- Message.cs
- MouseEvent.cs
- AddInStore.cs
- PackageController.cs
- NativeObjectSecurity.cs
- DependencyPropertyKind.cs
- HtmlHistory.cs
- RequestStatusBarUpdateEventArgs.cs
- FillRuleValidation.cs
- RtType.cs
- KeyGestureConverter.cs
- InputProviderSite.cs
- EventRouteFactory.cs
- SubpageParaClient.cs
- MultiView.cs
- XamlPointCollectionSerializer.cs
- PasswordTextContainer.cs
- SelectionChangedEventArgs.cs
- TreeViewAutomationPeer.cs
- UrlAuthFailureHandler.cs
- BasicHttpSecurityElement.cs
- ToolStripSystemRenderer.cs
- IndexingContentUnit.cs
- VariantWrapper.cs
- BinaryWriter.cs
- RtType.cs
- VisualStyleRenderer.cs
- HtmlGenericControl.cs
- SQLBoolean.cs
- MethodBody.cs
- AuthenticationConfig.cs
- ResourcePermissionBase.cs
- _SslSessionsCache.cs
- BrowserDefinition.cs
- LZCodec.cs
- ModifierKeysValueSerializer.cs
- ResourceWriter.cs
- HttpHeaderCollection.cs
- HostedElements.cs
- GroupDescription.cs
- CodeIterationStatement.cs
- _Events.cs
- XmlIlGenerator.cs
- SecurityHelper.cs
- XmlDataLoader.cs
- FixedHighlight.cs
- ExpressionNormalizer.cs
- AssemblyUtil.cs
- _FtpControlStream.cs
- HttpHandlerAction.cs
- ColorPalette.cs
- ContentIterators.cs
- SqlConnectionPoolProviderInfo.cs
- CodeParameterDeclarationExpression.cs
- SingleAnimationBase.cs
- DataGridViewAccessibleObject.cs
- storepermissionattribute.cs
- InstancePersistence.cs
- LingerOption.cs
- DefaultParameterValueAttribute.cs
- DBConnectionString.cs
- ChildrenQuery.cs
- LicenseProviderAttribute.cs
- ListDataHelper.cs
- DataGridViewComponentPropertyGridSite.cs
- EditorAttribute.cs
- ToolStripContentPanelRenderEventArgs.cs
- FileLogRecordStream.cs
- ThicknessKeyFrameCollection.cs
- WbmpConverter.cs
- Page.cs
- GraphicsPathIterator.cs
- IFlowDocumentViewer.cs
- DashStyle.cs
- SafeLibraryHandle.cs
- Sql8ConformanceChecker.cs
- AsymmetricSignatureFormatter.cs
- TriggerBase.cs
- ManifestResourceInfo.cs
- ProxyWebPartManager.cs
- WebProxyScriptElement.cs
- ObjectItemCollection.cs
- WCFServiceClientProxyGenerator.cs
- NamedElement.cs
- AdCreatedEventArgs.cs
- ReservationCollection.cs
- AutoGeneratedFieldProperties.cs
- ValidationResult.cs
- KeyValueConfigurationElement.cs
- ProtocolsConfigurationEntry.cs
- Compensation.cs
- SourceChangedEventArgs.cs
- ModelItemKeyValuePair.cs
- ObjectViewEntityCollectionData.cs
- XsltException.cs
- shaperfactoryquerycachekey.cs
- TextViewSelectionProcessor.cs
- ProcessHostConfigUtils.cs
- EarlyBoundInfo.cs