Changeset 10540 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4
- Timestamp:
- 03/05/14 15:08:11 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj
r8636 r10540 152 152 <Private>False</Private> 153 153 </ProjectReference> 154 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj"> 155 <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project> 156 <Name>HeuristicLab.Common.Resources-3.3</Name> 157 <Private>False</Private> 158 </ProjectReference> 154 159 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj"> 155 160 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.Designer.cs
r9973 r10540 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.exportButton = new System.Windows.Forms.Button(); 48 this.exportFileDialog = new System.Windows.Forms.SaveFileDialog(); 47 49 this.btnSimplify = new System.Windows.Forms.Button(); 48 50 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); … … 53 55 this.detailsGroupBox.SuspendLayout(); 54 56 this.SuspendLayout(); 55 exportButton.Visible = false;56 57 // 57 // splitContainer58 // flowLayoutPanel 58 59 // 59 // 60 // splitContainer.Panel1 61 // 62 this.splitContainer.Panel1.Controls.Add(this.btnSimplify); 60 this.flowLayoutPanel.Controls.Add(this.btnSimplify); 61 this.flowLayoutPanel.Controls.Add(this.exportButton); 63 62 // 64 63 // btnSimplify 65 64 // 66 this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 67 this.btnSimplify.Location = new System.Drawing.Point(172, 4); 65 this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); 66 this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator; 67 this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 68 68 this.btnSimplify.Name = "btnSimplify"; 69 this.btnSimplify.Size = new System.Drawing.Size(75, 23); 70 this.btnSimplify.TabIndex = 6; 71 this.btnSimplify.Text = "Simplify"; 69 this.btnSimplify.Size = new System.Drawing.Size(105, 24); 70 this.btnSimplify.TabIndex = 7; 71 this.btnSimplify.Text = "Simplify Model"; 72 this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 72 73 this.btnSimplify.UseVisualStyleBackColor = true; 73 74 this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click); 75 this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution"); 74 76 // 75 // SymbolicDiscriminantFunctionClassificationSolutionView 77 // exportButton 78 // 79 this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); 80 this.exportButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Statistics; 81 this.exportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 82 this.exportButton.Name = "exportButton"; 83 this.exportButton.Size = new System.Drawing.Size(105, 24); 84 this.exportButton.TabIndex = 8; 85 this.exportButton.Text = "Export to Excel "; 86 this.exportButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 87 this.exportButton.UseVisualStyleBackColor = true; 88 this.exportButton.Click += new System.EventHandler(this.exportButton_Click); 89 // 90 // SymbolicClassificationSolutionView 76 91 // 77 92 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); … … 88 103 #endregion 89 104 105 protected System.Windows.Forms.SaveFileDialog exportFileDialog; 106 protected System.Windows.Forms.Button exportButton; 90 107 protected System.Windows.Forms.Button btnSimplify; 91 108 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.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 var view = new InteractiveSymbolicClassificationSolutionSimplifierView(); … … 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 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs
r9973 r10540 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SymbolicDiscriminantFunctionClassificationSolutionView)); 47 this.exportButton = new System.Windows.Forms.Button(); 48 this.exportFileDialog = new System.Windows.Forms.SaveFileDialog(); 48 49 this.btnSimplify = new System.Windows.Forms.Button(); 49 50 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); … … 54 55 this.detailsGroupBox.SuspendLayout(); 55 56 this.SuspendLayout(); 56 exportButton.Visible = false;57 57 // 58 // splitContainer58 // flowLayoutPanel 59 59 // 60 // 61 // splitContainer.Panel1 62 // 63 this.splitContainer.Panel1.Controls.Add(this.btnSimplify); 60 this.flowLayoutPanel.Controls.Add(this.btnSimplify); 61 this.flowLayoutPanel.Controls.Add(this.exportButton); 64 62 // 65 63 // btnSimplify 66 64 // 67 this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 68 this.btnSimplify.Location = new System.Drawing.Point(172, 4); 65 this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); 66 this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator; 67 this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 69 68 this.btnSimplify.Name = "btnSimplify"; 70 this.btnSimplify.Size = new System.Drawing.Size(75, 23); 71 this.btnSimplify.TabIndex = 6; 72 this.btnSimplify.Text = "Simplify"; 69 this.btnSimplify.Size = new System.Drawing.Size(105, 24); 70 this.btnSimplify.TabIndex = 7; 71 this.btnSimplify.Text = "Simplify Model"; 72 this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 73 73 this.btnSimplify.UseVisualStyleBackColor = true; 74 74 this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click); 75 this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution"); 76 // 77 // exportButton 78 // 79 this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); 80 this.exportButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Statistics; 81 this.exportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 82 this.exportButton.Name = "exportButton"; 83 this.exportButton.Size = new System.Drawing.Size(105, 24); 84 this.exportButton.TabIndex = 8; 85 this.exportButton.Text = "Export to Excel "; 86 this.exportButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 87 this.exportButton.UseVisualStyleBackColor = true; 88 this.exportButton.Click += new System.EventHandler(this.exportButton_Click); 75 89 // 76 90 // SymbolicDiscriminantFunctionClassificationSolutionView … … 89 103 #endregion 90 104 105 protected System.Windows.Forms.SaveFileDialog exportFileDialog; 106 protected System.Windows.Forms.Button exportButton; 91 107 protected System.Windows.Forms.Button btnSimplify; 92 108 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.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 var view = new InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView(); … … 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.