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
- MessageBox.cs
- FilteredReadOnlyMetadataCollection.cs
- BitmapCodecInfo.cs
- WCFServiceClientProxyGenerator.cs
- TransactedReceiveScope.cs
- MachinePropertyVariants.cs
- AnimationClock.cs
- EllipseGeometry.cs
- NameValuePermission.cs
- TextBounds.cs
- TraceContext.cs
- Socket.cs
- ExecutedRoutedEventArgs.cs
- SecurityElement.cs
- ImportCatalogPart.cs
- XPathArrayIterator.cs
- CngKey.cs
- ScrollBar.cs
- ContentValidator.cs
- WebServiceEnumData.cs
- HttpVersion.cs
- EventSinkHelperWriter.cs
- Operator.cs
- Padding.cs
- FormViewDeletedEventArgs.cs
- MemberJoinTreeNode.cs
- SoapInteropTypes.cs
- CodeTryCatchFinallyStatement.cs
- EventData.cs
- FilterQuery.cs
- PersonalizationDictionary.cs
- reliableinputsessionchannel.cs
- ISAPIWorkerRequest.cs
- SqlTypesSchemaImporter.cs
- WebPartActionVerb.cs
- TransformCollection.cs
- OrderPreservingSpoolingTask.cs
- PtsContext.cs
- ResizingMessageFilter.cs
- ContentPresenter.cs
- ProfileElement.cs
- RbTree.cs
- Pen.cs
- securitymgrsite.cs
- Crc32.cs
- SystemBrushes.cs
- PanelDesigner.cs
- ActivityTypeDesigner.xaml.cs
- PriorityQueue.cs
- Executor.cs
- ControlCollection.cs
- CodeDomDecompiler.cs
- CodeFieldReferenceExpression.cs
- VirtualizedCellInfoCollection.cs
- GridPatternIdentifiers.cs
- SiteMapHierarchicalDataSourceView.cs
- FixedSOMLineRanges.cs
- BuildResultCache.cs
- SQLByteStorage.cs
- IntegerValidatorAttribute.cs
- BitmapPalettes.cs
- SQLMoneyStorage.cs
- Vector3D.cs
- HttpWriter.cs
- WindowsAltTab.cs
- XmlSchemaCompilationSettings.cs
- WrapPanel.cs
- ReturnValue.cs
- BitFlagsGenerator.cs
- CollectionBase.cs
- PackWebRequest.cs
- MetricEntry.cs
- StopStoryboard.cs
- newinstructionaction.cs
- FrameworkElementFactoryMarkupObject.cs
- AttributedMetaModel.cs
- AutoGeneratedFieldProperties.cs
- MouseGesture.cs
- LinkButton.cs
- RegexGroupCollection.cs
- SafeArrayRankMismatchException.cs
- MeasureItemEvent.cs
- DynamicField.cs
- DataGridViewCellStyle.cs
- SetIterators.cs
- FtpWebResponse.cs
- InspectionWorker.cs
- ComponentResourceKeyConverter.cs
- CachedPathData.cs
- WebOperationContext.cs
- ClosableStream.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- ScriptControlManager.cs
- Itemizer.cs
- ResourcePermissionBaseEntry.cs
- TypedElement.cs
- BaseDataListActionList.cs
- FieldTemplateUserControl.cs
- PersonalizationEntry.cs
- BackgroundFormatInfo.cs