Esempio n. 1
0
        /// <summary>
        /// Overloaded constructor.
        /// Use this to create a standard paragraph with the given text from
        /// string simpletext. Notice, the text will be styled as standard.
        /// You won't be able to style it bold, underline, etc. this will only
        /// occur if standard style attributes of the texdocumentocument are set to
        /// this.
        /// </summary>
        /// <param name="document">The IDocument.</param>
        /// <param name="style">The only accepted ParentStyle is Standard! All other styles will be ignored!</param>
        /// <param name="simpletext">The text which should be append within this paragraph.</param>
        public Paragraph(IDocument document, ParentStyles style, string simpletext)
        {
            Document = document;
            Node     = new XElement(Ns.Text + "p");
            if (style == ParentStyles.Standard)
            {
                Init(ParentStyles.Standard.ToString());
            }
            else if (style == ParentStyles.Table)
            {
                Init(ParentStyles.Table.ToString());
            }
            else if (style == ParentStyles.Text_20_body)
            {
                Init(ParentStyles.Text_20_body.ToString());
            }

            //Attach simple text withhin the paragraph
            if (simpletext != null)
            {
                TextContent.Add(new SimpleText(Document, simpletext));
            }
            _parentStyle = style;
        }
Esempio n. 2
0
        /// <summary>
        /// Overloaded constructor.
        /// Use this to create a standard paragraph with the given text from
        /// string simpletext. Notice, the text will be styled as standard.
        /// You won't be able to style it bold, underline, etc. this will only
        /// occur if standard style attributes of the texdocumentocument are set to
        /// this.
        /// </summary>
        /// <param name="document">The IDocument.</param>
        /// <param name="style">The only accepted ParentStyle is Standard! All other styles will be ignored!</param>
        /// <param name="simpletext">The text which should be append within this paragraph.</param>
        public Paragraph(IDocument document, ParentStyles style, string simpletext)
        {
            this.Document = document;
            this.NewXmlNode();
            if (style == ParentStyles.Standard)
            {
                this.Init(ParentStyles.Standard.ToString());
            }
            else if (style == ParentStyles.Table)
            {
                this.Init(ParentStyles.Table.ToString());
            }
            else if (style == ParentStyles.Text_20_body)
            {
                this.Init(ParentStyles.Text_20_body.ToString());
            }

            //Attach simple text withhin the paragraph
            if (simpletext != null)
            {
                this.TextContent.Add(new SimpleText(this.Document, simpletext));
            }
            this._parentStyle = style;
        }
Esempio n. 3
0
 public bool IsParentStyle(AndroidManifestElementStyles style)
 {
     return(ParentStyles.ToList().Contains(style));
 }
Esempio n. 4
0
		/// <summary>
		/// Overloaded constructor.
		/// Use this to create a standard paragraph with the given text from
		/// string simpletext. Notice, the text will be styled as standard.
		/// You won't be able to style it bold, underline, etc. this will only
		/// occur if standard style attributes of the texdocumentocument are set to
		/// this.
		/// </summary>
		/// <param name="document">The IDocument.</param>
		/// <param name="style">The only accepted ParentStyle is Standard! All other styles will be ignored!</param>
		/// <param name="simpletext">The text which should be append within this paragraph.</param>
		public Paragraph(IDocument document, ParentStyles style, string simpletext)
		{
			this.Document				= document;
			this.NewXmlNode();
			if (style == ParentStyles.Standard)
				this.Init(ParentStyles.Standard.ToString());
			else if (style == ParentStyles.Table)
				this.Init(ParentStyles.Table.ToString());
			else if (style == ParentStyles.Text_20_body)
				this.Init(ParentStyles.Text_20_body.ToString());

			//Attach simple text withhin the paragraph
			if (simpletext != null)
				this.TextContent.Add(new SimpleText(this.Document, simpletext));
			this._parentStyle	= style;
		}