Last change
on this file since 12547 was
2272,
checked in by gkronber, 15 years ago
|
Worked on persistence of models into the DB. #719 (CEDMA Importer)
|
File size:
1.1 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 System.IO;
|
---|
10 | using HeuristicLab.CEDMA.Server;
|
---|
11 |
|
---|
12 | namespace CedmaImporter {
|
---|
13 | public partial class ImporterForm : Form {
|
---|
14 | private Problem problem;
|
---|
15 |
|
---|
16 | public ImporterForm() {
|
---|
17 | InitializeComponent();
|
---|
18 | problem = new Problem();
|
---|
19 | Control problemView = (UserControl)problem.CreateView();
|
---|
20 | problemView.Dock = DockStyle.Fill;
|
---|
21 | problemViewPanel.Controls.Add(problemView);
|
---|
22 | }
|
---|
23 |
|
---|
24 | private void importButton_Click(object sender, EventArgs e) {
|
---|
25 | Importer importer = new Importer(problem);
|
---|
26 |
|
---|
27 | OpenFileDialog dialog = new OpenFileDialog();
|
---|
28 | DialogResult result = dialog.ShowDialog();
|
---|
29 | while (result != DialogResult.Cancel) {
|
---|
30 | string fileName = dialog.FileName;
|
---|
31 | string directoryName = Path.GetDirectoryName(fileName);
|
---|
32 | importer.Import(fileName, directoryName);
|
---|
33 | result = dialog.ShowDialog();
|
---|
34 | }
|
---|
35 | }
|
---|
36 | }
|
---|
37 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.