Example #1
0
        public Dictionary <string, List <string> > generateSpecificationRegTOC(string filepath)
        {
            ApplicationClass app            = new ApplicationClass();
            Document         doc            = new Document();
            HandleDocument   handleDocument = new HandleDocument();

            doc = handleDocument.openDocument(filepath, app);

            Dictionary <string, List <string> > dict = new Dictionary <string, List <string> >();
            int    c       = doc.Paragraphs.Count;
            bool   isStart = false;
            string chapter = "";
            Regex  regNum  = new Regex("^[0-9]");
            Regex  reg     = new Regex(@"[\u4e00-\u9fa5]");//


            for (int i = 1; i <= c; i++)
            {
                string s = doc.Paragraphs[i].Range.Text;

                //int ccc = Convert.ToInt32(s[s.Length - 1]);
                //MessageBox.Show(ccc.ToString());

                if (s.IndexOf("第") == 0 && (s.IndexOf("章") == 2 || s.IndexOf("章") == 3))
                {
                    isStart = true;
                }
                if (isStart)
                {
                    if (s.IndexOf("第") == 0 && (s.IndexOf("章") == 2 || s.IndexOf("章") == 3))
                    {
                        s       = s.Replace("\r", "");
                        chapter = s;
                        dict.Add(s, new List <string>());
                    }
                    else if (regNum.IsMatch(s) && reg.IsMatch(s))
                    {
                        s = s.Replace("\r", "");
                        dict[chapter].Add(s);
                    }
                }
            }


            Object saveChanges = false;
            object unknow      = Type.Missing;

            doc.Close(ref saveChanges, ref unknow, ref unknow);
            app.Quit(ref saveChanges, ref unknow, ref unknow);

            return(dict);
        }
Example #2
0
        private void anyOneDocHighLigth(string multiFilePath, ApplicationClass testWord, string keyWord, RichTextBox rtbHightLight,
                                        Label count, RichTextBox StatisticsInfor, HandleDocument handleDocument)
        {
            WaitingForm wf = new WaitingForm();

            HandleWaitingForm.startWaitingForm(wf);

            Document doc = handleDocument.openDocument(multiFilePath, testWord);

            highLightKeyWords(keyWord, testWord, doc, rtbHightLight, count, StatisticsInfor);
            closeDoc(doc);

            HandleWaitingForm.closeWaitingForm(wf);
        }
Example #3
0
        /*
         * get regulation table of content in document or db by name
         */
        public Dictionary <string, List <TermContainer> > getTOCContentsByName(string name)
        {
            string path = System.Environment.CurrentDirectory;

            name = path + "\\resources\\" + name + ".doc";
            ApplicationClass regWord        = new ApplicationClass();
            Document         regDoc         = new Document();
            HandleDocument   handleDocument = new HandleDocument();

            regDoc = handleDocument.openDocument(name, regWord);

            Table table = regDoc.Tables[1];
            int   rows  = table.Rows.Count;
            Dictionary <string, List <TermContainer> > dic = new Dictionary <string, List <TermContainer> >();

            string key     = "";
            string section = "";

            for (int i = 1; i <= rows; i++)
            {
                string text = getTableCellText(table, i, 1);
                if (isLevel1Cell(text))
                {
                    section = "";
                    key     = text;
                    dic.Add(text, new List <TermContainer>());
                }
                else
                {
                    if (isLevelSection(text))
                    {
                        section = text;
                    }
                    else
                    {
                        TermContainer term = getTableCellContainer(section, table, i);
                        dic[key].Add(term);
                    }
                }
            }
            quit(regWord, regDoc);
            return(dic);
        }
