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
- OdbcErrorCollection.cs
- IApplicationTrustManager.cs
- PropertiesTab.cs
- SimpleWorkerRequest.cs
- MailAddress.cs
- TextTreeNode.cs
- FileSystemInfo.cs
- DynamicILGenerator.cs
- DocumentOrderQuery.cs
- ServicePointManagerElement.cs
- OSFeature.cs
- SqlInternalConnection.cs
- AssemblyCache.cs
- ShapingEngine.cs
- EntityDataSourceChangedEventArgs.cs
- BasicHttpMessageSecurityElement.cs
- WebZone.cs
- File.cs
- ConfigurationLockCollection.cs
- SystemResources.cs
- OleDbConnection.cs
- TextDecorationCollectionConverter.cs
- ServiceProviders.cs
- XmlAttributeProperties.cs
- AnnotationDocumentPaginator.cs
- ToolBarButtonClickEvent.cs
- DependencyObject.cs
- WmlCalendarAdapter.cs
- WebPartVerb.cs
- AutoScrollHelper.cs
- SQLString.cs
- URLAttribute.cs
- IISMapPath.cs
- XmlReaderDelegator.cs
- Environment.cs
- ExpandCollapseProviderWrapper.cs
- Converter.cs
- GridErrorDlg.cs
- DataGridViewIntLinkedList.cs
- DataGridViewTopRowAccessibleObject.cs
- RoutedPropertyChangedEventArgs.cs
- VisualTarget.cs
- SystemFonts.cs
- DataMember.cs
- Tablet.cs
- SelfIssuedAuthRSACryptoProvider.cs
- TrackPointCollection.cs
- RankException.cs
- sqlinternaltransaction.cs
- GridSplitterAutomationPeer.cs
- ToolTipService.cs
- IdentityReference.cs
- ExpressionBinding.cs
- ExpressionList.cs
- OleDbCommandBuilder.cs
- DefaultValueAttribute.cs
- PackageStore.cs
- InvokeWebServiceDesigner.cs
- Int32Rect.cs
- OpenFileDialog.cs
- Int64KeyFrameCollection.cs
- EpmTargetPathSegment.cs
- FolderBrowserDialog.cs
- MappingModelBuildProvider.cs
- IncomingWebResponseContext.cs
- AuthenticationModulesSection.cs
- Button.cs
- AccessedThroughPropertyAttribute.cs
- UriScheme.cs
- Image.cs
- ModuleConfigurationInfo.cs
- PeerNode.cs
- CapabilitiesRule.cs
- SchemaElementLookUpTableEnumerator.cs
- DataRecordInfo.cs
- SqlNotificationEventArgs.cs
- EngineSiteSapi.cs
- TransactionTable.cs
- SecurityValidationBehavior.cs
- TextLine.cs
- ConfigurationLockCollection.cs
- LongValidatorAttribute.cs
- DefaultValueAttribute.cs
- IntersectQueryOperator.cs
- MessageEnumerator.cs
- ResourceAttributes.cs
- SwitchLevelAttribute.cs
- Matrix.cs
- DbReferenceCollection.cs
- EntityDataSourceContainerNameItem.cs
- WebPartChrome.cs
- Statements.cs
- NullableDoubleAverageAggregationOperator.cs
- CqlParser.cs
- DataObjectMethodAttribute.cs
- ArglessEventHandlerProxy.cs
- WebPartCancelEventArgs.cs
- SafeNativeMethods.cs
- ErrorWebPart.cs
- RootBrowserWindowAutomationPeer.cs