Free cookie consent management tool by TermsFeed Policy Generator

source: branches/VRP/HeuristicLab.Problems.Instances.VehicleRouting.Views/3.4/VRPImportDialog.cs @ 7881

Last change on this file since 7881 was 7881, checked in by svonolfe, 12 years ago

Added VRP test instances (#1177)

File size: 2.8 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2010 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;
26using HeuristicLab.Data;
27
28namespace HeuristicLab.Problems.Instances.VehicleRouting.Views {
29  public sealed partial class VRPImportDialog : Form {
30    private string vrpFileName;
31    public string VRPFileName {
32      get { return vrpFileName; }
33    }
34    private string tourFileName;
35    public string TourFileName {
36      get { return tourFileName; }
37    }
38
39    public VRPImportDialog() {
40      InitializeComponent();
41      vrpFileName = string.Empty;
42      tourFileName = string.Empty;
43    }
44
45    private void openVRPFileButton_Click(object sender, EventArgs e) {
46      if (openVRPFileDialog.ShowDialog(this) == DialogResult.OK) {
47        tspFileTextBox.Text = openVRPFileDialog.FileName;
48        tspFileTextBox.Enabled = true;
49        vrpFileName = openVRPFileDialog.FileName;
50        okButton.Enabled = true;
51
52        tourFileTextBox.Text = string.Empty;
53        tourFileName = string.Empty;
54      }
55    }
56    private void openTourFileButton_Click(object sender, EventArgs e) {
57      if (openTourFileDialog.ShowDialog(this) == DialogResult.OK) {
58        tourFileTextBox.Text = openTourFileDialog.FileName;
59        tourFileTextBox.Enabled = true;
60        tourFileName = openTourFileDialog.FileName;
61      }
62    }
63    private void clearTourFileButton_Click(object sender, EventArgs e) {
64      tourFileTextBox.Text = string.Empty;
65      tourFileTextBox.Enabled = false;
66      tourFileName = string.Empty;
67    }
68
69    private void VRPImportDialog_HelpButtonClicked(object sender, CancelEventArgs e) {
70      if (MessageBox.Show("Do you want to open the HeuristicLab wiki website?", "Help",
71        MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes) {
72          System.Diagnostics.Process.Start("http://dev.heuristiclab.com/trac/hl/core/wiki/Vehicle%20Routing%20Problem");
73      }
74    }
75  }
76}
Note: See TracBrowser for help on using the repository browser.