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
- RemoteWebConfigurationHostServer.cs
- PathTooLongException.cs
- VectorAnimationUsingKeyFrames.cs
- ProtocolsConfiguration.cs
- ComponentConverter.cs
- ControlCodeDomSerializer.cs
- UTF7Encoding.cs
- TreeViewDesigner.cs
- BitSet.cs
- MessagePropertyDescription.cs
- MD5.cs
- PatternMatcher.cs
- DuplicateDetector.cs
- KeyNotFoundException.cs
- PropertyPushdownHelper.cs
- VBIdentifierTrimConverter.cs
- SchemaLookupTable.cs
- Maps.cs
- DrawingContextDrawingContextWalker.cs
- BoundPropertyEntry.cs
- TemplatePagerField.cs
- CollectionViewGroup.cs
- ArithmeticException.cs
- BamlLocalizationDictionary.cs
- ScriptResourceHandler.cs
- ACE.cs
- PersonalizationProviderCollection.cs
- CodeMemberField.cs
- ExpressionVisitorHelpers.cs
- CounterNameConverter.cs
- ObjectResult.cs
- OdbcInfoMessageEvent.cs
- ApplicationActivator.cs
- TraceSection.cs
- XmlUtf8RawTextWriter.cs
- StaticFileHandler.cs
- UserNameSecurityToken.cs
- PageRequestManager.cs
- AlphaSortedEnumConverter.cs
- HelpInfo.cs
- SqlGenericUtil.cs
- WorkflowDesigner.cs
- WebPartEditVerb.cs
- WindowInteractionStateTracker.cs
- XmlLoader.cs
- ObjectListCommand.cs
- Listen.cs
- PropertyInfoSet.cs
- HelpKeywordAttribute.cs
- ParagraphResult.cs
- ImageClickEventArgs.cs
- TableColumnCollectionInternal.cs
- XpsPackagingPolicy.cs
- EntityContainerAssociationSetEnd.cs
- Mappings.cs
- SocketManager.cs
- TextOutput.cs
- CompiledRegexRunner.cs
- SpecularMaterial.cs
- XamlFigureLengthSerializer.cs
- DefaultValidator.cs
- login.cs
- PerspectiveCamera.cs
- BitmapPalette.cs
- MappingModelBuildProvider.cs
- ShapingEngine.cs
- AmbientLight.cs
- AsyncStreamReader.cs
- ByteViewer.cs
- ConfigurationHelpers.cs
- MetabaseServerConfig.cs
- TextRangeSerialization.cs
- BehaviorDragDropEventArgs.cs
- GestureRecognizer.cs
- SoapIncludeAttribute.cs
- CounterNameConverter.cs
- FlowDocument.cs
- DataGridViewColumnEventArgs.cs
- PrePostDescendentsWalker.cs
- ContractTypeNameCollection.cs
- GridViewCancelEditEventArgs.cs
- propertytag.cs
- DataGridViewImageColumn.cs
- CacheVirtualItemsEvent.cs
- TableLayoutSettings.cs
- BufferModeSettings.cs
- NullEntityWrapper.cs
- AffineTransform3D.cs
- Utils.cs
- QuaternionValueSerializer.cs
- EditorBrowsableAttribute.cs
- NameValueFileSectionHandler.cs
- CustomAttributeFormatException.cs
- CryptoHandle.cs
- ConditionCollection.cs
- ArglessEventHandlerProxy.cs
- HtmlHistory.cs
- Parameter.cs
- ToolboxItemSnapLineBehavior.cs
- ConstructorBuilder.cs