Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- Assert.cs
- Compensation.cs
- AdPostCacheSubstitution.cs
- IRCollection.cs
- RadioButtonAutomationPeer.cs
- Screen.cs
- RequestQueue.cs
- DataGridViewLayoutData.cs
- SHA1.cs
- ImageField.cs
- ResourcePermissionBase.cs
- ChangeTracker.cs
- DataGridSortingEventArgs.cs
- HttpHeaderCollection.cs
- ConcurrentDictionary.cs
- ColumnTypeConverter.cs
- CacheMemory.cs
- PageRanges.cs
- ConfigurationManagerHelperFactory.cs
- BinaryCommonClasses.cs
- ContainerVisual.cs
- RootProfilePropertySettingsCollection.cs
- RemoveStoryboard.cs
- ExpressionEditorAttribute.cs
- TextOnlyOutput.cs
- AsyncResult.cs
- TdsValueSetter.cs
- XpsDocumentEvent.cs
- _PooledStream.cs
- CompilerLocalReference.cs
- BamlBinaryWriter.cs
- ObjectManager.cs
- SoapSchemaMember.cs
- DataGridViewTextBoxColumn.cs
- ReadOnlyMetadataCollection.cs
- MaterialGroup.cs
- EventArgs.cs
- ClassicBorderDecorator.cs
- DocumentReference.cs
- cookiecontainer.cs
- Run.cs
- BaseValidatorDesigner.cs
- FileDialog.cs
- ReachDocumentPageSerializer.cs
- UserControlParser.cs
- LinqDataView.cs
- SchemaNames.cs
- OdbcCommandBuilder.cs
- SmtpReplyReaderFactory.cs
- CapabilitiesSection.cs
- DataServiceException.cs
- ExpressionNode.cs
- AutomationProperties.cs
- ArrangedElementCollection.cs
- ListManagerBindingsCollection.cs
- SafeTimerHandle.cs
- ColumnReorderedEventArgs.cs
- ArcSegment.cs
- TextEditorTyping.cs
- StorageFunctionMapping.cs
- DefaultAuthorizationContext.cs
- UIPermission.cs
- HitTestParameters.cs
- ListViewAutomationPeer.cs
- XPathNavigatorReader.cs
- FilterableAttribute.cs
- Math.cs
- CodePageEncoding.cs
- XslException.cs
- Byte.cs
- EntitySet.cs
- ComponentChangingEvent.cs
- XDeferredAxisSource.cs
- CommandHelpers.cs
- StylusDownEventArgs.cs
- FrameSecurityDescriptor.cs
- WCFBuildProvider.cs
- CheckBox.cs
- XPathAncestorQuery.cs
- ListBoxChrome.cs
- GridErrorDlg.cs
- TemplatePartAttribute.cs
- RecommendedAsConfigurableAttribute.cs
- Vector.cs
- ControlTemplate.cs
- TypeCodeDomSerializer.cs
- PlatformCulture.cs
- XmlSchemaSimpleTypeRestriction.cs
- ImageClickEventArgs.cs
- QueryContinueDragEventArgs.cs
- BitmapInitialize.cs
- ProjectionPlanCompiler.cs
- HighlightComponent.cs
- XmlAttributeCache.cs
- NamedElement.cs
- _LocalDataStore.cs
- SystemTcpStatistics.cs
- loginstatus.cs
- ProjectionCamera.cs
- SrgsSubset.cs