Last change
on this file since 6133 was
6133,
checked in by gkronber, 13 years ago
|
#1471: imported generic parts of DataImporter from private code base
|
File size:
1.3 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.ComponentModel;
|
---|
4 | using System.Data;
|
---|
5 | using System.Drawing;
|
---|
6 | using System.Linq;
|
---|
7 | using System.Text;
|
---|
8 | using System.Windows.Forms;
|
---|
9 | using HeuristicLab.DataImporter.Data;
|
---|
10 | using HeuristicLab.PluginInfrastructure;
|
---|
11 |
|
---|
12 | namespace HeuristicLab.DataImporter.DataProcessor {
|
---|
13 | public partial class ExportDialog : Form {
|
---|
14 | private Data.Model.DataSet dataSet;
|
---|
15 | public ExportDialog(Data.Model.DataSet dataSet) {
|
---|
16 | InitializeComponent();
|
---|
17 | this.dataSet = dataSet;
|
---|
18 | IExporter[] exporters = ApplicationManager.Manager.GetInstances<IExporter>().ToArray();
|
---|
19 | this.exporterListBox.DataSource = exporters;
|
---|
20 | }
|
---|
21 |
|
---|
22 | private void btnOK_Click(object sender, EventArgs e) {
|
---|
23 | this.Cursor = Cursors.WaitCursor;
|
---|
24 | try {
|
---|
25 | ((IExporter)exporterListBox.SelectedItem).Export(this.dataSet);
|
---|
26 | }
|
---|
27 | finally {
|
---|
28 | this.Cursor = Cursors.Default;
|
---|
29 | }
|
---|
30 | }
|
---|
31 |
|
---|
32 | private void exporterListBox_SelectedIndexChanged(object sender, EventArgs e) {
|
---|
33 | this.settingsPanel.Controls.Clear();
|
---|
34 | UserControl ctrl = ((IExporter)exporterListBox.SelectedItem).SettingsControl ;
|
---|
35 | this.Height = 180 + ctrl.Height;
|
---|
36 | this.settingsPanel.Controls.Add(ctrl);
|
---|
37 |
|
---|
38 | }
|
---|
39 | }
|
---|
40 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.