Free cookie consent management tool by TermsFeed Policy Generator

source: branches/1955_DynamicVehicleRouting/HeuristicLab.PDPSimulation.Views/3.3/PickupDeliveryScenarioView.cs @ 16375

Last change on this file since 16375 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 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Drawing;
5using System.Data;
6using System.Linq;
7using System.Text;
8using System.Windows.Forms;
9using HeuristicLab.Core.Views;
10using HeuristicLab.MainForm;
11using HeuristicLab.PDPSimulation.DomainModel;
12using HeuristicLab.Optimization.Views;
13
14namespace 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.