コード例 #1
0
 /// <include file='doc\TernaryTreeGenerator.uex' path='docs/doc[@for="XsltableMain.Main"]/*' />
 public static void Main()
 {
     try {
         FileStream    fs            = new FileStream("..\\..\\..\\HtmlTernaryTree.cs", FileMode.Create, FileAccess.Write, FileShare.Read);
         StreamWriter  streamWriter  = new StreamWriter(fs);
         TernaryTreeRW ternaryTreeRW = new TernaryTreeRW();
         ternaryTreeRW.OutputFileHeader(streamWriter);
         ternaryTreeRW.GenerateHtmlElementTable();
         ternaryTreeRW.dumpTree(streamWriter, "htmlElements");
         ternaryTreeRW = new TernaryTreeRW();
         ternaryTreeRW.GenerateHtmlAttributeTable();
         ternaryTreeRW.dumpTree(streamWriter, "htmlAttributes");
         ternaryTreeRW.OutputFileFooter(streamWriter);
         fs.Flush();
         fs.Close();
     } catch (Exception ex) {
         Console.WriteLine(ex.Message);
     }
 }
コード例 #2
0
        /// <include file='doc\TernaryTreeGenerator.uex' path='docs/doc[@for="XsltableMain.Main"]/*' />
        public static void Main() {
            try {
                FileStream fs = new FileStream("..\\..\\..\\HtmlTernaryTree.cs", FileMode.Create, FileAccess.Write, FileShare.Read);
                StreamWriter streamWriter = new StreamWriter(fs);
                TernaryTreeRW ternaryTreeRW = new TernaryTreeRW();
                ternaryTreeRW.OutputFileHeader(streamWriter);
                ternaryTreeRW.GenerateHtmlElementTable();
                ternaryTreeRW.dumpTree(streamWriter, "htmlElements");
                ternaryTreeRW = new TernaryTreeRW();
                ternaryTreeRW.GenerateHtmlAttributeTable();
                ternaryTreeRW.dumpTree(streamWriter, "htmlAttributes");
                ternaryTreeRW.OutputFileFooter(streamWriter);
                fs.Flush();
                fs.Close();
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }

        }