Beispiel #1
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            DocumentTemplate dt = (DocumentTemplate)e.Argument;
            DocumentArgs     da = new DocumentArgs();

            if (SessionManager.Instance.GetActivePatient() != null)
            {
                dt.ProcessDocument();
            }
            e.Result = dt;
        }
Beispiel #2
0
        /*********************************************************/
        public void ProcessDocument()
        {
            doc = new HtmlDocument();
            doc.LoadHtml(htmlText);

            StampAuthorAndTime();

            ParagraphRuleTag prt = new ParagraphRuleTag();

            if (proband != null)
            {
                prt.proband = proband;
            }
            prt.ProcessHtml(ref doc);

            if (UseDocArgs)
            {
                DocumentArgs da = new DocumentArgs();
                da.relativeID = relativeID;
                if (proband != null)
                {
                    da.proband = proband;
                }
                da.ProcessHtml(ref doc);
            }

            //start the tag replacement
            ImageTag it = new ImageTag();

            it.DocumentHtmlPath = htmlPath;
            it.ProcessHtml(ref doc);

            SqlExecTag exec = new SqlExecTag();

            exec.ProcessHtml(ref doc);

            MakeTableTag mt = new MakeTableTag();

            mt.ProcessHtml(ref doc);

            MakeListTag ml = new MakeListTag();

            ml.ProcessHtml(ref doc);

            MakeResponseTableTag mrt = new MakeResponseTableTag();

            mrt.ProcessHtml(ref doc);

            PedigreeTag pt = new PedigreeTag();

            if (proband != null)
            {
                pt.proband = proband;
            }
            pt.ProcessHtml(ref doc);

            RiskChartTag rct = new RiskChartTag();

            if (proband != null)
            {
                rct.proband = proband;
            }
            rct.ProcessHtml(ref doc);

            AreaProvidersTag apt = new AreaProvidersTag();

            if (proband != null)
            {
                apt.proband = proband;
            }
            apt.ProcessHtml(ref doc);

            Sectionizer sz = new Sectionizer();

            Sections = sz.ProcessHtml(ref doc);


            TableColumnTag tc = new TableColumnTag();

            if (proband != null)
            {
                tc.proband = proband;
            }
            tc.ProcessHtml(ref doc);

            InsertTemplateTag itt = new InsertTemplateTag();

            itt.UseDocArgs = UseDocArgs;
            if (proband != null)
            {
                itt.proband = proband;
            }
            itt.ProcessHtml(ref doc);

            htmlText = ProcessFormatingTags(doc.DocumentNode.OuterHtml);
        }