Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/tools/CedmaImporter/ImporterForm.cs @ 2259

Last change on this file since 2259 was 2259, checked in by gkronber, 15 years ago

Added unfinished implementation of CEDMA importer tool. #719

File size: 1.0 KB
RevLine 
[2259]1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Linq;
7using System.Text;
8using System.Windows.Forms;
9using System.IO;
10using HeuristicLab.CEDMA.Server;
11
12namespace 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      }
34    }
35  }
36}
Note: See TracBrowser for help on using the repository browser.