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
- EventsTab.cs
- ISFClipboardData.cs
- ClientBuildManagerCallback.cs
- odbcmetadatacolumnnames.cs
- SyndicationSerializer.cs
- PrinterUnitConvert.cs
- UnaryNode.cs
- Stopwatch.cs
- GcHandle.cs
- SessionStateModule.cs
- HandlerWithFactory.cs
- MessageBox.cs
- CustomCategoryAttribute.cs
- MultiView.cs
- TokenFactoryBase.cs
- CharAnimationUsingKeyFrames.cs
- PersonalizationStateQuery.cs
- AmbientValueAttribute.cs
- PlatformCulture.cs
- ObjectParameter.cs
- XmlEntity.cs
- HMACSHA512.cs
- ActivityWithResult.cs
- VerificationException.cs
- DataGridClipboardCellContent.cs
- ManagementEventWatcher.cs
- DecoderFallback.cs
- codemethodreferenceexpression.cs
- ImageDrawing.cs
- XmlStringTable.cs
- Module.cs
- TimelineCollection.cs
- ApplyHostConfigurationBehavior.cs
- IntMinMaxAggregationOperator.cs
- Page.cs
- HebrewCalendar.cs
- WebControlsSection.cs
- Model3DCollection.cs
- AssemblyAttributesGoHere.cs
- InstalledVoice.cs
- CreateUserErrorEventArgs.cs
- TimelineGroup.cs
- CachingHintValidation.cs
- HebrewNumber.cs
- LiteralControl.cs
- MarkupCompilePass1.cs
- DataGridHyperlinkColumn.cs
- System.Data_BID.cs
- BindUriHelper.cs
- Compilation.cs
- Win32SafeHandles.cs
- DocumentSequenceHighlightLayer.cs
- Rect.cs
- MD5.cs
- RuleEngine.cs
- AttributeConverter.cs
- Literal.cs
- Debugger.cs
- DataColumn.cs
- CodeGeneratorOptions.cs
- WebPartMinimizeVerb.cs
- PipeConnection.cs
- FixedSOMLineRanges.cs
- OleDbMetaDataFactory.cs
- XmlSchemaExporter.cs
- DatatypeImplementation.cs
- OrderedDictionaryStateHelper.cs
- WindowsScrollBarBits.cs
- ScriptControlManager.cs
- DescriptionAttribute.cs
- EraserBehavior.cs
- OdbcCommandBuilder.cs
- RequestTimeoutManager.cs
- dbenumerator.cs
- InlinedAggregationOperator.cs
- ColorEditor.cs
- WizardStepBase.cs
- Literal.cs
- TableRowsCollectionEditor.cs
- SendActivityDesigner.cs
- Publisher.cs
- DiffuseMaterial.cs
- CompareValidator.cs
- DataGridHelper.cs
- HitTestWithPointDrawingContextWalker.cs
- SQLInt16Storage.cs
- SplitterEvent.cs
- SqlNodeAnnotations.cs
- TokenBasedSet.cs
- FieldDescriptor.cs
- FontStretch.cs
- WorkflowPrinting.cs
- XmlUnspecifiedAttribute.cs
- FlowDocumentPage.cs
- BoundingRectTracker.cs
- SoapIgnoreAttribute.cs
- ClassHandlersStore.cs
- XMLDiffLoader.cs
- GetIndexBinder.cs
- DiagnosticsConfigurationHandler.cs