Example #1
0
 private void extractFile()
 {
     formWait = new FormWait();
     formWait.setLabel("extracting file");
     formWait.FormClosing += new FormClosingEventHandler(waitFormClosingEventHandler);
     formWait.setStyle(ProgressBarStyle.Marquee);
     formWait.end("");
     backgroudWoker                            = new BackgroundWorker();
     backgroudWoker.DoWork                    += new DoWorkEventHandler(extractFileDoWork);
     backgroudWoker.RunWorkerCompleted        += new RunWorkerCompletedEventHandler(extractFileRunWorkerCompletedEventHandler);
     backgroudWoker.WorkerSupportsCancellation = true;
     backgroudWoker.RunWorkerAsync();
     formWait.ShowDialog();
 }
Example #2
0
 public void openFileUsingParsing()
 {
     this.formWait              = new FormWait();
     this.formWait.FormClosing += new FormClosingEventHandler(waitFormClosingEventHandler);
     this.formWait.setStyle(ProgressBarStyle.Blocks);
     this.formWait.end("");
     this.formWait.setLabel("parsing normal records in the file");
     backgroudWoker                            = new BackgroundWorker();
     backgroudWoker.DoWork                    += new DoWorkEventHandler(parseTableDoWork);
     backgroudWoker.RunWorkerCompleted        += new RunWorkerCompletedEventHandler(parseTableRunWorkerCompletedEventHandler);
     backgroudWoker.WorkerSupportsCancellation = true;
     backgroudWoker.RunWorkerAsync();
     this.formWait.ShowDialog();
 }
Example #3
0
        public void saveData(FormSave formSave, String tableName, List <ColumnInformation> columnInformationList)
        {
            isSaveData                                = true;
            isReadData                                = false;
            this.formSave                             = formSave;
            backgroudWoker                            = new BackgroundWorker();
            backgroudWoker.DoWork                    += new DoWorkEventHandler(readRecordsDoWork);
            backgroudWoker.RunWorkerCompleted        += new RunWorkerCompletedEventHandler(saveRunWorkerCompletedEventHandler);
            backgroudWoker.WorkerSupportsCancellation = true;
            var tableData = new Tuple <String, List <ColumnInformation> >(tableName, columnInformationList);

            formWait              = new FormWait();
            formWait.FormClosing += new FormClosingEventHandler(waitFormClosingEventHandler);
            backgroudWoker.RunWorkerAsync(tableData);
            formWait.ShowDialog();
        }