Example #4
0
        private void btnFindTable_Click(object sender, EventArgs e)
        {
            tabControl2.SelectTab("tabCalculateTable");

            string regFileName = cbxRegDoc.Text;
            string tablename = cbxTableList.Text;

            if (testFileName == null || testFileName.Trim() == "")
            {
                MessageBox.Show("请选择一个目标文档");
            }
            else if (regFileName == null || regFileName.Trim() == "")
            {
                MessageBox.Show("请选择一个规程文档");
            }
            else
            {
                if ((!regFileName.Equals(preRegFileName) || !testFileName.Equals(preTestFileName)
                    || cbxTableListChanged == true))
                {
                    dataView.Rows.Clear();
                    rbTableTest.Clear();

                    WaitingForm wf = new WaitingForm();
                    HandleWaitingForm.startWaitingForm(wf);

                    string path = System.Environment.CurrentDirectory;
                    string name = regFileName;
                    name = path + "\\resources\\" + name + ".doc";

                    Document regDoc = new Document();
                    HandleDocument handleDocument = new HandleDocument();

                    
                    if (!testDocIsOpen)
                    {
                        testDocIsOpen = true;
                        testDoc = handleDocument.openDocument(testFileName, testWord);
                    }

                    regDoc = handleDocument.openDocument(name, testWord);
                    showItemInfo.Clear();
                    flagList.Clear();//清空标记合并单元格的标志
                    if (tablename != "")
                    {
                        calTables(1, regDoc, wf, tablename);
                    }
                    else
                    {
                        calTables(tableName.Length, regDoc, wf, "");
                    }
                    rbTableTest.Text = "请选择关键字";
                    KeyWord keyWord = new KeyWord();
                    //keyWord.highLightRichString(rbTableTest, testWord, testDoc, keyItemList);
                    rtbStandard.Text = keyWord.getStandardList();
                    generatekeyItemCombox();
                    
                    Object saveChanges = false;
                    object unknow = Type.Missing;

                    regDoc.Close(ref saveChanges, ref unknow, ref unknow);

                    HandleWaitingForm.closeWaitingForm(wf);

                    plTOC.Hide();
                    plKeyWord.Hide();
                    plMultiInfo.Hide();

                    plTableTest.Show();
                    showTableTreeView();
                    hideTOCTreeView();

                    cbxTableListChanged = false;
                    preRegFileName = regFileName;
                    preTestFileName = testFileName;

                    isMultiple = false;
                    tabControl2.Show();
                    tabControlMulti.Hide();
                }
            }

        }
Example #5
0
        private void btnTestTable_Click(object sender, EventArgs e)
        {
            tabControl2.SelectTab("tabPageTest");

            string regFileName = cbxRegDoc.Text;
            if (testFileName == null || testFileName.Trim() == "")
            {
                MessageBox.Show("请选择一个目标文档");
            }
            else if (regFileName == null || regFileName.Trim() == "")
            {
                MessageBox.Show("请选择一个规程文档");
            }
            else if (!isTextMode())
            {
                MessageBox.Show("非文本文档检测模式不支持表格匹配,请在目录检测中选择文本模式");
            }
            else
            {
                HandleTable handleTable = new HandleTable(testWord);

                string path = System.Environment.CurrentDirectory;
                string name = regFileName;
                name = path + "\\resources\\" + name + ".doc";

                Document regDoc = new Document();
                HandleDocument handleDocument = new HandleDocument();

                WaitingForm wf = new WaitingForm();
                HandleWaitingForm.startWaitingForm(wf);

                if (!testDocIsOpen)
                {
                    testDocIsOpen = true;
                    testDoc = handleDocument.openDocument(testFileName, testWord);
                }

                regDoc = handleDocument.openDocument(name, testWord);

                handleTable.contrastTablesOfDocs(regDoc, testDoc, showItemInfo, tvRegTable
                    , tvTestTable, null, null, null);

                Object saveChanges = false;
                object unknow = Type.Missing;

                regDoc.Close(ref saveChanges, ref unknow, ref unknow);

                HandleWaitingForm.closeWaitingForm(wf);

                plTOC.Hide();
                plKeyWord.Hide();
                plMultiInfo.Hide();

                plTableTest.Show();
                showTableTreeView();
                hideTOCTreeView();

                isMultiple = false;
                tabCalculateTable.Show();
                tabControlMulti.Hide();
            }
        }
