Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Documents / RtfToken.cs / 1 / 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
- AttachmentCollection.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- GridToolTip.cs
- Wizard.cs
- AppSettings.cs
- NotConverter.cs
- HtmlMobileTextWriter.cs
- TdsParserHelperClasses.cs
- InkCanvasAutomationPeer.cs
- NullableDoubleMinMaxAggregationOperator.cs
- KeyValuePairs.cs
- HotSpotCollection.cs
- TreeNodeConverter.cs
- Span.cs
- Border.cs
- Parameter.cs
- SByte.cs
- Visitors.cs
- StringBuilder.cs
- InvalidAsynchronousStateException.cs
- xmlglyphRunInfo.cs
- ItemsControl.cs
- TreeNodeEventArgs.cs
- SyndicationSerializer.cs
- Double.cs
- DataRowChangeEvent.cs
- Point3DCollection.cs
- WebEncodingValidator.cs
- WebRequestModulesSection.cs
- HtmlWindow.cs
- TextAdaptor.cs
- DataServiceConfiguration.cs
- NetSectionGroup.cs
- Wildcard.cs
- VariableQuery.cs
- SqlDataSourceSummaryPanel.cs
- FixedSOMTextRun.cs
- SecurityDescriptor.cs
- ListViewInsertEventArgs.cs
- WebHttpElement.cs
- AdvancedBindingPropertyDescriptor.cs
- CreatingCookieEventArgs.cs
- sortedlist.cs
- CharacterShapingProperties.cs
- PropertyGeneratedEventArgs.cs
- TraceHandler.cs
- precedingsibling.cs
- Animatable.cs
- ObjectHelper.cs
- ByteConverter.cs
- CapabilitiesUse.cs
- MdImport.cs
- WindowsIPAddress.cs
- AuthorizationRule.cs
- ActionMessageFilter.cs
- CompositeFontFamily.cs
- VirtualDirectoryMappingCollection.cs
- FloaterBaseParagraph.cs
- TextBoxBase.cs
- WorkflowServiceBehavior.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- WindowsGraphics2.cs
- TreeNodeBinding.cs
- DesignerGeometryHelper.cs
- DeploymentSectionCache.cs
- SqlLiftIndependentRowExpressions.cs
- webeventbuffer.cs
- UnsafeNativeMethods.cs
- Int16Animation.cs
- ConfigurationConverterBase.cs
- Bits.cs
- TraceLog.cs
- PrimitiveList.cs
- TaskFileService.cs
- RuntimeIdentifierPropertyAttribute.cs
- XmlUTF8TextReader.cs
- DataMemberFieldEditor.cs
- ExpandoClass.cs
- ToolStripPanelSelectionBehavior.cs
- RequiredAttributeAttribute.cs
- ScalarOps.cs
- DiagnosticsConfiguration.cs
- PageBreakRecord.cs
- DocumentXPathNavigator.cs
- TextRunTypographyProperties.cs
- XsdDateTime.cs
- fixedPageContentExtractor.cs
- EdmEntityTypeAttribute.cs
- IxmlLineInfo.cs
- LongSumAggregationOperator.cs
- TemplateNameScope.cs
- PrimitiveType.cs
- DataSourceDesigner.cs
- ValidationRuleCollection.cs
- ConstantCheck.cs
- IdentifierCollection.cs
- SqlClientPermission.cs
- TemplateBindingExpressionConverter.cs
- UIAgentRequest.cs
- ProfileSettings.cs