Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- Serializer.cs
- UrlPropertyAttribute.cs
- SchemaImporterExtensionElement.cs
- DictionarySectionHandler.cs
- FrameworkContentElementAutomationPeer.cs
- TextBoxAutoCompleteSourceConverter.cs
- nulltextnavigator.cs
- CustomPopupPlacement.cs
- CollectionViewGroup.cs
- ApplicationCommands.cs
- Control.cs
- KeysConverter.cs
- PropertyValueUIItem.cs
- CommittableTransaction.cs
- AvtEvent.cs
- ControlPaint.cs
- PerformanceCounterPermissionAttribute.cs
- StorageComplexPropertyMapping.cs
- ProcessModelSection.cs
- TileBrush.cs
- CodeFieldReferenceExpression.cs
- UiaCoreTypesApi.cs
- ClientSideQueueItem.cs
- KeyMatchBuilder.cs
- StandardCommands.cs
- ColorTranslator.cs
- AbandonedMutexException.cs
- SystemGatewayIPAddressInformation.cs
- RulePatternOps.cs
- ProcessThreadDesigner.cs
- PeekCompletedEventArgs.cs
- ToolboxDataAttribute.cs
- AudioDeviceOut.cs
- ConfigurationStrings.cs
- TreeViewItemAutomationPeer.cs
- SQLDouble.cs
- Version.cs
- PtsHost.cs
- FlowLayout.cs
- HttpFormatExtensions.cs
- TextStore.cs
- SqlSelectStatement.cs
- TypeLoadException.cs
- TextTreePropertyUndoUnit.cs
- HashHelper.cs
- UrlAuthorizationModule.cs
- OutOfProcStateClientManager.cs
- TraceListeners.cs
- VarRefManager.cs
- CustomBinding.cs
- TransactionState.cs
- Console.cs
- GetKeyedHashRequest.cs
- TraceContextRecord.cs
- SecurityTokenResolver.cs
- TitleStyle.cs
- ToolStripScrollButton.cs
- LineServicesCallbacks.cs
- TextAdaptor.cs
- HttpRequest.cs
- CodeSubDirectoriesCollection.cs
- ParameterToken.cs
- XmlSchemaProviderAttribute.cs
- QilChoice.cs
- Int16KeyFrameCollection.cs
- ChannelManager.cs
- ExplicitDiscriminatorMap.cs
- XmlWriterSettings.cs
- DesignTimeParseData.cs
- OperationInfoBase.cs
- FontFamilyConverter.cs
- SafeProcessHandle.cs
- SystemColorTracker.cs
- PageStatePersister.cs
- UserPreference.cs
- ResourceProperty.cs
- ConfigurationLockCollection.cs
- ExceptionTranslationTable.cs
- BatchServiceHost.cs
- CodeTypeMember.cs
- DataGridViewCellStyleConverter.cs
- isolationinterop.cs
- GlyphRunDrawing.cs
- MenuItemBinding.cs
- WinInetCache.cs
- BuildManagerHost.cs
- ProfileSettingsCollection.cs
- AspProxy.cs
- WebBaseEventKeyComparer.cs
- Expressions.cs
- FontStretches.cs
- CodeDomSerializerException.cs
- StreamGeometry.cs
- ObjectIDGenerator.cs
- CallbackValidator.cs
- SystemIcmpV4Statistics.cs
- EdmFunctionAttribute.cs
- WebPermission.cs
- ChangeNode.cs
- PerformanceCounterPermissionEntryCollection.cs