Free cookie consent management tool by TermsFeed Policy Generator

source: branches/Scheduling/HeuristicLab.Problems.Scheduling.Views/3.3/SchedulingProblemImportDialog.cs @ 9385

Last change on this file since 9385 was 8603, checked in by gkronber, 12 years ago

#1329:

  • updated copy-right year
  • trimmed assembly and plugin references
  • removed x86 and x64 build configurations
File size: 3.2 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2012 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
22using System;
23using System.ComponentModel;
24using System.Text;
25using System.Windows.Forms;
26
27namespace HeuristicLab.Problems.Scheduling.Views {
28  public enum SPFormat { Empty, ORLib }
29
30  public sealed partial class SchedulingProblemImportDialog : Form {
31    private string spFileName;
32    public string SPFileName {
33      get { return spFileName; }
34    }
35    private string optimalScheduleFileName;
36    public string OptimalScheduleFileName {
37      get { return optimalScheduleFileName; }
38    }
39    private SPFormat format;
40    public SPFormat Format {
41      get { return format; }
42    }
43
44    public SchedulingProblemImportDialog() {
45      InitializeComponent();
46      spFileName = string.Empty;
47      optimalScheduleFileName = string.Empty;
48      format = SPFormat.Empty;
49    }
50
51    private void openSchedulingProblemFileButton_Click(object sender, EventArgs e) {
52      if (openSchedulingProblemFileDialog.ShowDialog(this) == DialogResult.OK) {
53        spFileTextBox.Text = openSchedulingProblemFileDialog.FileName;
54        spFileTextBox.Enabled = true;
55        spFileName = openSchedulingProblemFileDialog.FileName;
56        okButton.Enabled = true;
57
58        optimalScheduleFileTextBox.Text = string.Empty;
59        optimalScheduleFileName = string.Empty;
60
61        format = (SPFormat)(openSchedulingProblemFileDialog.FilterIndex);
62      }
63    }
64    private void openOptimalScheduleFileButton_Click(object sender, EventArgs e) {
65      if (openOptimalScheduleFileDialog.ShowDialog(this) == DialogResult.OK) {
66        optimalScheduleFileTextBox.Text = openOptimalScheduleFileDialog.FileName;
67        optimalScheduleFileTextBox.Enabled = true;
68        optimalScheduleFileName = openOptimalScheduleFileDialog.FileName;
69      }
70    }
71    private void clearTourFileButton_Click(object sender, EventArgs e) {
72      optimalScheduleFileTextBox.Text = string.Empty;
73      optimalScheduleFileTextBox.Enabled = false;
74      optimalScheduleFileName = string.Empty;
75    }
76
77    private void VRPImportDialog_HelpButtonClicked(object sender, CancelEventArgs e) {
78      if (MessageBox.Show("Do you want to open the HeuristicLab wiki website?", "Help",
79        MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes) {
80          System.Diagnostics.Process.Start("http://dev.heuristiclab.com/trac/hl/core/wiki/Scheduling%20Problem");
81      }
82    }
83
84  }
85}
Note: See TracBrowser for help on using the repository browser.