private void write(string text, TextStyle s)
{
if (s != null)
{
if (s.Bold)
Out("<b>");
if (s.Italic)
Out("<i>");
if (s.Transparent)
Out("<span style=\"color:" + GetHTMLColor(s.ForeColor) + "\">");
else
Out("<span style=\"color:" + GetHTMLColor(s.ForeColor) +
";background-color:" + GetHTMLColor(s.BackColor) + ";\">");
}
text = text.Replace("&", "&");
text = text.Replace("<", "<");
text = text.Replace(">", ">");
text = text.Replace(" ", " ");
text = text.Replace("\t", " ");
Out(text);
if (s != null)
{
Out("</span>");
if (s.Italic)
Out("</i>");
if (s.Bold)
Out("</b>");
}
}