private void ProgressOnProgressChanged(object sender, ManagerProgressChangedEventArgs args) { _log.Debug("ProgressOnProgressChanged Busy = " + _taskManager.Busy); var vector = args.UserState as Dictionary<MicroTaskStates, int>; if (vector != null) { var logOffset = 8*args.TaskIndex; barTask.Value = args.ProgressPercentage; lblTaskBar.Text = string.Format(" Task {1}/{2}: {0}%", barTask.Value, args.TaskIndex + 1, _taskManager.Tasks.Count); barSummary.Value = args.ProgressPercentage/_taskManager.Tasks.Count; lblSummaryBar.Text = string.Format("Total: {0}%", barSummary.Value); if (LogBox.Lines.Length < logOffset + 1) { _logBoxSource.AddRange(new[] {"", "", "", "", "", "", "", ""}); } _logBoxSource[logOffset] = "Task " + (args.TaskIndex + 1); for (var i = 1; i < MicroTaskStatesHelper.StatesArray.Length; i++) { _logBoxSource[i + logOffset] = string.Format("{0}: {1}/{2}", MicroTaskStatesHelper.StatesArray[i], vector[MicroTaskStatesHelper.StatesArray[i]], vector[MicroTaskStates.None]); } } LogBox.Lines = _logBoxSource.ToArray(); }
private void RefreshStatisticsForced() { var args = new ManagerProgressChangedEventArgs(_currentTaskIndex, Tasks[_currentTaskIndex].GetStatistics()); _progress.Report(Tasks[_currentTaskIndex], args); }
private void RefreshStatisticsForced() { var args = new ManagerProgressChangedEventArgs(_currentTaskIndex, Tasks[_currentTaskIndex].GetStatistics()); _progress.Report(Tasks[_currentTaskIndex], args); }