Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- SystemDropShadowChrome.cs
- Model3DGroup.cs
- EmptyElement.cs
- ConnectionOrientedTransportChannelFactory.cs
- HwndSource.cs
- XPathNavigatorReader.cs
- SqlTypeConverter.cs
- ToolStripTextBox.cs
- DeviceFilterEditorDialog.cs
- AudienceUriMode.cs
- StringKeyFrameCollection.cs
- CrossContextChannel.cs
- MediaContext.cs
- UseLicense.cs
- OleDbEnumerator.cs
- AssociationSet.cs
- HttpServerUtilityWrapper.cs
- BufferedReceiveElement.cs
- PropertyDescriptorComparer.cs
- XamlClipboardData.cs
- SiteMapDataSource.cs
- ElementHostAutomationPeer.cs
- PackageProperties.cs
- SimpleMailWebEventProvider.cs
- MSAAEventDispatcher.cs
- XmlSortKey.cs
- ThrowHelper.cs
- COMException.cs
- Container.cs
- RectAnimationClockResource.cs
- CodeIndexerExpression.cs
- DataTableReaderListener.cs
- BrowserCapabilitiesFactory35.cs
- TextWriter.cs
- RadioButtonList.cs
- InheritablePropertyChangeInfo.cs
- SymLanguageVendor.cs
- ThreadPool.cs
- FastEncoder.cs
- FormsAuthenticationModule.cs
- ComContractElementCollection.cs
- XmlSchemaType.cs
- TraceProvider.cs
- NativeMethods.cs
- OperatingSystem.cs
- SqlXml.cs
- FileDetails.cs
- PropertySourceInfo.cs
- GrammarBuilderBase.cs
- RelatedView.cs
- SoapInteropTypes.cs
- RoutedEventHandlerInfo.cs
- Msec.cs
- XmlTextReaderImpl.cs
- PeerResolver.cs
- DataGridViewButtonCell.cs
- LoadedOrUnloadedOperation.cs
- StateDesigner.CommentLayoutGlyph.cs
- shaperfactoryquerycachekey.cs
- RepeatButton.cs
- BitmapEffectCollection.cs
- TargetControlTypeAttribute.cs
- InputMethodStateTypeInfo.cs
- IsolatedStorageFileStream.cs
- RoleManagerEventArgs.cs
- ScriptingProfileServiceSection.cs
- RequestTimeoutManager.cs
- DisplayMemberTemplateSelector.cs
- cookie.cs
- SecurityException.cs
- SafeFileMappingHandle.cs
- ViewSimplifier.cs
- GlobalDataBindingHandler.cs
- CharacterShapingProperties.cs
- ResponseStream.cs
- LinkUtilities.cs
- TextSpan.cs
- ByteStreamBufferedMessageData.cs
- TypeUsageBuilder.cs
- SchemaNotation.cs
- GridViewDeletedEventArgs.cs
- SByte.cs
- FormsAuthenticationCredentials.cs
- AffineTransform3D.cs
- NetWebProxyFinder.cs
- ScriptingRoleServiceSection.cs
- StringInfo.cs
- ByteStream.cs
- TextCharacters.cs
- DoubleLinkListEnumerator.cs
- InitiatorSessionSymmetricMessageSecurityProtocol.cs
- StreamInfo.cs
- WsdlParser.cs
- AppDomainUnloadedException.cs
- TableRow.cs
- PermissionSet.cs
- FormsAuthenticationCredentials.cs
- SecurityPolicySection.cs
- DataServiceEntityAttribute.cs
- ContentElement.cs