当前位置: 首页>>代码示例>>C#>>正文


C# StreamWriterLevel.BR方法代码示例

本文整理汇总了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>");
        }
开发者ID:kia92798,项目名称:tinyasn1,代码行数:24,代码来源:ICDModule.cs

示例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 ? "&#8734" : 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 ? "&#8734" : 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>");
        }
开发者ID:kia92798,项目名称:tinyasn1,代码行数:48,代码来源:ConstructedTypes.cs


注:本文中的StreamWriterLevel.BR方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。