Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 12012 was 7882, checked in by svonolfe, 13 years ago

Incorporated review comments of abeham (#1177)

File size: 2.9 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(string format) {
40      InitializeComponent();
41      vrpFileName = string.Empty;
42      tourFileName = string.Empty;
43      Text += " in " + format + " Format";
44    }
45
46    private void openVRPFileButton_Click(object sender, EventArgs e) {
47      if (openVRPFileDialog.ShowDialog(this) == DialogResult.OK) {
48        tspFileTextBox.Text = openVRPFileDialog.FileName;
49        tspFileTextBox.Enabled = true;
50        vrpFileName = openVRPFileDialog.FileName;
51        okButton.Enabled = true;
52
53        tourFileTextBox.Text = string.Empty;
54        tourFileName = string.Empty;
55      }
56    }
57    private void openTourFileButton_Click(object sender, EventArgs e) {
58      if (openTourFileDialog.ShowDialog(this) == DialogResult.OK) {
59        tourFileTextBox.Text = openTourFileDialog.FileName;
60        tourFileTextBox.Enabled = true;
61        tourFileName = openTourFileDialog.FileName;
62      }
63    }
64    private void clearTourFileButton_Click(object sender, EventArgs e) {
65      tourFileTextBox.Text = string.Empty;
66      tourFileTextBox.Enabled = false;
67      tourFileName = string.Empty;
68    }
69
70    private void VRPImportDialog_HelpButtonClicked(object sender, CancelEventArgs e) {
71      if (MessageBox.Show("Do you want to open the HeuristicLab wiki website?", "Help",
72        MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes) {
73          System.Diagnostics.Process.Start("http://dev.heuristiclab.com/trac/hl/core/wiki/Vehicle%20Routing%20Problem");
74      }
75    }
76  }
77}
Note: See TracBrowser for help on using the repository browser.