Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2695_dataset-ids/HeuristicLab.Problems.Instances.VehicleRouting.Views/3.4/VRPImportDialog.cs @ 18180

Last change on this file since 18180 was 14185, checked in by swagner, 8 years ago

#2526: Updated year of copyrights in license headers

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