AODL.Document.Content.Tables.Table.GetHtml C# (CSharp) Метод

GetHtml() публичный Метод

Return the content as Html string
public GetHtml ( ) : string
Результат string
		public string GetHtml()
		{
			bool isRightAlign	= false;
			string outerHtml	= "<table border=0 cellspacing=0 cellpadding=0 border=0 style=\"width: 16.55cm; \">\n\n<tr>\n<td align=right>\n";
			string html			= "<table hspace=\"14\" vspace=\"14\" cellpadding=\"2\" cellspacing=\"2\" border=\"0\" bgcolor=\"#000000\" ";
			string htmlRight	= "<table cellpadding=\"2\" cellspacing=\"2\" border=\"0\" bgcolor=\"#000000\" ";

			if (this.TableStyle.TableProperties != null)
			{
				if (this.TableStyle.TableProperties.Align != null)
				{
					string align		= this.TableStyle.TableProperties.Align.ToLower();
					if (align == "right")
					{
						isRightAlign	= true;
						html			= htmlRight;
					}
					else if (align == "margin")
						align			= "left";
					html		+= " align=\""+align+"\" ";

				}
				html			+= this.TableStyle.TableProperties.GetHtmlStyle();
			}

			html				+= ">\n";

			if (this.RowHeader != null)
				html			+= this.RowHeader.GetHtml();

			foreach(Row	row in this.Rows)
				html		+= row.GetHtml()+"\n";

			html				+= "</table>\n";

			//Wrapp a right align table with outer table,
			//because following content will be right to
			//the table!
			if (isRightAlign)
				html			= outerHtml + html + "\n</td>\n</tr>\n</table>\n";

			return html;
		}