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
- PDBReader.cs
- MessageQueueKey.cs
- SendActivityDesignerTheme.cs
- ActivityExecutionContext.cs
- SerializerDescriptor.cs
- FacetChecker.cs
- XamlFigureLengthSerializer.cs
- TypeSystemProvider.cs
- Graphics.cs
- BulletChrome.cs
- Int32Animation.cs
- Rules.cs
- EmptyStringExpandableObjectConverter.cs
- XmlBinaryReader.cs
- ResourceProviderFactory.cs
- SelectionGlyph.cs
- DataGridToolTip.cs
- NotifyCollectionChangedEventArgs.cs
- CompoundFileDeflateTransform.cs
- RelatedPropertyManager.cs
- RequestCachingSection.cs
- TemplateModeChangedEventArgs.cs
- HTMLTagNameToTypeMapper.cs
- MSG.cs
- StandardBindingElementCollection.cs
- CodeFieldReferenceExpression.cs
- PerspectiveCamera.cs
- XmlWrappingReader.cs
- DataSourceSelectArguments.cs
- OutOfProcStateClientManager.cs
- GACMembershipCondition.cs
- ConfigurationSectionGroup.cs
- SafeLibraryHandle.cs
- DiscriminatorMap.cs
- SiteMapNodeItem.cs
- LocalFileSettingsProvider.cs
- RectangleGeometry.cs
- Mapping.cs
- TextBoxBase.cs
- BeginEvent.cs
- WindowsImpersonationContext.cs
- StringUtil.cs
- DragDropManager.cs
- WebReferencesBuildProvider.cs
- ContentValidator.cs
- CssTextWriter.cs
- InvalidOleVariantTypeException.cs
- CodeCatchClauseCollection.cs
- StyleXamlTreeBuilder.cs
- SurrogateSelector.cs
- MSAAWinEventWrap.cs
- XmlSchemaRedefine.cs
- ValueUtilsSmi.cs
- SingleConverter.cs
- TextPenaltyModule.cs
- RelationshipType.cs
- Calendar.cs
- httpserverutility.cs
- SecurityContextTokenValidationException.cs
- SelectorAutomationPeer.cs
- RemotingAttributes.cs
- CommandHelpers.cs
- DescendentsWalkerBase.cs
- SafeBuffer.cs
- TrustLevelCollection.cs
- EdmTypeAttribute.cs
- DataControlFieldHeaderCell.cs
- FontStretches.cs
- File.cs
- HtmlTernaryTree.cs
- PersonalizablePropertyEntry.cs
- SqlDataSourceView.cs
- OdbcReferenceCollection.cs
- OwnerDrawPropertyBag.cs
- SecurityState.cs
- HandledMouseEvent.cs
- TextBoxView.cs
- TokenizerHelper.cs
- UrlAuthorizationModule.cs
- PkcsUtils.cs
- TextEditorLists.cs
- SiteMapDataSource.cs
- basenumberconverter.cs
- StreamWriter.cs
- CodeIterationStatement.cs
- DateTimeFormatInfo.cs
- CultureSpecificStringDictionary.cs
- HandleRef.cs
- TextEditorParagraphs.cs
- RegexMatchCollection.cs
- XMLSyntaxException.cs
- WebBrowserContainer.cs
- MenuItemAutomationPeer.cs
- DataBinder.cs
- XmlBinaryReaderSession.cs
- SByteStorage.cs
- MatchNoneMessageFilter.cs
- BatchParser.cs
- TemplatedWizardStep.cs
- ModelServiceImpl.cs