Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Documents / RtfToken.cs / 1305600 / RtfToken.cs
//---------------------------------------------------------------------------- // // File: RtfToken.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Rtf token that will specify the rtf token type, control and name. // //--------------------------------------------------------------------------- namespace System.Windows.Documents { ////// Rtf token that include rtf token type, control, name and parameter value. /// internal class RtfToken { #region Internal Consts //----------------------------------------------------- // // Internal Consts // //----------------------------------------------------- internal const long INVALID_PARAMETER = 0x10000000; #endregion Internal Consts //------------------------------------------------------ // // Constructors // //----------------------------------------------------- #region Constructors ////// /// internal RtfToken() { } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //------------------------------------------------------ #region Internal Methods internal void Empty() { _type = RtfTokenType.TokenInvalid; _rtfControlWordInfo = null; _parameter = INVALID_PARAMETER; _text = ""; } #endregion Internal Methods //----------------------------------------------------- // // Internal Properties // //------------------------------------------------------ #region Internal Properties internal RtfTokenType Type { get { return _type; } set { _type = value; } } internal RtfControlWordInfo RtfControlWordInfo { get { return _rtfControlWordInfo; } set { _rtfControlWordInfo = value; } } internal long Parameter { get { return HasParameter ? _parameter : 0; } set { _parameter = value; } } internal string Text { get { return _text; } set { _text = value; } } internal long ToggleValue { get { return HasParameter ? Parameter : 1; } } internal bool FlagValue { get { return (!HasParameter || (HasParameter && Parameter > 0) ? true : false); } } internal bool HasParameter { get { return _parameter != INVALID_PARAMETER; } } #endregion Internal Properties //----------------------------------------------------- // // Private Fields // //----------------------------------------------------- #region Private Fields private RtfTokenType _type; private RtfControlWordInfo _rtfControlWordInfo; private long _parameter; private string _text; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // File: RtfToken.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Rtf token that will specify the rtf token type, control and name. // //--------------------------------------------------------------------------- namespace System.Windows.Documents { ////// Rtf token that include rtf token type, control, name and parameter value. /// internal class RtfToken { #region Internal Consts //----------------------------------------------------- // // Internal Consts // //----------------------------------------------------- internal const long INVALID_PARAMETER = 0x10000000; #endregion Internal Consts //------------------------------------------------------ // // Constructors // //----------------------------------------------------- #region Constructors ////// /// internal RtfToken() { } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //------------------------------------------------------ #region Internal Methods internal void Empty() { _type = RtfTokenType.TokenInvalid; _rtfControlWordInfo = null; _parameter = INVALID_PARAMETER; _text = ""; } #endregion Internal Methods //----------------------------------------------------- // // Internal Properties // //------------------------------------------------------ #region Internal Properties internal RtfTokenType Type { get { return _type; } set { _type = value; } } internal RtfControlWordInfo RtfControlWordInfo { get { return _rtfControlWordInfo; } set { _rtfControlWordInfo = value; } } internal long Parameter { get { return HasParameter ? _parameter : 0; } set { _parameter = value; } } internal string Text { get { return _text; } set { _text = value; } } internal long ToggleValue { get { return HasParameter ? Parameter : 1; } } internal bool FlagValue { get { return (!HasParameter || (HasParameter && Parameter > 0) ? true : false); } } internal bool HasParameter { get { return _parameter != INVALID_PARAMETER; } } #endregion Internal Properties //----------------------------------------------------- // // Private Fields // //----------------------------------------------------- #region Private Fields private RtfTokenType _type; private RtfControlWordInfo _rtfControlWordInfo; private long _parameter; private string _text; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlInternalConnectionSmi.cs
- BrushMappingModeValidation.cs
- AspCompat.cs
- ApplicationServiceHelper.cs
- EventMappingSettingsCollection.cs
- InternalResources.cs
- GlobalProxySelection.cs
- ErrorWrapper.cs
- RulePatternOps.cs
- AssociationSetMetadata.cs
- ResXResourceReader.cs
- SequentialActivityDesigner.cs
- SqlProvider.cs
- ScaleTransform.cs
- TextElementEditingBehaviorAttribute.cs
- InvalidAsynchronousStateException.cs
- ScriptMethodAttribute.cs
- Composition.cs
- LogLogRecord.cs
- HtmlWindowCollection.cs
- DataMember.cs
- SpecialFolderEnumConverter.cs
- MimePart.cs
- SqlConnectionHelper.cs
- SmtpTransport.cs
- EventDescriptor.cs
- LeafCellTreeNode.cs
- BooleanToVisibilityConverter.cs
- ActivityXRefConverter.cs
- BulletChrome.cs
- Pts.cs
- streamingZipPartStream.cs
- CatalogPartChrome.cs
- GiveFeedbackEvent.cs
- BuildManager.cs
- NameValueCollection.cs
- TableLayout.cs
- DataServiceRequestOfT.cs
- OdbcRowUpdatingEvent.cs
- EDesignUtil.cs
- ZipIOExtraFieldPaddingElement.cs
- ManagedWndProcTracker.cs
- SimpleExpression.cs
- ColorMap.cs
- DocumentApplication.cs
- AvTraceFormat.cs
- TableDetailsRow.cs
- DataBindingHandlerAttribute.cs
- OleDbDataReader.cs
- Triangle.cs
- DataTemplateKey.cs
- SqlDelegatedTransaction.cs
- NavigationPropertySingletonExpression.cs
- ToolStripMenuItem.cs
- TransportSecurityProtocolFactory.cs
- ToolStripSeparatorRenderEventArgs.cs
- SiteIdentityPermission.cs
- ManagementExtension.cs
- ServiceCredentialsSecurityTokenManager.cs
- FileDialog.cs
- ConfigXmlSignificantWhitespace.cs
- SettingsAttributes.cs
- DataGridViewCellLinkedList.cs
- StrongTypingException.cs
- ObjectHandle.cs
- CodeArgumentReferenceExpression.cs
- COM2Enum.cs
- XmlElementList.cs
- Rule.cs
- XmlWrappingWriter.cs
- Overlapped.cs
- DebugHandleTracker.cs
- PTUtility.cs
- PrtCap_Builder.cs
- DataControlFieldHeaderCell.cs
- ObjectQuery.cs
- GraphicsContext.cs
- AsymmetricKeyExchangeDeformatter.cs
- Roles.cs
- Exceptions.cs
- ToolStripContentPanel.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- FtpWebResponse.cs
- PopupControlService.cs
- VerifyHashRequest.cs
- SmiContextFactory.cs
- HMACRIPEMD160.cs
- XmlDocumentType.cs
- EditorBrowsableAttribute.cs
- LinqDataView.cs
- PageBreakRecord.cs
- UnsafeNativeMethods.cs
- CultureInfoConverter.cs
- StreamResourceInfo.cs
- MailWriter.cs
- ContentOperations.cs
- DbMetaDataFactory.cs
- DisableDpiAwarenessAttribute.cs
- DataRow.cs
- ConnectorDragDropGlyph.cs