protected int AssignBuiltInCategory(MainDataSet.CategoriesRow selectedCategory) { var options = FillScoreOptions(selectedCategory); var formProgress = new FormGenericProgress("Assigning categories...", DoAssignBuiltInCategory, options, true); formProgress.ShowDialog(_views.MainForm); return(options.ResultCount); }
protected void CalculateStatistics() { //SaveRegExpToDatabase(); /////////////////////////////////////////////////////////////////////////////// var entityLabel = (_source.Current as DataRowView).Row["Entity"]; /////////////////////////////////////////////////////////////////////////////// var formProgress = new FormGenericProgress("Calculating statistics...", DoCalculateStatistics, (string)entityLabel, true); formProgress.ShowDialog(); ((BindingSource)gridStatistics.DataSource).ResetBindings(false); }
public bool Sort(out string filter) { var reportsProgress = _sortOptions.LeaveOneDocument; var title = reportsProgress ? "Recycling documents..." : "Sorting documents..."; var formProgress = new FormGenericProgress(title, DoSort, null, reportsProgress); formProgress.ShowDialog(_views.MainForm); if (formProgress.Result && _stopwatch != null) { MessageBox.Show($"Sorting done in {_stopwatch.Elapsed.TotalMilliseconds}", MainForm.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information); } filter = _filter; return(formProgress.Result); }
protected void RunMethod(UpdateMethod method) { var args = new MethodArgs { Method = method, MaxRowsToUpdate = Convert.ToInt64(txtMaxRowsToUpdate.Value), PrepareCommand = chkbPrepareCommand.Checked }; /////////////////////////////////////////////////////////////////////////////// var progressForm = new FormGenericProgress(method.ToString(), PerformOperation, args, true); progressForm.ShowDialog(); /////////////////////////////////////////////////////////////////////////////// ShowResults(args); }
protected void InvokeNavigate(MatchNavigationMode mode) { try { if (_isDirty) { } var formProgress = new FormGenericProgress("Navigating...", DoNavigate, mode, true) { CancellationEnabled = true }; formProgress.ShowDialog(); } catch (Exception ex) { MainForm.ShowExceptionMessage(ex); } }