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 / StylusPointProperty.cs / 1 / StylusPointProperty.cs
//------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Input; using System.Globalization; using System.Windows.Media; using System.Collections.Generic; using SR = MS.Internal.PresentationCore.SR; using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ////// StylusPointProperty /// public class StylusPointProperty { ////// Instance data /// private Guid _id; private bool _isButton; ////// StylusPointProperty /// /// identifier /// isButton public StylusPointProperty(Guid identifier, bool isButton) { Initialize(identifier, isButton); } ////// StylusPointProperty /// /// ///Protected - used by the StylusPointPropertyInfo ctor protected StylusPointProperty(StylusPointProperty stylusPointProperty) { if (null == stylusPointProperty) { throw new ArgumentNullException("stylusPointProperty"); } Initialize(stylusPointProperty.Id, stylusPointProperty.IsButton); } ////// Common ctor helper /// /// identifier /// isButton private void Initialize(Guid identifier, bool isButton) { // // validate isButton for known guids // if (StylusPointPropertyIds.IsKnownButton(identifier)) { if (!isButton) { //error, this is a known button throw new ArgumentException(SR.Get(SRID.InvalidIsButtonForId), "isButton"); } } else { if (StylusPointPropertyIds.IsKnownId(identifier) && isButton) { //error, this is a known guid that is NOT a button throw new ArgumentException(SR.Get(SRID.InvalidIsButtonForId2), "isButton"); } } _id = identifier; _isButton = isButton; } ////// Id /// public Guid Id { get { return _id; } } ////// IsButton /// public bool IsButton { get { return _isButton; } } ////// Returns a human readable string representation /// public override string ToString() { return "{Id=" + StylusPointPropertyIds.GetStringRepresentation(_id) + ", IsButton=" + _isButton.ToString(CultureInfo.InvariantCulture) + "}"; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Input; using System.Globalization; using System.Windows.Media; using System.Collections.Generic; using SR = MS.Internal.PresentationCore.SR; using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ////// StylusPointProperty /// public class StylusPointProperty { ////// Instance data /// private Guid _id; private bool _isButton; ////// StylusPointProperty /// /// identifier /// isButton public StylusPointProperty(Guid identifier, bool isButton) { Initialize(identifier, isButton); } ////// StylusPointProperty /// /// ///Protected - used by the StylusPointPropertyInfo ctor protected StylusPointProperty(StylusPointProperty stylusPointProperty) { if (null == stylusPointProperty) { throw new ArgumentNullException("stylusPointProperty"); } Initialize(stylusPointProperty.Id, stylusPointProperty.IsButton); } ////// Common ctor helper /// /// identifier /// isButton private void Initialize(Guid identifier, bool isButton) { // // validate isButton for known guids // if (StylusPointPropertyIds.IsKnownButton(identifier)) { if (!isButton) { //error, this is a known button throw new ArgumentException(SR.Get(SRID.InvalidIsButtonForId), "isButton"); } } else { if (StylusPointPropertyIds.IsKnownId(identifier) && isButton) { //error, this is a known guid that is NOT a button throw new ArgumentException(SR.Get(SRID.InvalidIsButtonForId2), "isButton"); } } _id = identifier; _isButton = isButton; } ////// Id /// public Guid Id { get { return _id; } } ////// IsButton /// public bool IsButton { get { return _isButton; } } ////// Returns a human readable string representation /// public override string ToString() { return "{Id=" + StylusPointPropertyIds.GetStringRepresentation(_id) + ", IsButton=" + _isButton.ToString(CultureInfo.InvariantCulture) + "}"; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UniqueIdentifierService.cs
- LinqDataSourceEditData.cs
- PointCollectionValueSerializer.cs
- ToolStripTextBox.cs
- TrustManagerPromptUI.cs
- CommandBinding.cs
- WorkflowQueueInfo.cs
- HttpCapabilitiesSectionHandler.cs
- FilterableData.cs
- ListBoxChrome.cs
- ImageClickEventArgs.cs
- PromptEventArgs.cs
- OutputCacheSettings.cs
- EmbossBitmapEffect.cs
- Walker.cs
- DataGridBoolColumn.cs
- InkCanvasFeedbackAdorner.cs
- MonthChangedEventArgs.cs
- OpenTypeLayoutCache.cs
- ApplicationFileParser.cs
- TypedTableBaseExtensions.cs
- SimpleBitVector32.cs
- EventSinkHelperWriter.cs
- Environment.cs
- ComPlusServiceLoader.cs
- ActivationArguments.cs
- XsltException.cs
- InkPresenterAutomationPeer.cs
- DelegateSerializationHolder.cs
- CodeMemberProperty.cs
- DataRecordInternal.cs
- OracleEncoding.cs
- SqlProfileProvider.cs
- BackgroundWorker.cs
- SqlUdtInfo.cs
- ITextView.cs
- RegexCode.cs
- SystemIcmpV6Statistics.cs
- DataGridViewEditingControlShowingEventArgs.cs
- DataGridViewRowStateChangedEventArgs.cs
- DependentList.cs
- Size3DConverter.cs
- PropertyConverter.cs
- SoapConverter.cs
- GridViewEditEventArgs.cs
- ResourceContainer.cs
- MouseDevice.cs
- DataControlCommands.cs
- RelationshipManager.cs
- PageEventArgs.cs
- PolyLineSegment.cs
- WindowsStatusBar.cs
- AssemblyCache.cs
- WindowsListViewGroupSubsetLink.cs
- ExpressionVisitorHelpers.cs
- SHA1.cs
- RunInstallerAttribute.cs
- Solver.cs
- SystemUnicastIPAddressInformation.cs
- DecoderNLS.cs
- OdbcDataAdapter.cs
- RuleSetDialog.Designer.cs
- XmlSchemaProviderAttribute.cs
- OLEDB_Util.cs
- EditorPartDesigner.cs
- ShaderEffect.cs
- JsonReader.cs
- IItemContainerGenerator.cs
- EncryptedXml.cs
- LayoutExceptionEventArgs.cs
- BamlLocalizationDictionary.cs
- ListViewGroupConverter.cs
- HttpApplication.cs
- IDReferencePropertyAttribute.cs
- PointKeyFrameCollection.cs
- Matrix.cs
- RequestCache.cs
- PatternMatcher.cs
- TextBox.cs
- GeometryGroup.cs
- VectorCollectionValueSerializer.cs
- PTProvider.cs
- DataGridViewRowPrePaintEventArgs.cs
- SyndicationItemFormatter.cs
- _HTTPDateParse.cs
- SecurityPermission.cs
- XPathItem.cs
- WorkflowMarkupSerializer.cs
- ViewPort3D.cs
- PasswordDeriveBytes.cs
- HandlerBase.cs
- HttpListenerResponse.cs
- PostBackOptions.cs
- RequestBringIntoViewEventArgs.cs
- SimpleModelProvider.cs
- MessagingDescriptionAttribute.cs
- DmlSqlGenerator.cs
- ListManagerBindingsCollection.cs
- TextMarkerSource.cs
- SystemIPGlobalStatistics.cs