Changeset 15280 for branches/Async/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
- Timestamp:
- 07/23/17 00:52:14 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Views (added) merged: 13397,13439,13592,13705,13711,13715,13764,13766,13938,13942,13958,13992
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
r12012 r15280 20 20 #endregion 21 21 22 using System; 23 using System.Linq; 24 using System.Threading.Tasks; 22 25 using System.Windows.Forms; 23 26 using HeuristicLab.Core; 27 using HeuristicLab.Data; 28 using HeuristicLab.Data.Views; 24 29 using HeuristicLab.MainForm; 30 using HeuristicLab.MainForm.WindowsForms; 25 31 26 32 namespace HeuristicLab.Problems.DataAnalysis.Views { … … 35 41 get { return (RegressionSolutionBase)base.Content; } 36 42 set { base.Content = value; } 43 } 44 45 protected override void SetEnabledStateOfControls() { 46 base.SetEnabledStateOfControls(); 47 btnImpactCalculation.Enabled = Content != null && !Locked; 48 } 49 50 protected virtual void btnImpactCalculation_Click(object sender, EventArgs e) { 51 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; 52 var view = new StringConvertibleArrayView(); 53 view.Caption = Content.Name + " Variable Impacts"; 54 view.Show(); 55 56 Task.Factory.StartNew(() => { 57 try { 58 mainForm.AddOperationProgressToView(view, "Calculating variable impacts for " + Content.Name); 59 60 var impacts = RegressionSolutionVariableImpactsCalculator.CalculateImpacts(Content); 61 var impactArray = new DoubleArray(impacts.Select(i => i.Item2).ToArray()); 62 impactArray.ElementNames = impacts.Select(i => i.Item1); 63 view.Content = (DoubleArray)impactArray.AsReadOnly(); 64 } 65 finally { 66 mainForm.RemoveOperationProgressFromView(view); 67 } 68 }); 37 69 } 38 70
Note: See TracChangeset
for help on using the changeset viewer.