예제 #1
0
        public static void ExportConfigAsDocX(string fileName, XmlConfigFileViewModel xmlConfigFile)
        {
            DocX doc = DocX.Create(fileName);

            doc.AddFooters();
            doc.Footers.even.InsertParagraph(xmlConfigFile.FileName);
            doc.Footers.odd.InsertParagraph(xmlConfigFile.FileName);

            Paragraph p = doc.InsertParagraph();

            p           = doc.InsertParagraph();
            p.StyleName = "Title";
            p.InsertText("Acma Configuration");

            p           = doc.InsertParagraph();
            p.StyleName = "Heading1";
            p.InsertText("Description");

            p = doc.InsertParagraph(xmlConfigFile.Description);

            doc.InsertSectionPageBreak();
            p           = doc.InsertParagraph();
            p.StyleName = "Heading1";
            p.InsertText("Class Constructors");

            foreach (var classConstructor in xmlConfigFile.Constructors)
            {
                p           = doc.InsertParagraph();
                p.StyleName = "Heading2";
                p.InsertText(classConstructor.Name);

                DocXExporter.WriteConstructorObject(classConstructor.Constructors, doc);
                doc.InsertSectionPageBreak();
            }

            doc.Save();
        }
예제 #2
0
 private BitmapSource GetIcon(XmlConfigFileViewModel item)
 {
     return(new BitmapImage(new Uri("pack://application:,,,/Lithnet.Acma.Presentation;component/Resources/XmlConfigFile.png", UriKind.Absolute)));
 }