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
- CultureInfo.cs
- EdmItemCollection.OcAssemblyCache.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- ExecutedRoutedEventArgs.cs
- XPathParser.cs
- ScrollBar.cs
- TypeHelpers.cs
- MessageQueueEnumerator.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ComponentChangingEvent.cs
- PolyBezierSegment.cs
- WebPartChrome.cs
- EntityDataSourceWrapper.cs
- BridgeDataRecord.cs
- ByteStream.cs
- DataListItem.cs
- SharedPersonalizationStateInfo.cs
- ImageDrawing.cs
- PositiveTimeSpanValidator.cs
- SamlAudienceRestrictionCondition.cs
- ValidatorCompatibilityHelper.cs
- OleDbException.cs
- WpfPayload.cs
- LayoutManager.cs
- RtfToXamlReader.cs
- XmlQueryContext.cs
- WpfKnownMemberInvoker.cs
- FilteredSchemaElementLookUpTable.cs
- QueryOptionExpression.cs
- UniqueIdentifierService.cs
- StringToken.cs
- tibetanshape.cs
- InvalidCastException.cs
- SqlDependency.cs
- DataControlPagerLinkButton.cs
- DefaultEventAttribute.cs
- AttributeCollection.cs
- XamlPathDataSerializer.cs
- ISCIIEncoding.cs
- ParseNumbers.cs
- InProcStateClientManager.cs
- CharacterMetrics.cs
- SerialPinChanges.cs
- ItemsPanelTemplate.cs
- NameValuePair.cs
- EditorZone.cs
- ChannelTraceRecord.cs
- RegistryPermission.cs
- ITextView.cs
- SqlCachedBuffer.cs
- CheckBoxBaseAdapter.cs
- XmlQueryRuntime.cs
- ImageAttributes.cs
- UdpSocketReceiveManager.cs
- ConfigurationSchemaErrors.cs
- PackWebResponse.cs
- DictionarySectionHandler.cs
- CalendarDay.cs
- XmlSchemaGroupRef.cs
- DataGridViewColumnHeaderCell.cs
- ErrorStyle.cs
- Vector3dCollection.cs
- ResourceDictionary.cs
- SimpleType.cs
- Maps.cs
- FileRecordSequence.cs
- DesignTimeSiteMapProvider.cs
- XsltOutput.cs
- InvalidateEvent.cs
- ProcessThreadCollection.cs
- CapiSymmetricAlgorithm.cs
- NamespaceCollection.cs
- LoopExpression.cs
- FrameworkElementFactory.cs
- SystemIPInterfaceProperties.cs
- FlowPosition.cs
- XhtmlStyleClass.cs
- ImageAutomationPeer.cs
- FieldToken.cs
- OrderedEnumerableRowCollection.cs
- x509store.cs
- XmlAnyElementAttributes.cs
- DataGridViewLinkColumn.cs
- CompositeScriptReference.cs
- SiteMapPath.cs
- Animatable.cs
- DateTimeConverter.cs
- ExecutionEngineException.cs
- ZipIOLocalFileHeader.cs
- DeferredTextReference.cs
- StateMachineSubscription.cs
- CodeTypeOfExpression.cs
- SiteMapPath.cs
- SchemaType.cs
- IBuiltInEvidence.cs
- DesigntimeLicenseContextSerializer.cs
- CompositeControl.cs
- Completion.cs
- ViewCellRelation.cs
- ConnectionStringSettingsCollection.cs