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
- ThreadPool.cs
- Convert.cs
- XmlSchemaSimpleContent.cs
- ActivityBindForm.Designer.cs
- Hex.cs
- StreamWithDictionary.cs
- ReliableMessagingHelpers.cs
- TimeSpanSecondsConverter.cs
- Intellisense.cs
- BitStack.cs
- XmlNavigatorStack.cs
- NonBatchDirectoryCompiler.cs
- TypedAsyncResult.cs
- DefaultBinder.cs
- DocComment.cs
- CommandPlan.cs
- UserPersonalizationStateInfo.cs
- CrossSiteScriptingValidation.cs
- SizeAnimationUsingKeyFrames.cs
- DocumentApplicationJournalEntry.cs
- CheckBoxPopupAdapter.cs
- Latin1Encoding.cs
- ReflectPropertyDescriptor.cs
- PagesSection.cs
- StrongNameMembershipCondition.cs
- VirtualPath.cs
- TraceShell.cs
- InkCanvas.cs
- SafePEFileHandle.cs
- SqlDataSourceFilteringEventArgs.cs
- XMLSyntaxException.cs
- Helpers.cs
- DataGridComboBoxColumn.cs
- OleDbStruct.cs
- BuildProvider.cs
- ProtocolsConfiguration.cs
- WinInetCache.cs
- SqlProviderManifest.cs
- XmlHierarchicalEnumerable.cs
- DropSourceBehavior.cs
- Compilation.cs
- SchemaComplexType.cs
- JapaneseCalendar.cs
- WmpBitmapEncoder.cs
- ProcessHostConfigUtils.cs
- WorkflowClientDeliverMessageWrapper.cs
- WorkBatch.cs
- CategoryGridEntry.cs
- TraceEventCache.cs
- ResXResourceReader.cs
- TextTrailingWordEllipsis.cs
- ExceptionHandlersDesigner.cs
- PingOptions.cs
- PassportAuthenticationEventArgs.cs
- IncomingWebResponseContext.cs
- Encoder.cs
- CodeMemberMethod.cs
- MergeFailedEvent.cs
- ButtonColumn.cs
- SharedStatics.cs
- bidPrivateBase.cs
- CaseInsensitiveOrdinalStringComparer.cs
- MessageDirection.cs
- XmlSerializableWriter.cs
- Rotation3D.cs
- WmlFormAdapter.cs
- Profiler.cs
- CapabilitiesPattern.cs
- TextServicesLoader.cs
- SystemUdpStatistics.cs
- SemanticBasicElement.cs
- StorageMappingItemCollection.cs
- Mouse.cs
- Path.cs
- ImageSource.cs
- FormsIdentity.cs
- CodeSpit.cs
- FormClosedEvent.cs
- MappedMetaModel.cs
- FixedSOMFixedBlock.cs
- CodeDefaultValueExpression.cs
- CompilerGlobalScopeAttribute.cs
- ComboBox.cs
- EntityClientCacheEntry.cs
- PackageRelationshipCollection.cs
- StreamSecurityUpgradeAcceptorBase.cs
- AnnotationObservableCollection.cs
- EtwProvider.cs
- DataColumnCollection.cs
- DefaultAuthorizationContext.cs
- PersianCalendar.cs
- CodeGotoStatement.cs
- RuleEngine.cs
- SQLSingle.cs
- SqlConnectionStringBuilder.cs
- GlobalProxySelection.cs
- CodeIterationStatement.cs
- OdbcUtils.cs
- GcSettings.cs
- AppDomainAttributes.cs