Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs
r17426 r17646 179 179 180 180 private void UpdateProgressValue() { 181 if (Disposing || IsDisposed) return; 181 182 if (InvokeRequired) { 182 183 Invoke((Action)UpdateProgressValue); -
trunk/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs
r17180 r17646 49 49 var content = activeView.Content; 50 50 // lock active view and show progress bar 51 IProgress progress = null; 51 52 try { 52 varprogress = Progress.Show(content, "Loading problem instance.");53 progress = Progress.Show(content, "Loading problem instance."); 53 54 54 Content.ProgressChanged += (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; }; 55 Content.ProgressChanged += (o, args) => { 56 lock (progress) { 57 if (progress.ProgressState == ProgressState.Started) 58 progress.ProgressValue = args.ProgressPercentage / 100.0; 59 } 60 }; 55 61 56 62 instance = Content.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); … … 59 65 return; 60 66 } finally { 61 Progress.Hide(content); 67 lock (progress) { 68 Progress.Hide(content); 69 } 62 70 } 63 71
Note: See TracChangeset
for help on using the changeset viewer.