本文整理汇总了C#中StreamWriterLevel.BR方法的典型用法代码示例。如果您正苦于以下问题:C# StreamWriterLevel.BR方法的具体用法?C# StreamWriterLevel.BR怎么用?C# StreamWriterLevel.BR使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StreamWriterLevel
的用法示例。
在下文中一共展示了StreamWriterLevel.BR方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrintHtml
public void PrintHtml(StreamWriterLevel wr, int p)
{
wr.WriteLine("<div style=\"width: 100%\">");
wr.WriteLine(string.Format("<h2 >Module : {0}</h2>", m_moduleID));
wr.WriteLine("<font face=\"Courier\" color=\"DimGray\"><pre>");
wr.WriteLine(wr.BR(m_comments));
wr.WriteLine("</pre></font>");
List<TypeAssigment> topLevelPDUs = GetTopLevelTypes();
if (!DefaultBackend.displayTypesAsAppearInAsn1Grammar)
{
foreach (ICDTypeAssigment tas in topLevelPDUs)
tas.PrintHtml(wr, p + 1);
}
foreach (ICDTypeAssigment tas in m_typeAssigments.Values)
if (!topLevelPDUs.Contains(tas))
{
tas.PrintHtml(wr, p + 1);
}
wr.WriteLine("</div>");
}
示例2: PrintHtml
//Default implementation of PrintHtml for all types
public static void PrintHtml(Asn1Type pThis, PEREffectiveConstraint cns, StreamWriterLevel o, int lev, List<string> comment, TypeAssigment tas, List<IConstraint> additonalConstraints)
{
o.WriteLine("<a name=\"{0}\"></a>", "ICD_" + tas.m_name.Replace("-", "_"));
o.WriteLine("<table border=\"0\" width=\"100%\" >");
o.WriteLine("<tbody>");
o.WriteLine("<tr bgcolor=\"{0}\">", (tas.m_createdThroughTabulization ? "#379CEE" : "#FF8f00"));
o.WriteLine("<td height=\"35\" colspan=\"2\" >");
o.WriteLine("<font face=\"Verdana\" color=\"#FFFFFF\" size=\"4\">{0}</font><font face=\"Verdana\" color=\"#FFFFFF\" size=\"2\">({1}) </font>", tas.m_name, pThis.Name);
o.WriteLine("<font face=\"Verdana\" color=\"#FFFFFF\" size=\"2\"><a href=\"#{0}\">ASN.1</a></font>", "ASN1_" + tas.m_name.Replace("-", "_"));
o.WriteLine("</td>");
o.WriteLine("<td height=\"35\" align=\"center\">");
o.WriteLine(" <font face=\"Verdana\" color=\"#FFFFFF\" size=\"2\">min = {0} bytes</font>", (pThis.MinBytesInPER == -1 ? "∞" : pThis.MinBytesInPER.ToString()));
o.WriteLine("</td>");
o.WriteLine("<td height=\"35\" align=\"center\">");
o.WriteLine(" <font face=\"Verdana\" color=\"#FFFFFF\" size=\"2\">max = {0} bytes{1}</font>", (pThis.MaxBytesInPER == -1 ? "∞" : pThis.MaxBytesInPER.ToString()), pThis.MaxBitsInPER_Explained);
o.WriteLine("</td>");
o.WriteLine("</tr>");
IInternalContentsInHtml pICIH = pThis as IInternalContentsInHtml;
string tmp = string.Empty;
if (pICIH != null)
tmp = pICIH.InternalContentsInHtml(additonalConstraints);
if (comment.Count > 0 || tmp.Length > 0)
{
o.WriteLine("<tr class=\"CommentRow\">");
o.WriteLine("<td class=\"comment2\" colspan=\"4\">" + o.BR(comment) + tmp + "</td>");
o.WriteLine("</tr>");
}
o.WriteLine("<tr class=\"headerRow\">");
o.WriteLine("<td class=\"hrconstraint2\" colspan=\"2\">Constraints</td>");
o.WriteLine("<td class=\"hrMin2\">Min Length (bits)</td>");
o.WriteLine("<td class=\"hrMax2\">Max Length (bits)</td>");
o.WriteLine("</tr>");
o.WriteLine("<tr class=\"OddRow\">");
o.WriteLine(" <td class=\"constraint\" colspan=\"2\">{0}</td>", o.Constraint(pThis.Constraints + BaseConstraint.AsString(additonalConstraints)));
o.WriteLine(" <td class=\"min\" >{0}</td>", pThis.MinBitsInPER);
o.WriteLine(" <td class=\"max\" >{0}{1}</td>", pThis.MaxBitsInPER, pThis.MaxBitsInPER_Explained);
o.WriteLine("</tr>");
o.WriteLine("</tbody>");
o.WriteLine("</table>");
}