Example #6
0
        /// <summary>
        /// put new regulation document into system resource and extract toc
        /// </summary>
        /// <param name="filepath"></param>
        /// <returns></returns>
        public Dictionary <string, List <TermContainer> > AddRegToSysResource(string filepath)
        {
            string fname = filepath.Substring(filepath.LastIndexOf("\\") + 1, filepath.LastIndexOf(".") - filepath.LastIndexOf("\\") - 1);

            putNewRegTocInINIFile(fname);

            ApplicationClass regWord        = new ApplicationClass();
            Document         regDoc         = new Document();
            HandleDocument   handleDocument = new HandleDocument();

            regDoc = handleDocument.openDocument(filepath, regWord);

            Table table = regDoc.Tables[1];
            int   rows  = table.Rows.Count;
            Dictionary <string, List <TermContainer> > dic = new Dictionary <string, List <TermContainer> >();

            string key     = "";
            string section = "";

            for (int i = 1; i <= rows; i++)
            {
                string text = getTableCellText(table, i, 1);
                if (isLevel1Cell(text))
                {
                    section = "";
                    key     = text;
                    dic.Add(text, new List <TermContainer>());
                }
                else
                {
                    if (isLevelSection(text))
                    {
                        section = text;
                    }
                    else
                    {
                        TermContainer term = getTableCellContainer(section, table, i);
                        dic[key].Add(term);
                    }
                }
            }

            string path       = System.Environment.CurrentDirectory;
            string name       = path + "\\resources\\" + regDoc.Name;
            object saveAsName = path + "\\resources\\" + regDoc.Name;

            object unknow = Type.Missing;

            if (!File.Exists(name))
            {
                regDoc.SaveAs(ref saveAsName, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow);
            }
            else
            {
                //shifou ti huan
                File.Delete(name);
                regDoc.SaveAs(ref saveAsName, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow);
            }
            quit(regWord, regDoc);
            return(dic);
        }
Example #7
0
        private void btnFindTable_Click(object sender, EventArgs e)
        {
            tabControl2.SelectTab("tabCalculateTable");

            string regFileName = cbxRegDoc.Text;
            string tablename   = cbxTableList.Text;

            if (testFileName == null || testFileName.Trim() == "")
            {
                MessageBox.Show("请选择一个目标文档");
            }
            else if (regFileName == null || regFileName.Trim() == "")
            {
                MessageBox.Show("请选择一个规程文档");
            }
            else
            {
                if ((!regFileName.Equals(preRegFileName) || !testFileName.Equals(preTestFileName) ||
                     cbxTableListChanged == true))
                {
                    dataView.Rows.Clear();
                    rbTableTest.Clear();

                    WaitingForm wf = new WaitingForm();
                    HandleWaitingForm.startWaitingForm(wf);

                    string path = System.Environment.CurrentDirectory;
                    string name = regFileName;
                    name = path + "\\resources\\" + name + ".doc";

                    Document       regDoc         = new Document();
                    HandleDocument handleDocument = new HandleDocument();


                    if (!testDocIsOpen)
                    {
                        testDocIsOpen = true;
                        testDoc       = handleDocument.openDocument(testFileName, testWord);
                    }

                    regDoc = handleDocument.openDocument(name, testWord);
                    showItemInfo.Clear();
                    flagList.Clear();//清空标记合并单元格的标志
                    if (tablename != "")
                    {
                        calTables(1, regDoc, wf, tablename);
                    }
                    else
                    {
                        calTables(tableName.Length, regDoc, wf, "");
                    }
                    rbTableTest.Text = "请选择关键字";
                    KeyWord keyWord = new KeyWord();
                    //keyWord.highLightRichString(rbTableTest, testWord, testDoc, keyItemList);
                    rtbStandard.Text = keyWord.getStandardList();
                    generatekeyItemCombox();

                    Object saveChanges = false;
                    object unknow      = Type.Missing;

                    regDoc.Close(ref saveChanges, ref unknow, ref unknow);

                    HandleWaitingForm.closeWaitingForm(wf);

                    plTOC.Hide();
                    plKeyWord.Hide();
                    plMultiInfo.Hide();

                    plTableTest.Show();
                    showTableTreeView();
                    hideTOCTreeView();

                    cbxTableListChanged = false;
                    preRegFileName      = regFileName;
                    preTestFileName     = testFileName;

                    isMultiple = false;
                    tabControl2.Show();
                    tabControlMulti.Hide();
                }
            }
        }
