- Timestamp:
- 11/16/17 10:30:21 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/EnhancedProgress/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs
r15446 r15477 46 46 47 47 Task.Factory.StartNew(() => { 48 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; 48 var activeView = (IContentView)MainFormManager.MainForm.ActiveView; 49 var content = activeView.Content; 49 50 // lock active view and show progress bar 50 IContentView activeView = (IContentView)MainFormManager.MainForm.ActiveView; 51 try { 52 var progress = Progress.Show(content, "Loading problem instance."); 51 53 52 try { 53 var progress = mainForm.AddOperationProgressToContent(activeView.Content, 54 "Loading problem instance.", 0); 54 Content.ProgressChanged += (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; }; 55 55 56 Content.ProgressChanged += 57 (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; }; 58 59 instance = Content.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, 60 importTypeDialog.CSVFormat); 56 instance = Content.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat); 61 57 } catch (Exception ex) { 62 58 ErrorWhileParsing(ex); 63 59 return; 64 60 } finally { 65 mainForm.RemoveOperationProgressFromContent(activeView.Content);61 Progress.Hide(content); 66 62 } 67 63
Note: See TracChangeset
for help on using the changeset viewer.