Last change
on this file since 8701 was
8670,
checked in by svonolfe, 12 years ago
|
Added first version of the dynamic vehicle routing addon (#1955)
|
File size:
1.2 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.ComponentModel;
|
---|
4 | using System.Drawing;
|
---|
5 | using System.Data;
|
---|
6 | using System.Linq;
|
---|
7 | using System.Text;
|
---|
8 | using System.Windows.Forms;
|
---|
9 | using HeuristicLab.Core.Views;
|
---|
10 | using HeuristicLab.MainForm;
|
---|
11 | using HeuristicLab.PDPSimulation.DomainModel;
|
---|
12 | using HeuristicLab.Optimization.Views;
|
---|
13 |
|
---|
14 | namespace HeuristicLab.PDPSimulation.Views {
|
---|
15 | [View("PickupDeliveryScenario View")]
|
---|
16 | [Content(typeof(PickupDeliveryScenario), true)]
|
---|
17 | public partial class PickupDeliveryScenarioView : ProblemView {
|
---|
18 | public new PickupDeliveryScenario Content {
|
---|
19 | get { return (PickupDeliveryScenario)base.Content; }
|
---|
20 | set { base.Content = value; }
|
---|
21 | }
|
---|
22 |
|
---|
23 | public PickupDeliveryScenarioView() {
|
---|
24 | InitializeComponent();
|
---|
25 | }
|
---|
26 |
|
---|
27 | private void importButton_Click(object sender, System.EventArgs e) {
|
---|
28 | OpenFileDialog dlg = new OpenFileDialog();
|
---|
29 | dlg.Filter = "dynamic PDP files (*.dpd)|*.dpd|dynamic PDP files - TSPLib (*.pdp*)|*.pdp";
|
---|
30 |
|
---|
31 | if (dlg.ShowDialog() == DialogResult.OK) {
|
---|
32 | if (dlg.FilterIndex == 1)
|
---|
33 | Content.ImportFromDynPDP(dlg.FileName);
|
---|
34 | else
|
---|
35 | Content.ImportFromDynTSPLib(dlg.FileName);
|
---|
36 | }
|
---|
37 | }
|
---|
38 | }
|
---|
39 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.