Example #8
0
        private void btnTestTable_Click(object sender, EventArgs e)
        {
            tabControl2.SelectTab("tabPageTest");

            string regFileName = cbxRegDoc.Text;

            if (testFileName == null || testFileName.Trim() == "")
            {
                MessageBox.Show("请选择一个目标文档");
            }
            else if (regFileName == null || regFileName.Trim() == "")
            {
                MessageBox.Show("请选择一个规程文档");
            }
            else if (!isTextMode())
            {
                MessageBox.Show("非文本文档检测模式不支持表格匹配,请在目录检测中选择文本模式");
            }
            else
            {
                HandleTable handleTable = new HandleTable(testWord);

                string path = System.Environment.CurrentDirectory;
                string name = regFileName;
                name = path + "\\resources\\" + name + ".doc";

                Document       regDoc         = new Document();
                HandleDocument handleDocument = new HandleDocument();

                WaitingForm wf = new WaitingForm();
                HandleWaitingForm.startWaitingForm(wf);

                if (!testDocIsOpen)
                {
                    testDocIsOpen = true;
                    testDoc       = handleDocument.openDocument(testFileName, testWord);
                }

                regDoc = handleDocument.openDocument(name, testWord);

                handleTable.contrastTablesOfDocs(regDoc, testDoc, showItemInfo, tvRegTable
                                                 , tvTestTable, null, null, null);

                Object saveChanges = false;
                object unknow      = Type.Missing;

                regDoc.Close(ref saveChanges, ref unknow, ref unknow);

                HandleWaitingForm.closeWaitingForm(wf);

                plTOC.Hide();
                plKeyWord.Hide();
                plMultiInfo.Hide();

                plTableTest.Show();
                showTableTreeView();
                hideTOCTreeView();

                isMultiple = false;
                tabCalculateTable.Show();
                tabControlMulti.Hide();
            }
        }
