Ejemplo n.º 1
0
        private void ReportProgress()
        {
            switch (_currentProcess)
            {
            case ProcessType.Export:
            {
                if (ExportProgressChanged == null)
                {
                    return;
                }
                var arg = new ExportProgressArgs(_currentTableName, _totalRowsInCurrentTable, _totalRowsInAllTables,
                                                 _currentRowIndexInCurrentTable, _currentRowIndexInAllTable, _totalTables, _currentTableIndex);
                ExportProgressChanged(this, arg);
            }
            break;

            case ProcessType.Import:
            {
                if (ImportProgressChanged == null)
                {
                    return;
                }
                var arg = new ImportProgressArgs(_currentBytes, _totalBytes);
                ImportProgressChanged(this, arg);
            }
            break;
            }
        }
Ejemplo n.º 2
0
 void ReportProgress()
 {
     if (currentProcess == ProcessType.Export)
     {
         if (ExportProgressChanged != null)
         {
             ExportProgressArgs arg = new ExportProgressArgs(_currentTableName, _totalRowsInCurrentTable, _totalRowsInAllTables, _currentRowIndexInCurrentTable, _currentRowIndexInAllTable, _totalTables, _currentTableIndex);
             ExportProgressChanged(this, arg);
         }
     }
     else if (currentProcess == ProcessType.Import)
     {
         if (ImportProgressChanged != null)
         {
             ImportProgressArgs arg = new ImportProgressArgs(_currentBytes, _totalBytes);
             ImportProgressChanged(this, arg);
         }
     }
 }
        void mb_ExportProgressChanged(object sender, ExportProgressArgs e)
        {
            if (cancel)
            {
                mb.StopAllProcess();
                return;
            }

            _currentRowIndexInAllTable = (int)e.CurrentRowIndexInAllTables;
            _currentRowIndexInCurrentTable = (int)e.CurrentRowIndexInCurrentTable;
            _currentTableIndex = e.CurrentTableIndex;
            _currentTableName = e.CurrentTableName;
            _totalRowsInAllTables = (int)e.TotalRowsInAllTables;
            _totalRowsInCurrentTable = (int)e.TotalRowsInCurrentTable;
            _totalTables = e.TotalTables;
        }
Ejemplo n.º 4
0
 void ReportProgress()
 {
     if (currentProcess == ProcessType.Export)
     {
         if (ExportProgressChanged != null)
         {
             ExportProgressArgs arg = new ExportProgressArgs(_currentTableName, _totalRowsInCurrentTable, _totalRowsInAllTables, _currentRowIndexInCurrentTable, _currentRowIndexInAllTable, _totalTables, _currentTableIndex);
             ExportProgressChanged(this, arg);
         }
     }
     else if (currentProcess == ProcessType.Import)
     {
         if (ImportProgressChanged != null)
         {
             ImportProgressArgs arg = new ImportProgressArgs(_currentBytes, _totalBytes);
             ImportProgressChanged(this, arg);
         }
     }
 }
Ejemplo n.º 5
0
 void Mb_ExportProgressChanged(object sender, ExportProgressArgs e)
 {
     progressbarOperation.Text = String.Format ("Экспорт {0}", e.CurrentTableName);
     progressbarOperation.Adjustment.Upper = e.TotalRowsInCurrentTable;
     progressbarOperation.Adjustment.Value = e.CurrentRowIndexInCurrentTable;
     progressbarTotal.Adjustment.Upper = e.TotalTables;
     progressbarTotal.Adjustment.Value = e.CurrentTableIndex;
     QSMain.WaitRedraw ();
 }