- Timestamp:
- 03/05/14 15:08:11 (11 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj
r8600 r10540 157 157 <Private>False</Private> 158 158 </ProjectReference> 159 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj"> 160 <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project> 161 <Name>HeuristicLab.Common.Resources-3.3</Name> 162 <Private>False</Private> 163 </ProjectReference> 159 164 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj"> 160 165 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project> … … 284 289 --> 285 290 <PropertyGroup> 286 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)291 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 287 292 set ProjectDir=$(ProjectDir) 288 293 set SolutionDir=$(SolutionDir) … … 291 296 call PreBuildEvent.cmd 292 297 </PreBuildEvent> 293 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">298 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 294 299 export ProjectDir=$(ProjectDir) 295 300 export SolutionDir=$(SolutionDir) -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.Designer.cs
r9973 r10540 19 19 */ 20 20 #endregion 21 21 22 22 23 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views { … … 45 46 /// </summary> 46 47 private void InitializeComponent() { 48 this.exportButton = new System.Windows.Forms.Button(); 49 this.exportFileDialog = new System.Windows.Forms.SaveFileDialog(); 47 50 this.btnSimplify = new System.Windows.Forms.Button(); 48 51 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); … … 54 57 this.SuspendLayout(); 55 58 // 56 // splitContainer59 // flowLayoutPanel 57 60 // 58 // 59 // splitContainer.Panel1 60 // 61 this.splitContainer.Panel1.Controls.Add(this.btnSimplify); 62 // 63 // addButton 64 // 65 this.toolTip.SetToolTip(this.addButton, "Add"); 66 // 67 // removeButton 68 // 69 this.toolTip.SetToolTip(this.removeButton, "Remove"); 61 this.flowLayoutPanel.Controls.Add(this.btnSimplify); 62 this.flowLayoutPanel.Controls.Add(this.exportButton); 70 63 // 71 64 // btnSimplify 72 65 // 73 this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 74 this.btnSimplify.Location = new System.Drawing.Point(172, 4); 66 this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); 67 this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator; 68 this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 75 69 this.btnSimplify.Name = "btnSimplify"; 76 this.btnSimplify.Size = new System.Drawing.Size(75, 23); 77 this.btnSimplify.TabIndex = 6; 78 this.btnSimplify.Text = "Simplify"; 70 this.btnSimplify.TabIndex = 7; 71 this.btnSimplify.Size = new System.Drawing.Size(105, 24); 72 this.btnSimplify.Text = "Simplify Model"; 73 this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 79 74 this.btnSimplify.UseVisualStyleBackColor = true; 80 75 this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click); 76 this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution"); 77 // 78 // exportButton 79 // 80 this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); 81 this.exportButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Statistics; 82 this.exportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 83 this.exportButton.Name = "exportButton"; 84 this.exportButton.Size = new System.Drawing.Size(105, 24); 85 this.exportButton.TabIndex = 8; 86 this.exportButton.Text = "Export to Excel "; 87 this.exportButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 88 this.exportButton.UseVisualStyleBackColor = true; 89 this.exportButton.Click += new System.EventHandler(this.exportButton_Click); 81 90 // 82 91 // SymbolicRegressionSolutionView … … 95 104 96 105 #endregion 97 private System.Windows.Forms.Button btnSimplify; 106 protected System.Windows.Forms.SaveFileDialog exportFileDialog; 107 protected System.Windows.Forms.Button exportButton; 108 protected System.Windows.Forms.Button btnSimplify; 98 109 } 99 110 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs
r9456 r10540 21 21 22 22 using System; 23 using System.ComponentModel; 23 24 using System.Windows.Forms; 24 25 using HeuristicLab.MainForm; 26 using HeuristicLab.Problems.DataAnalysis.Symbolic.Views; 25 27 using HeuristicLab.Problems.DataAnalysis.Views; 26 28 … … 38 40 } 39 41 42 protected override void SetEnabledStateOfControls() { 43 base.SetEnabledStateOfControls(); 44 btnSimplify.Enabled = Content != null && !Locked; 45 exportButton.Enabled = Content != null && !Locked; 46 } 47 40 48 private void btn_SimplifyModel_Click(object sender, EventArgs e) { 41 49 InteractiveSymbolicRegressionSolutionSimplifierView view = new InteractiveSymbolicRegressionSolutionSimplifierView(); … … 43 51 view.Show(); 44 52 } 53 54 private void exportButton_Click(object sender, EventArgs e) { 55 var exporter = new SymbolicSolutionExcelExporter(); 56 exportFileDialog.Filter = exporter.FileTypeFilter; 57 if (exportFileDialog.ShowDialog(this) == DialogResult.OK) { 58 59 var name = exportFileDialog.FileName; 60 using (BackgroundWorker bg = new BackgroundWorker()) { 61 MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Exportion solution to " + name + "."); 62 bg.DoWork += (o, a) => exporter.Export(Content, name); 63 bg.RunWorkerCompleted += (o, a) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 64 bg.RunWorkerAsync(); 65 } 66 } 67 } 45 68 } 46 69 }
Note: See TracChangeset
for help on using the changeset viewer.