Example #9
0
        private void btnTest_Click(object sender, EventArgs e)
        {
            string regFileName = cbxRegDoc.Text;

            if (testFileName == null || testFileName.Trim() == "")
            {
                MessageBox.Show("请选择一个目标文档");
            }
            else if (regFileName == null || regFileName.Trim() == "")
            {
                MessageBox.Show("请选择一个规程文档");
            }
            else
            {
                ////改为察看系统中所有规程,现在为察看是否在列表中。当前列表显示所有规程,以后改为显示前n项
                if (cbxRegDoc.Items.Contains(regFileName))
                {
                    if (isTextMode())
                    {
                        WaitingForm wf = new WaitingForm();
                        HandleWaitingForm.startWaitingForm(wf);
                        if (!testDocIsOpen)
                        {
                            testDocIsOpen = true;
                            testDoc       = handleDocument.openDocument(testFileName, testWord);
                        }

                        //////获得规程文档目录内容
                        //////如果规程文档与上次相同则不重新载入
                        //if (preRegFileName != regFileName)
                        //{
                        if (regDocSForm != null && regDocSForm.isAddNewRegDoc())
                        {
                            regTOCContents = regDocSForm.getRegTOCContents();
                        }
                        else
                        {
                            regTOCContents = tableOfContents.getTOCContentsByName(regFileName);
                        }
                        writeRegToListBox(regTOCContents, regTreeView);
                        // }


                        //////获得测试文档目录内容
                        //////如果测试文档与上次相同则不重新载入
                        if ((preTestFileName != testFileName) || !tocTestStarted)
                        {
                            testTOCContents = handleDocument.getTestTextDocTOC(testDoc, testWord);
                        }

                        Dictionary <string, List <string> > msgContentList = new Dictionary <string, List <string> >();
                        msgContentList.Add("error", new List <string>());
                        msgContentList.Add("spare", new List <string>());
                        msgContentList.Add("missing", new List <string>());

                        writeTocTOListBox(testTOCContents, testTreeView, regTreeView, msgContentList);

                        tableOfContents.update(cbxRegDoc);
                        tabControl2.SelectTab("tabPageTest");

                        ////记录本次操作的规程文档和测试文档文件名
                        preRegFileName  = regFileName;
                        preTestFileName = testFileName;
                        HandleWaitingForm.closeWaitingForm(wf);

                        ////显示错误报告项目
                        List <string> list = msgContentList["error"];
                        int           c    = list.Count;
                        //MessageBox.Show(c.ToString());
                        list = msgContentList["spare"];
                        c    = list.Count;
                        //MessageBox.Show(c.ToString());
                        list = msgContentList["missing"];
                        c    = list.Count;
                        // MessageBox.Show(c.ToString());



                        if (!reportMSG.Contains(textTOCMSG))
                        {
                            reportMSG += textTOCMSG;
                        }
                    }
                    else if (isSpecificationMode())
                    {
                        WaitingForm wf = new WaitingForm();
                        HandleWaitingForm.startWaitingForm(wf);

                        if (!testDocIsOpen)
                        {
                            testDocIsOpen = true;
                            testDoc       = handleDocument.openDocument(testFileName, testWord);
                        }

                        //////获得规程文档目录内容
                        //////如果规程文档与上次相同则不重新载入
                        if (preRegFileName != regFileName)
                        {
                            Dictionary <string, List <string> > specificationDict = null;
                            if (regDocSForm != null && regDocSForm.isAddNewRegDoc())
                            {
                                specificationDict = regDocSForm.getSpecificationTOCContents();
                            }
                            else
                            {
                                specificationDict = tableOfContents.getSpecificationTOCContentsByName(regFileName);
                            }
                            writeRegSpecipicationToListBox(specificationDict, regTreeView);
                        }


                        //////获得测试文档目录内容
                        //////如果测试文档与上次相同则不重新载入
                        if (preTestFileName != testFileName)
                        {
                            testTOCContents = handleDocument.getTestSpecificationDocTOC(testDoc, testWord);
                            writeSpecificationTocTOListBox(testTOCContents, testTreeView, regTreeView);
                        }
                        tableOfContents.update(cbxRegDoc);
                        tabControl2.SelectTab("tabPageTest");

                        ////记录本次操作的规程文档和测试文档文件名
                        preRegFileName  = regFileName;
                        preTestFileName = testFileName;

                        HandleWaitingForm.closeWaitingForm(wf);

                        if (!reportMSG.Contains(specifiTOCMSG))
                        {
                            reportMSG += specifiTOCMSG;
                        }
                    }
                    else
                    {
                        MessageBox.Show("请选择一种比较方法");
                    }

                    plKeyWord.Hide();
                    plTableTest.Hide();

                    hideTableTreeView();
                    hideTableTreeView();
                    tabControlMulti.Hide();

                    tabControl2.Show();
                    showTOCTreeView();
                    plTOC.Show();

                    if (testDocIsOpen)
                    {
                        closeTestDoc();
                    }
                }
                else
                {
                    MessageBox.Show("选择的规程文档不存在");
                }
                //closeTestDoc();
            }
        }
Example #10
0
        public Dictionary<string, List<string>> generateSpecificationRegTOC(string filepath)
        {
            ApplicationClass app = new ApplicationClass();
            Document doc = new Document();
            HandleDocument handleDocument = new HandleDocument();
            doc = handleDocument.openDocument(filepath,app);

            Dictionary<string,List<string>> dict  = new Dictionary<string,List<string>>();
            int c = doc.Paragraphs.Count;
            bool isStart = false;
            string chapter = "";
            Regex regNum = new Regex("^[0-9]");
            Regex reg = new Regex(@"[\u4e00-\u9fa5]");//

            
            for (int i = 1; i <= c; i++)
            {
                string s = doc.Paragraphs[i].Range.Text;
      
                //int ccc = Convert.ToInt32(s[s.Length - 1]);
                //MessageBox.Show(ccc.ToString());

                if(s.IndexOf("第") == 0 && (s.IndexOf("章") ==  2 || s.IndexOf("章") == 3))
                {
                    isStart = true;
                }
                if (isStart)
                {
                    if (s.IndexOf("第") == 0 && (s.IndexOf("章") == 2 || s.IndexOf("章") == 3))
                    {
                        s = s.Replace("\r", "");
                        chapter = s;
                        dict.Add(s,new List<string>());
                    }
                    else if (regNum.IsMatch(s) && reg.IsMatch(s))
                    {
                        s = s.Replace("\r", "");
                        dict[chapter].Add(s);
                    }
                }
            }
            

            Object saveChanges = false;
            object unknow = Type.Missing;

            doc.Close(ref saveChanges, ref unknow, ref unknow);
            app.Quit(ref saveChanges, ref unknow, ref unknow);

            return dict;
        }
