1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System;
|
---|
23 | using System.ComponentModel;
|
---|
24 | using System.Text;
|
---|
25 | using System.Windows.Forms;
|
---|
26 | using HeuristicLab.Data;
|
---|
27 |
|
---|
28 | namespace HeuristicLab.Problems.Scheduling.Views {
|
---|
29 | public enum SPFormat { Empty, ORLib }
|
---|
30 |
|
---|
31 | public sealed partial class SchedulingProblemImportDialog : Form {
|
---|
32 | private string spFileName;
|
---|
33 | public string SPFileName {
|
---|
34 | get { return spFileName; }
|
---|
35 | }
|
---|
36 | private string optimalScheduleFileName;
|
---|
37 | public string OptimalScheduleFileName {
|
---|
38 | get { return optimalScheduleFileName; }
|
---|
39 | }
|
---|
40 | private SPFormat format;
|
---|
41 | public SPFormat Format {
|
---|
42 | get { return format; }
|
---|
43 | }
|
---|
44 |
|
---|
45 | public SchedulingProblemImportDialog() {
|
---|
46 | InitializeComponent();
|
---|
47 | spFileName = string.Empty;
|
---|
48 | optimalScheduleFileName = string.Empty;
|
---|
49 | format = SPFormat.Empty;
|
---|
50 | }
|
---|
51 |
|
---|
52 | private void openSchedulingProblemFileButton_Click(object sender, EventArgs e) {
|
---|
53 | if (openSchedulingProblemFileDialog.ShowDialog(this) == DialogResult.OK) {
|
---|
54 | spFileTextBox.Text = openSchedulingProblemFileDialog.FileName;
|
---|
55 | spFileTextBox.Enabled = true;
|
---|
56 | spFileName = openSchedulingProblemFileDialog.FileName;
|
---|
57 | okButton.Enabled = true;
|
---|
58 |
|
---|
59 | optimalScheduleFileTextBox.Text = string.Empty;
|
---|
60 | optimalScheduleFileName = string.Empty;
|
---|
61 |
|
---|
62 | format = (SPFormat)(openSchedulingProblemFileDialog.FilterIndex);
|
---|
63 | }
|
---|
64 | }
|
---|
65 | private void openOptimalScheduleFileButton_Click(object sender, EventArgs e) {
|
---|
66 | if (openOptimalScheduleFileDialog.ShowDialog(this) == DialogResult.OK) {
|
---|
67 | optimalScheduleFileTextBox.Text = openOptimalScheduleFileDialog.FileName;
|
---|
68 | optimalScheduleFileTextBox.Enabled = true;
|
---|
69 | optimalScheduleFileName = openOptimalScheduleFileDialog.FileName;
|
---|
70 | }
|
---|
71 | }
|
---|
72 | private void clearTourFileButton_Click(object sender, EventArgs e) {
|
---|
73 | optimalScheduleFileTextBox.Text = string.Empty;
|
---|
74 | optimalScheduleFileTextBox.Enabled = false;
|
---|
75 | optimalScheduleFileName = string.Empty;
|
---|
76 | }
|
---|
77 |
|
---|
78 | private void VRPImportDialog_HelpButtonClicked(object sender, CancelEventArgs e) {
|
---|
79 | if (MessageBox.Show("Do you want to open the HeuristicLab wiki website?", "Help",
|
---|
80 | MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes) {
|
---|
81 | System.Diagnostics.Process.Start("http://dev.heuristiclab.com/trac/hl/core/wiki/Scheduling%20Problem");
|
---|
82 | }
|
---|
83 | }
|
---|
84 |
|
---|
85 | }
|
---|
86 | }
|
---|