RtfDomParser.RTFWriter.WriteKeyword C# (CSharp) Method

WriteKeyword() public method

write keyword
public WriteKeyword ( string Keyword, bool Ext ) : void
Keyword string keyword
Ext bool whether extern key word
return void
        public void WriteKeyword( string Keyword , bool Ext)
        {
            if( Keyword == null || Keyword.Length == 0)
                throw new System.ArgumentNullException("ֵ����Ϊ��");
            if( bolIndent == false && ( Keyword == "par" || Keyword == "pard" ) )
            {
                // at the front of par or pard can write new line , will not effect rtf render.
                InnerWrite( System.Environment.NewLine );
            }
            if( this.bolIndent )
            {
                if( Keyword == "par" || Keyword == "pard" )
                {
                    this.InnerWriteNewLine();
                }
            }
            if( Ext )
                InnerWrite("\\*\\");
            else
                InnerWrite("\\");
            InnerWrite( Keyword );
        }

Same methods

RTFWriter::WriteKeyword ( string Keyword ) : void

Usage Example

Esempio n. 1
0
        public void Write(RTFWriter writer)
        {
            writer.WriteStartGroup( );
            writer.WriteKeyword("info");
            foreach (string strKey in myInfo.Keys)
            {
                writer.WriteStartGroup();
                if (strKey == "edmins" ||
                    strKey == "vern" ||
                    strKey == "nofpages" ||
                    strKey == "nofwords" ||
                    strKey == "nofchars" ||
                    strKey == "nofcharsws" ||
                    strKey == "id")
                {
                    writer.WriteKeyword(strKey + myInfo[strKey]);
                }
                else
                {
                    writer.WriteKeyword(strKey);
                    writer.WriteText(myInfo[strKey]);
                }
                writer.WriteEndGroup();
            }
            writer.WriteStartGroup();

            WriteTime(writer, "creatim", dtmCreatim);
            WriteTime(writer, "revtim", dtmRevtim);
            WriteTime(writer, "printim", dtmPrintim);
            WriteTime(writer, "buptim", dtmBuptim);

            writer.WriteEndGroup();
        }
All Usage Examples Of RtfDomParser.RTFWriter::WriteKeyword