Example #11
0
        /*
         * get regulation table of content in document or db by name
         */
        public Dictionary<string, List<TermContainer>> getTOCContentsByName(string name)
        {
            string path = System.Environment.CurrentDirectory;          
            name = path +  "\\resources\\"+ name+".doc";   
            ApplicationClass regWord = new ApplicationClass();
            Document regDoc = new Document();
            HandleDocument handleDocument = new HandleDocument();
    
            regDoc = handleDocument.openDocument(name, regWord);

            Table table = regDoc.Tables[1];
            int rows = table.Rows.Count;
            Dictionary<string, List<TermContainer>> dic = new Dictionary<string, List<TermContainer>>();

            string key = "";
            string section = "";
            for (int i = 1; i <= rows; i++)
            {
                string text = getTableCellText(table, i, 1);
                if (isLevel1Cell(text))
                {
                    section = "";
                    key = text;
                    dic.Add(text, new List<TermContainer>());
                }
                else
                {
                    if (isLevelSection(text))
                    {
                        section = text;
                    }
                    else
                    {
                        TermContainer term = getTableCellContainer(section, table, i);
                        dic[key].Add(term);
                    }
                }
            }
            quit(regWord,regDoc);
            return dic;
        }
Example #12
0
        /// <summary>
        /// put new regulation document into system resource and extract toc 
        /// </summary>
        /// <param name="filepath"></param>
        /// <returns></returns>
        public Dictionary<string, List<TermContainer>> AddRegToSysResource(string filepath)
        {
            string fname = filepath.Substring(filepath.LastIndexOf("\\") + 1, filepath.LastIndexOf(".") - filepath.LastIndexOf("\\") - 1);
            putNewRegTocInINIFile(fname);

            ApplicationClass regWord = new ApplicationClass();
            Document regDoc = new Document();
            HandleDocument handleDocument = new HandleDocument();
  
            regDoc = handleDocument.openDocument(filepath, regWord);
            
            Table table = regDoc.Tables[1];
            int rows = table.Rows.Count;
            Dictionary<string, List<TermContainer>> dic = new Dictionary<string, List<TermContainer>>();
            
            string key = "";
            string section = "";
            for(int i = 1;i<= rows;i++)
            {                 
                string text = getTableCellText(table, i, 1);               
                if (isLevel1Cell(text))
                {
                    section = "";
                    key = text; 
                    dic.Add(text, new List<TermContainer>());             
                }
                else 
                {
                    if (isLevelSection(text))
                    {                  
                        section = text;
                    }
                    else
                    {
                        TermContainer term = getTableCellContainer(section,table, i);
                        dic[key].Add(term);
                    }
                }
            }

            string path = System.Environment.CurrentDirectory;
            string name = path + "\\resources\\"+regDoc.Name;
            object saveAsName = path + "\\resources\\" + regDoc.Name;
            
            object unknow = Type.Missing;

            if (!File.Exists(name))
            {
                regDoc.SaveAs(ref saveAsName, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow);
            }
            else
            {
                //shifou ti huan
                File.Delete(name);
                regDoc.SaveAs(ref saveAsName, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow, ref unknow);
            }
            quit(regWord, regDoc);
            return dic;
        }
Example #13
0
        private void anyOneDocHighLigth(string multiFilePath, ApplicationClass testWord, string keyWord, RichTextBox rtbHightLight,
            Label count, RichTextBox StatisticsInfor, HandleDocument handleDocument)
        {
            WaitingForm wf = new WaitingForm();
            HandleWaitingForm.startWaitingForm(wf);

            Document doc = handleDocument.openDocument(multiFilePath, testWord);
            highLightKeyWords(keyWord, testWord, doc, rtbHightLight, count, StatisticsInfor);
            closeDoc(doc);

            HandleWaitingForm.closeWaitingForm(wf);
        }