Last change
on this file since 3442 was
3442,
checked in by gkronber, 15 years ago
|
Implemented views for DataAnalysisProblems and DataAnalysisSolutions. #938 (Data types and operators for regression problems)
|
File size:
1.3 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.ComponentModel;
|
---|
4 | using System.Drawing;
|
---|
5 | using System.Data;
|
---|
6 | using System.Linq;
|
---|
7 | using System.Text;
|
---|
8 | using System.Windows.Forms;
|
---|
9 | using HeuristicLab.Core.Views;
|
---|
10 | using HeuristicLab.MainForm;
|
---|
11 |
|
---|
12 | namespace HeuristicLab.Problems.DataAnalysis.Views {
|
---|
13 | [View("Data-Analysis Problem View")]
|
---|
14 | [Content(typeof(DataAnalysisProblemData))]
|
---|
15 | public partial class DataAnalysisProblemDataView : NamedItemView {
|
---|
16 | private OpenFileDialog openFileDialog;
|
---|
17 | public new DataAnalysisProblemData Content {
|
---|
18 | get { return (DataAnalysisProblemData)base.Content; }
|
---|
19 | set {
|
---|
20 | base.Content = value;
|
---|
21 | }
|
---|
22 | }
|
---|
23 |
|
---|
24 | public DataAnalysisProblemDataView() {
|
---|
25 | InitializeComponent();
|
---|
26 | }
|
---|
27 |
|
---|
28 | public DataAnalysisProblemDataView(DataAnalysisProblemData content)
|
---|
29 | : this() {
|
---|
30 | Content = content;
|
---|
31 | variableCollectionView.Content = content.Variables.AsReadOnly();
|
---|
32 | }
|
---|
33 |
|
---|
34 | private void importButton_Click(object sender, EventArgs e) {
|
---|
35 | if (openFileDialog == null) openFileDialog = new OpenFileDialog();
|
---|
36 |
|
---|
37 | if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
|
---|
38 | try {
|
---|
39 | Content.ImportFromFile(openFileDialog.FileName);
|
---|
40 | }
|
---|
41 | catch (Exception ex) {
|
---|
42 | Auxiliary.ShowErrorMessageBox(ex);
|
---|
43 | }
|
---|
44 | }
|
---|
45 | }
|
---|
46 | }
|
---|
47 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.