Ejemplo n.º 1
0
        public void onShown(object sender, EventArgs e)
        {
            //Парсинг xlsx'ов

            this.currentCreatedTest.Text = Convert.ToString(0);
            XlsxParser parser = XlsxParser.getInstance();

            //parser.countTotalRows(this.map);
            parser.skip();

            log.Info("Парсим вспомогательные xlsx файлы(contacts, beneficiars,logins)");
            contacts    = parser.parseHelperFile(".\\config\\", "config_contact*.xlsx");
            beneficiars = parser.parseHelperFile(".\\config\\", "config_beneficiar*.xlsx");
            logins      = parser.parseHelperFile(".\\config\\", "config_login*.xlsx");


            xlsxParseWorker                            = new AbortableWorker();
            xlsxParseWorker.DoWork                    += DoWorkXlsx;
            xlsxParseWorker.ProgressChanged           += ProgressChangedXlsx;
            xlsxParseWorker.RunWorkerCompleted        += WorkerCompletedXlsx;
            xlsxParseWorker.WorkerReportsProgress      = true;
            xlsxParseWorker.WorkerSupportsCancellation = true;

            this.dataFinished += new DataFinishedEvent(this.OnDataFinished);
            xlsxParseWorker.RunWorkerAsync();
        }
Ejemplo n.º 2
0
        public void OnDataFinished(object sender, DataFinishedEventArg e)
        {
            testCreatingWorker                            = new AbortableWorker();
            testCreatingWorker.DoWork                    += DoWork;
            testCreatingWorker.ProgressChanged           += ProgressChanged;
            testCreatingWorker.RunWorkerCompleted        += WorkerCompleted;
            testCreatingWorker.WorkerReportsProgress      = true;
            testCreatingWorker.WorkerSupportsCancellation = true;

            testCreatingWorker.RunWorkerAsync();
        }