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
- DesignSurfaceManager.cs
- BitmapPalettes.cs
- DurationConverter.cs
- EditBehavior.cs
- AudioFormatConverter.cs
- ImageFormat.cs
- NameValueCollection.cs
- InputProviderSite.cs
- PiiTraceSource.cs
- Win32KeyboardDevice.cs
- CommunicationObjectAbortedException.cs
- AttachedPropertyBrowsableAttribute.cs
- AspProxy.cs
- RegularExpressionValidator.cs
- TreeNodeStyleCollectionEditor.cs
- SecurityUtils.cs
- ParameterCollection.cs
- ObjectAnimationUsingKeyFrames.cs
- WinInetCache.cs
- querybuilder.cs
- EncryptedPackageFilter.cs
- TypefaceCollection.cs
- LogRecordSequence.cs
- SqlInfoMessageEvent.cs
- SynchronousChannelMergeEnumerator.cs
- DataGridHeaderBorder.cs
- InkCanvasAutomationPeer.cs
- SizeLimitedCache.cs
- TextTreeNode.cs
- DataTableMapping.cs
- XMLDiffLoader.cs
- EventMap.cs
- RequiredAttributeAttribute.cs
- HTTPNotFoundHandler.cs
- Container.cs
- InkCanvasSelection.cs
- TypeBrowserDialog.cs
- ContentHostHelper.cs
- CannotUnloadAppDomainException.cs
- OleDbPropertySetGuid.cs
- StaticDataManager.cs
- UpDownEvent.cs
- ChannelServices.cs
- COM2ComponentEditor.cs
- Substitution.cs
- SchemaMerger.cs
- ColumnTypeConverter.cs
- TextElementAutomationPeer.cs
- Label.cs
- TypeListConverter.cs
- CheckPair.cs
- WinEventTracker.cs
- CriticalFinalizerObject.cs
- DragDrop.cs
- XPathNodeHelper.cs
- ResourceDisplayNameAttribute.cs
- ClassHandlersStore.cs
- SizeLimitedCache.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- PatternMatcher.cs
- ToolstripProfessionalRenderer.cs
- InternalEnumValidatorAttribute.cs
- EntityDataSourceColumn.cs
- Dynamic.cs
- EncodingInfo.cs
- FrameworkElementFactory.cs
- QueryResult.cs
- Win32.cs
- MaskPropertyEditor.cs
- ScrollableControlDesigner.cs
- LicFileLicenseProvider.cs
- Wildcard.cs
- ImageListUtils.cs
- CharStorage.cs
- MasterPage.cs
- MatrixCamera.cs
- ColorAnimationUsingKeyFrames.cs
- ConfigurationValidatorBase.cs
- ControlTemplate.cs
- WaitHandle.cs
- ProtocolElementCollection.cs
- UserInitiatedNavigationPermission.cs
- XmlMapping.cs
- SafeNativeMethods.cs
- Calendar.cs
- CodeDirectionExpression.cs
- ExpandedWrapper.cs
- ContainerFilterService.cs
- DefaultDiscoveryService.cs
- Rules.cs
- RangeValidator.cs
- MsdtcClusterUtils.cs
- WindowsListViewGroupSubsetLink.cs
- ProtocolElementCollection.cs
- XmlAnyElementAttributes.cs
- ChannelBinding.cs
- HtmlTextArea.cs
- EntityFrameworkVersions.cs
- TextElementAutomationPeer.cs
- ValidationEventArgs.cs