- Timestamp:
- 10/13/16 19:47:41 (8 years ago)
- Location:
- branches/symbreg-factors-2650
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650
- Property svn:mergeinfo changed
/trunk/sources merged: 14282,14284-14300,14307,14314-14316,14319,14322
- Property svn:mergeinfo changed
-
branches/symbreg-factors-2650/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs
r14185 r14330 141 141 142 142 private void UpdateProgressValue() { 143 if (InvokeRequired) Invoke((Action)UpdateProgressValue); 144 else { 143 // prevent problems with object disposal and invoke as suggested by http://stackoverflow.com/a/18647091 144 if (!IsHandleCreated) return; 145 if (InvokeRequired) { 146 try { 147 Invoke((Action)UpdateProgressValue); 148 } 149 catch (InvalidOperationException) { 150 // swallow ObjectDisposedException 151 // which might occur if the invoke call is executed after or while the control is disposing 152 } 153 } else { 145 154 if (content != null) { 146 155 double progressValue = content.ProgressValue; … … 149 158 } else { 150 159 progressBar.Style = ProgressBarStyle.Blocks; 151 progressBar.Value = (int)Math.Round(progressBar.Minimum + progressValue * (progressBar.Maximum - progressBar.Minimum)); 160 progressBar.Value = 161 (int)Math.Round(progressBar.Minimum + progressValue * (progressBar.Maximum - progressBar.Minimum)); 152 162 } 153 163 }
Note: See TracChangeset
for help on using the changeset viewer.