コード例 #1
0
        public void BuildImplementationGuide(ExportSettings aModel, IIGTypePlugin igTypePlugin)
        {
            this.exportSettings = aModel;
            this.igTypePlugin   = igTypePlugin;

            this.docStream = new MemoryStream();
            this.document  = WordprocessingDocument.Create(this.docStream, WordprocessingDocumentType.Document);
            this.document.AddMainDocumentPart();

            this.SetupStyles();

            this.document.MainDocumentPart.Document =
                new Document(
                    new Body());

            this.hyperlinkTracker         = new HyperlinkTracker();
            this.tables                   = new TableCollection(this.document.MainDocumentPart.Document.Body, this.hyperlinkTracker);
            this.constraintTableGenerator = new TemplateConstraintTable(this._tdb, this.constraintReferences, this.igSettings, igTypePlugin, this.templates, this.tables, exportSettings.SelectedCategories, this.hyperlinkTracker);
            this.figures                  = new FigureCollection(this.document.MainDocumentPart.Document.Body);
            this.valueSetsExport
                = new ValueSetsExport(
                      igTypePlugin,
                      this.document.MainDocumentPart,
                      this.hyperlinkTracker,
                      this.tables,
                      exportSettings.GenerateValueSetAppendix,
                      exportSettings.DefaultValueSetMaxMembers,
                      exportSettings.ValueSetMaxMembers);
            this.codeSystemTable = new CodeSystemTable(this._tdb, this.document.MainDocumentPart.Document.Body, this.templates, this.tables);

            this.AddTitlePage();

            this.AddTableOfContents();

            this.AddVolume1(false);

            this.AddTemplateTypeSections();

            if (exportSettings.GenerateDocTemplateListTable || exportSettings.GenerateDocContainmentTable)
            {
                Paragraph entryLevelHeading = new Paragraph(
                    new ParagraphProperties(
                        new ParagraphStyleId()
                {
                    Val = Properties.Settings.Default.TemplateTypeHeadingStyle
                }),
                    new Run(
                        new Text("Template Ids in This Guide")));
                this.document.MainDocumentPart.Document.Body.AppendChild(entryLevelHeading);

                if (exportSettings.GenerateDocTemplateListTable)
                {
                    // Add used template table
                    this.AddDocumentTemplateListTable();
                }

                if (exportSettings.GenerateDocContainmentTable)
                {
                    TemplateContainmentGenerator.AddTable(this._tdb, this.document, this.templateRelationships, this.templates, this.tables, this.hyperlinkTracker);
                }
            }

            this.valueSetsExport.AddValueSetsAppendix();

            this.codeSystemTable.AddCodeSystemAppendix();

            this.AddRetiredTemplatesAppendix();

            if (exportSettings.IncludeChangeList)
            {
                this.LoadChangesAppendix();
            }

            this.AddVolume1(true);
        }
コード例 #2
0
        public static void AddTable(IObjectRepository tdb, WordprocessingDocument document, List <ViewTemplateRelationship> relationships, List <Template> allTemplates, TableCollection tables, HyperlinkTracker hyperlinkTracker)
        {
            TemplateContainmentGenerator tcg = new TemplateContainmentGenerator(tdb, document, relationships, allTemplates, tables, hyperlinkTracker);

            tcg.GenerateTable();
        }