Changeset 18086 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis.Views
- Timestamp:
- 11/19/21 16:07:45 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs
r17226 r18086 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.