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
- AttributedMetaModel.cs
- CodeMemberMethod.cs
- Baml2006ReaderSettings.cs
- IFlowDocumentViewer.cs
- UseAttributeSetsAction.cs
- PartialTrustVisibleAssemblyCollection.cs
- SynchronizedInputHelper.cs
- PackageProperties.cs
- externdll.cs
- TextParagraphProperties.cs
- WebPartsPersonalization.cs
- EmptyStringExpandableObjectConverter.cs
- TypeLibConverter.cs
- WebPartTransformer.cs
- OperationContextScope.cs
- ScalarRestriction.cs
- SettingsPropertyValue.cs
- RequestQueryProcessor.cs
- SurrogateSelector.cs
- Form.cs
- DoubleAnimationUsingKeyFrames.cs
- TableCellCollection.cs
- HashHelper.cs
- StorageBasedPackageProperties.cs
- BaseProcessProtocolHandler.cs
- HtmlInputHidden.cs
- ExpressionBuilderCollection.cs
- FunctionCommandText.cs
- DrawingState.cs
- ContextProperty.cs
- CounterCreationData.cs
- ValuePattern.cs
- RegexGroup.cs
- Calendar.cs
- SQlBooleanStorage.cs
- RequestCachePolicy.cs
- Operand.cs
- CodeThrowExceptionStatement.cs
- PartialCachingAttribute.cs
- WSDualHttpBindingCollectionElement.cs
- NavigationCommands.cs
- DataControlFieldHeaderCell.cs
- InteropBitmapSource.cs
- DocumentViewer.cs
- ImageClickEventArgs.cs
- Registry.cs
- WpfGeneratedKnownProperties.cs
- UnknownBitmapDecoder.cs
- HighContrastHelper.cs
- XamlRtfConverter.cs
- MemberProjectedSlot.cs
- MimeImporter.cs
- InkCanvasFeedbackAdorner.cs
- DataObjectSettingDataEventArgs.cs
- Table.cs
- NumberAction.cs
- CssTextWriter.cs
- CaretElement.cs
- AggregateNode.cs
- RuleSettingsCollection.cs
- SqlRemoveConstantOrderBy.cs
- PresentationTraceSources.cs
- ListItemCollection.cs
- PackagePartCollection.cs
- StylusCaptureWithinProperty.cs
- PropertyDescriptorComparer.cs
- StickyNoteAnnotations.cs
- RectangleConverter.cs
- XmlSchemaElement.cs
- Dictionary.cs
- assemblycache.cs
- Screen.cs
- CheckBox.cs
- DockPanel.cs
- LocalizabilityAttribute.cs
- SubMenuStyleCollection.cs
- WebPartEventArgs.cs
- BasicHttpMessageCredentialType.cs
- InputManager.cs
- SelectorAutomationPeer.cs
- IdleTimeoutMonitor.cs
- HexParser.cs
- DbModificationCommandTree.cs
- DEREncoding.cs
- NotFiniteNumberException.cs
- HtmlInputButton.cs
- SrgsRulesCollection.cs
- SizeFConverter.cs
- MarkupExtensionParser.cs
- Encoder.cs
- VersionUtil.cs
- SqlXml.cs
- TemplateBuilder.cs
- ExceptionTranslationTable.cs
- QilFactory.cs
- GeneratedCodeAttribute.cs
- WebPartDeleteVerb.cs
- SafeRegistryHandle.cs
- formatter.cs
- ItemContainerProviderWrapper.cs