- Timestamp:
- 08/31/10 14:51:43 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting.Views/3.3/VRPSolutionView.cs
r4268 r4349 28 28 using HeuristicLab.Problems.VehicleRouting.Encodings; 29 29 using HeuristicLab.Parameters; 30 using System.Linq; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Views { … … 68 69 } else { 69 70 GenerateImage(); 70 tourViewHost.Content = Content.Solution;71 UpdateTourView(); 71 72 } 72 73 } … … 81 82 pictureBox.Enabled = Content != null; 82 83 tourGroupBox.Enabled = Content != null; 84 } 85 86 private void UpdateTourView() { 87 tourGridView.Rows.Clear(); 88 tourGridView.ColumnCount = Content.Coordinates.Rows - 1; 89 90 if (Content != null && Content.Solution != null) { 91 foreach (Tour tour in Content.Solution.GetTours(new ValueLookupParameter<DoubleMatrix>("DistanceMatrix", Content.DistanceMatrix))) { 92 int row = tourGridView.Rows.Add(); 93 int cell = 0; 94 foreach (int city in tour.Cities) { 95 tourGridView.Rows[row].Cells[cell].Value = city; 96 cell++; 97 } 98 } 99 } 83 100 } 84 101 … … 203 220 else { 204 221 GenerateImage(); 205 tourViewHost.Content = Content.Solution;222 UpdateTourView(); 206 223 } 207 224 }
Note: See TracChangeset
for help on using the changeset viewer.