public void CompareTest()
        {
            Application word         = new Application();
            Document    document     = word.Documents.Open(@"G:\abi\word_module\Word_Table\table.docx");
            Document    document_new = word.Documents.Open(@"G:\abi\word_module\Word_Table\table_new.docx");

            word.Visible = true;

            Range  range  = document.Range();
            Tables tables = range.Tables;
            Table  t      = tables[1];

            Range  range_new  = document_new.Range();
            Tables tables_new = range_new.Tables;
            Table  t_new      = tables_new[1];

            ABIW_Table table      = new ABIW_Table(t);
            ABIW_Table otherTable = new ABIW_Table(t_new);

            ComparisonResultIndicate result = table.Compare(otherTable).Result;
            string str_result = result.ToString();

            document.Close();
            document_new.Close();
            word.Quit();
        }
        public void classifyRange2Test()
        {
            Application application = new Application();
            Document    document    = application.Documents.Open(@"G:\abi\word_module\Word_Table\doc1.docx");
            Document    document2   = application.Documents.Open(@"G:\abi\word_module\Word_Table\doc2.docx");

            application.Visible = true;
            ABIW_TextRange a  = new ABIW_TextRange(document.Range());
            ABIW_TextRange a2 = new ABIW_TextRange(document2.Range());
            //List<Range> ranges = new List<Range>();
            //List<object> ranges = a.classifyRange2(document, document.Range());
            bool ab  = a.checkEqualText(a.Range, a2.Range);
            bool ab2 = a.checkTwoParagraphs(a.Range.Paragraphs, a2.Range.Paragraphs);
            bool ab3 = a.check(a2);
            ComparisonResultIndicate result = a.Compare(a2).Result;
            //List<Range> ranges =
            List <Range> list = new List <Range>();

            //Range range =
            //a.ClassifyRange2(a2.Range);
            a.Test(a.Range);
            document.Close();
            document2.Close();
            application.Quit();
        }
Esempio n. 3
0
        public void CompareTest()
        {
            Application              application = new Application();
            Document                 document    = application.Documents.Open(@"E:\path2 - Copy.docx");
            Document                 document2   = application.Documents.Open(@"E:\path2.docx");
            ABIW_Paragraph           a           = new ABIW_Paragraph(document.Range().Paragraphs[1]);
            ABIW_Paragraph           b           = new ABIW_Paragraph(document2.Range().Paragraphs[1]);
            ComparisonResultIndicate result      = a.Compare(b).Result;

            //bool x = a.checkEqualParagraph(a.Paragraph, b.Paragraph);
            document.Close();
            document2.Close();
            application.Quit();
        }
        public void CompareTest()
        {
            Application xlApp = new Application();
            Workbook    xlWb1 = xlApp.Workbooks.Open(@"C:\Users\phamv\Desktop\TKB.xlsx");


            Workbook xlWb2 = xlApp.Workbooks.Open(@"C:\Users\phamv\Desktop\TKBCopy.xlsx");

            ABIE_WorkBook            workbook      = new ABIE_WorkBook(xlWb1);
            ABIE_WorkBook            otherWorkbook = new ABIE_WorkBook(xlWb2);
            ComparisonResultIndicate result        = workbook.Compare(otherWorkbook).Result;
            string str_result = result.ToString();

            xlWb1.Close();
            xlWb2.Close();
            xlApp.Quit();
        }
Esempio n. 5
0
        public void CompareTest()
        {
            Application xlApp = new Application();
            Workbook    xlWb1 = xlApp.Workbooks.Open(@"C:\Users\phamv\Desktop\TKB.xlsx");
            Workbook    xlWb2 = xlApp.Workbooks.Open(@"C:\Users\phamv\Desktop\TKBCopy.xlsx");

            Worksheet xlWs2 = (Worksheet)xlWb2.Worksheets.get_Item(1);
            Worksheet xlWs1 = (Worksheet)xlWb1.Worksheets.get_Item(1);

            ABIE_Paragraph           paragraph      = new ABIE_Paragraph(xlWs1.PageSetup);
            ABIE_Paragraph           otherParagraph = new ABIE_Paragraph(xlWs2.PageSetup);
            ComparisonResultIndicate result         = paragraph.Compare(otherParagraph).Result;

            xlWb1.Save();
            xlWb2.Save();
            xlWb1.Close();
            xlWb2.Close();
            xlApp.Quit();
        }
        public void CompareTest()
        {
            Application xlApp = new Application();
            Workbook    xlWb1 = xlApp.Workbooks.Open(@"C:\Users\phamv\Desktop\TKB.xlsx");
            Workbook    xlWb2 = xlApp.Workbooks.Open(@"C:\Users\phamv\Desktop\TKBCopy.xlsx");

            Worksheet xlWs2 = (Worksheet)xlWb2.Worksheets.get_Item(1);
            Worksheet xlWs1 = (Worksheet)xlWb1.Worksheets.get_Item(1);

            Range      range1               = xlWs1.UsedRange;
            Range      rang2                = xlWs2.UsedRange;
            ABIE_Range range                = new ABIE_Range(range1);
            ABIE_Range otherRange           = new ABIE_Range(rang2);
            ComparisonResultIndicate result = range.Compare(otherRange).Result;
            string str_result               = result.ToString();

            xlWb1.Save();
            xlWb2.Save();
            xlWb1.Close();
            xlWb2.Close();
            xlApp.Quit();
        }
 public ComparisonResult(ComparisonResultIndicate result)
 {
     this.result = result;
 }