Changeset 10540 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs
- Timestamp:
- 03/05/14 15:08:11 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.