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; } }
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; }
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) { 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 (); }