- Timestamp:
- 04/14/16 18:04:53 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.Designer.cs
r12012 r13766 19 19 */ 20 20 #endregion 21 21 22 22 23 namespace HeuristicLab.Problems.DataAnalysis.Views { … … 45 46 /// </summary> 46 47 private void InitializeComponent() { 48 this.btnImpactCalculation = new System.Windows.Forms.Button(); 47 49 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 48 50 this.splitContainer.Panel1.SuspendLayout(); … … 52 54 this.detailsGroupBox.SuspendLayout(); 53 55 this.SuspendLayout(); 56 // 57 // btnImpactCalculation 58 // 59 this.btnImpactCalculation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); 60 this.btnImpactCalculation.Image = HeuristicLab.Common.Resources.VSImageLibrary.Zoom; 61 this.btnImpactCalculation.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 62 this.btnImpactCalculation.Name = "btnImpactCalculation"; 63 this.btnImpactCalculation.TabIndex = 6; 64 this.btnImpactCalculation.Size = new System.Drawing.Size(110, 24); 65 this.btnImpactCalculation.Text = "Variable Impacts"; 66 this.btnImpactCalculation.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 67 this.btnImpactCalculation.UseVisualStyleBackColor = true; 68 this.btnImpactCalculation.Click += new System.EventHandler(this.btnImpactCalculation_Click); 69 this.toolTip.SetToolTip(this.btnImpactCalculation, "Simplify solution"); 70 // 71 // flowLayoutPanel 72 // 73 this.flowLayoutPanel.Controls.Add(this.btnImpactCalculation); 54 74 // 55 75 // splitContainer … … 84 104 85 105 #endregion 106 107 protected System.Windows.Forms.Button btnImpactCalculation; 86 108 } 87 109 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
r12012 r13766 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 virtual void btnImpactCalculation_Click(object sender, EventArgs e) { 46 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; 47 var view = new StringConvertibleArrayView(); 48 view.Caption = Content.Name + " Variable Impacts"; 49 view.Show(); 50 51 Task.Factory.StartNew(() => { 52 try { 53 mainForm.AddOperationProgressToView(view, "Calculating variable impacts for " + Content.Name); 54 55 var impacts = RegressionSolutionVariableImpactsCalculator.CalculateImpacts(Content); 56 var impactArray = new DoubleArray(impacts.Select(i => i.Item2).ToArray()); 57 impactArray.ElementNames = impacts.Select(i => i.Item1); 58 view.Content = (DoubleArray)impactArray.AsReadOnly(); 59 } 60 finally { 61 mainForm.RemoveOperationProgressFromView(view); 62 } 63 }); 37 64 } 38 65
Note: See TracChangeset
for help on using the changeset viewer.