Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FrugalMap.cs
- CollectionContainer.cs
- ZipPackage.cs
- FrameworkElement.cs
- MessageSmuggler.cs
- DataMember.cs
- SystemIPInterfaceProperties.cs
- SqlGatherConsumedAliases.cs
- Int64KeyFrameCollection.cs
- SerializationHelper.cs
- HandledEventArgs.cs
- _IPv4Address.cs
- WebPartsPersonalization.cs
- ScrollBar.cs
- TreeViewAutomationPeer.cs
- MonthChangedEventArgs.cs
- TemplateBindingExpression.cs
- Stack.cs
- ContractMethodParameterInfo.cs
- DataContext.cs
- InputLanguageCollection.cs
- ScrollItemPattern.cs
- XmlUrlResolver.cs
- GlyphManager.cs
- CodeCastExpression.cs
- XamlRtfConverter.cs
- X509ThumbprintKeyIdentifierClause.cs
- ReverseQueryOperator.cs
- TdsParserHelperClasses.cs
- PassportAuthenticationModule.cs
- ContentTextAutomationPeer.cs
- InstancePersistenceContext.cs
- SerializationInfoEnumerator.cs
- FileAuthorizationModule.cs
- ProxyGenerator.cs
- StaticExtension.cs
- CultureTableRecord.cs
- VScrollProperties.cs
- Vector3DAnimationBase.cs
- WebPartCatalogAddVerb.cs
- UserPersonalizationStateInfo.cs
- DocumentViewerBase.cs
- ConnectionStringsExpressionBuilder.cs
- SettingsPropertyNotFoundException.cs
- BookmarkScopeInfo.cs
- AnnotationHighlightLayer.cs
- ProxyWebPartConnectionCollection.cs
- SettingsProperty.cs
- JoinCqlBlock.cs
- UrlPropertyAttribute.cs
- LogicalMethodInfo.cs
- WebScriptEndpoint.cs
- WorkflowServiceNamespace.cs
- DecoratedNameAttribute.cs
- AppLevelCompilationSectionCache.cs
- ListBox.cs
- XmlAnyElementAttributes.cs
- LoginViewDesigner.cs
- RegexGroupCollection.cs
- WindowsContainer.cs
- ToolStripPanelSelectionBehavior.cs
- HMACSHA1.cs
- NegationPusher.cs
- ServiceEndpointCollection.cs
- _Events.cs
- SchemaNotation.cs
- ContentElementAutomationPeer.cs
- ContextMenu.cs
- SharedPersonalizationStateInfo.cs
- TemplateComponentConnector.cs
- SqlCommandSet.cs
- DecoderFallback.cs
- __Error.cs
- WsatServiceCertificate.cs
- EarlyBoundInfo.cs
- WorkflowMarkupSerializationProvider.cs
- ThreadInterruptedException.cs
- SharedTcpTransportManager.cs
- TransactionValidationBehavior.cs
- UnsafePeerToPeerMethods.cs
- DragDeltaEventArgs.cs
- MemberDescriptor.cs
- HttpPostedFile.cs
- Model3D.cs
- ApplicationDirectory.cs
- Avt.cs
- MouseOverProperty.cs
- ExcludeFromCodeCoverageAttribute.cs
- BamlVersionHeader.cs
- FolderBrowserDialog.cs
- ExternalException.cs
- ApplicationSettingsBase.cs
- ConfigurationStrings.cs
- GCHandleCookieTable.cs
- TextBlock.cs
- DefaultTextStoreTextComposition.cs
- AxHost.cs
- SystemIPGlobalProperties.cs
- TableProvider.cs
- MatrixStack.cs