示例#1
0
        public void Init()
        {
            var wordSplit = new WordSplit("demo");

            WordSampleMerge = wordSplit;
            WordSampleSplit = wordSplit;
            SplitXml        = wordSplit;

            DocValidator = new OpenXmlValidator();

            var parts = PartsSelectionTreeElementMock.GetListMock();

            CreateSplitXmlBinary = SplitXml.CreateSplitXml(parts);

            WordSampleDocInMemory = new MemoryStream(File.ReadAllBytes(@"../../../Files/demo.docx"));

            byte[] sampleXmlBinary = File.ReadAllBytes(@"../../../Files/split_demo.docx_20170227215840894.xml");
            wordSplit.OpenAndSearchDocument(WordSampleDocInMemory, new MemoryStream(sampleXmlBinary));

            MergeXmlBinary = WordSampleMerge.CreateMergeXml();

            ErrorsCount   = 0;
            WarningsCount = 0;
        }
        public void Init()
        {
            var presentationSplit = new PresentationSplit("przykladowa-prezentacja");

            PreSampleMerge = presentationSplit;
            DocSampleSplit = presentationSplit;
            SplitXml       = presentationSplit;

            DocValidator = new OpenXmlValidator();

            var parts = PartsSelectionTreeElementMock.GetListMock();

            CreateSplitXmlBinary = SplitXml.CreateSplitXml(parts);

            PreSampleDocInMemory = new MemoryStream(File.ReadAllBytes(@"../../../Files/przykladowa-prezentacja.pptx"));

            byte[] sampleXmlBinary = File.ReadAllBytes(@"../../../Files/split_przykladowa-prezentacja.pptx_20170227215707619.xml");
            presentationSplit.OpenAndSearchDocument(PreSampleDocInMemory, new MemoryStream(sampleXmlBinary));

            MergeXmlBinary = PreSampleMerge.CreateMergeXml();

            ErrorsCount   = 0;
            WarningsCount = 0;
        }
        public void Init()
        {
            var excelSplit = new ExcelSplit("ExcelTutorialR1 — edytowalny");

            ExcSampleSplit = excelSplit;
            SplitXml       = excelSplit;
            ExcSampleMerge = excelSplit;

            DocValidator = new OpenXmlValidator();

            var parts = PartsSelectionTreeElementMock.GetListMock();

            CreateSplitXmlBinary = SplitXml.CreateSplitXml(parts);

            ExcSampleDocInMemory = new MemoryStream(File.ReadAllBytes(@"../../../Files/ExcelTutorialR1 — edytowalny.xlsx"));

            byte[] sampleXmlBinary = File.ReadAllBytes(@"../../../Files/split_ExcelTutorialR1 — edytowalny.xlsx_20170304230639351.xml");
            excelSplit.OpenAndSearchDocument(ExcSampleDocInMemory, new MemoryStream(sampleXmlBinary));

            MergeXmlBinary = ExcSampleMerge.CreateMergeXml();

            ErrorsCount   = 0;
            WarningsCount = 0;
        }