Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusButton.cs / 1305600 / 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
- ClientEventManager.cs
- TransformationRules.cs
- MimeTypeMapper.cs
- EdmToObjectNamespaceMap.cs
- filewebrequest.cs
- VariableExpressionConverter.cs
- ToggleButtonAutomationPeer.cs
- StoreItemCollection.Loader.cs
- SessionStateSection.cs
- WebPartChrome.cs
- TemplateManager.cs
- BitmapEffectDrawing.cs
- DrawingVisualDrawingContext.cs
- DetailsViewUpdatedEventArgs.cs
- RoutedPropertyChangedEventArgs.cs
- PropertyTabChangedEvent.cs
- PEFileEvidenceFactory.cs
- CatalogZoneAutoFormat.cs
- sapiproxy.cs
- WmlPanelAdapter.cs
- AssemblyAssociatedContentFileAttribute.cs
- RootBrowserWindowProxy.cs
- ICspAsymmetricAlgorithm.cs
- DataGridViewColumn.cs
- SQLBytesStorage.cs
- ReflectionTypeLoadException.cs
- DbDataAdapter.cs
- LinqDataSourceEditData.cs
- SerializerDescriptor.cs
- FormView.cs
- CompilerInfo.cs
- TableAutomationPeer.cs
- VersionPair.cs
- DesignerToolStripControlHost.cs
- LoadedOrUnloadedOperation.cs
- PropertyItemInternal.cs
- PropertyFilter.cs
- DataTransferEventArgs.cs
- ThemeableAttribute.cs
- ExtensionsSection.cs
- CallSite.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- WindowsToolbarAsMenu.cs
- Accessible.cs
- ClientTargetCollection.cs
- WebPartConnectionsCloseVerb.cs
- WorkflowApplicationTerminatedException.cs
- ToolStripItemClickedEventArgs.cs
- TimeStampChecker.cs
- ExtendLockCommand.cs
- HttpVersion.cs
- ColumnCollection.cs
- Screen.cs
- SizeAnimationUsingKeyFrames.cs
- OrthographicCamera.cs
- ContentOperations.cs
- TypeUnloadedException.cs
- ServiceObjectContainer.cs
- BindingSource.cs
- CompositeFontFamily.cs
- PlanCompiler.cs
- Registry.cs
- SqlClientWrapperSmiStream.cs
- PropertyConverter.cs
- Int32Animation.cs
- ShapingWorkspace.cs
- CodeEventReferenceExpression.cs
- WebRequest.cs
- ComponentEditorPage.cs
- FontStyle.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- ApplicationException.cs
- FillErrorEventArgs.cs
- InkCanvasInnerCanvas.cs
- WSSecureConversation.cs
- LambdaExpression.cs
- listitem.cs
- ITreeGenerator.cs
- NamespaceInfo.cs
- DockAndAnchorLayout.cs
- ToolStripItemCollection.cs
- Operand.cs
- ResourceLoader.cs
- Compress.cs
- PrefixHandle.cs
- BindingContext.cs
- EntityDataSourceEntitySetNameItem.cs
- ReadOnlyTernaryTree.cs
- CfgParser.cs
- DataGridViewBand.cs
- SharedPersonalizationStateInfo.cs
- ZeroOpNode.cs
- Translator.cs
- DocumentApplicationJournalEntry.cs
- WinEventQueueItem.cs
- ListDictionaryInternal.cs
- EntityRecordInfo.cs
- ContentOperations.cs
- Pointer.cs
- MailHeaderInfo.cs