Changeset 2 for Common/FormProgress.cs
- Timestamp:
- Feb 14, 2019, 5:29:40 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/FormProgress.cs
r1 r2 77 77 private void bg_DoWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) 78 78 { 79 if (e.Error != null) 80 { 81 currentTask.terminated = true; 82 MessageBox.Show(e.Error.Message, "Error in background task", MessageBoxButtons.OK, MessageBoxIcon.Error); 83 } 79 84 if (!currentTask.terminated) 80 85 { … … 91 96 } 92 97 else Close(); 93 if (e.Error != null)94 {95 MessageBox.Show(e.Error.Message, "Error in background task", MessageBoxButtons.OK, MessageBoxIcon.Error);96 }97 98 } 98 99 … … 134 135 foreach (var task in tasks) 135 136 { 136 if (task.completed) completed += 1; 137 if (task.completed) completed += 1; 137 138 } 138 139 return completed == tasks.Count; … … 154 155 public int current; 155 156 public bool terminated; 156 public bool completed; // If task was not terminated dur ring execution.157 public bool completed; // If task was not terminated during execution. 157 158 public string operation; 158 159 public delegate void CallbackEventHandler(Progress progress);
Note:
See TracChangeset
for help on using the changeset viewer.