- Timestamp:
- 05/21/12 15:28:50 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting.Views/3.4/MDCVRPTWView.cs
r6854 r7858 34 34 int depots = Content.Depots.Value; 35 35 36 Pen[] pens = {new Pen(Color.FromArgb(92,20,237)), new Pen(Color.FromArgb(237,183,20)), new Pen(Color.FromArgb(237,20,219)), new Pen(Color.FromArgb(20,237,76)),37 new Pen(Color.FromArgb(237,61,20)), new Pen(Color.FromArgb(115,78,26)), new Pen(Color.FromArgb(20,237,229)), new Pen(Color.FromArgb(39,101,19)),38 new Pen(Color.FromArgb(230,170,229)), new Pen(Color.FromArgb(142,136,89)), new Pen(Color.FromArgb(157,217,166)), new Pen(Color.FromArgb(31,19,101)),39 new Pen(Color.FromArgb(173,237,20)), new Pen(Color.FromArgb(230,231,161)), new Pen(Color.FromArgb(142,89,89)), new Pen(Color.FromArgb(93,89,142)),40 new Pen(Color.FromArgb(146,203,217)), new Pen(Color.FromArgb(101,19,75)), new Pen(Color.FromArgb(198,20,237)), new Pen(Color.FromArgb(185,185,185)),41 new Pen(Color.FromArgb(179,32,32)), new Pen(Color.FromArgb(18,119,115)), new Pen(Color.FromArgb(104,158,239)), new Pen(Color.Black)};42 43 36 if ((coordinates != null) && (coordinates.Rows > 0) && (coordinates.Columns == 2)) { 44 37 double xMin = double.MaxValue, yMin = double.MaxValue, xMax = double.MinValue, yMax = double.MinValue; … … 63 56 64 57 int currentTour = 0; 65 foreach (Tour tour in Solution.GetTours()) { 58 59 List<Tour> tours = Solution.GetTours(); 60 List<Pen> pens = GetColors(tours.Count); 61 62 foreach (Tour tour in tours) { 66 63 int tourIndex = Solution.GetTourIndex(tour); 67 64 int vehicle = Solution.GetVehicleAssignment(tourIndex); … … 116 113 } 117 114 118 graphics.DrawPolygon(pens[ ((currentTour >= pens.Length) ? (pens.Length - 1) : (currentTour))], tourPoints);115 graphics.DrawPolygon(pens[currentTour], tourPoints); 119 116 120 117 for (int i = 0; i < tour.Stops.Count; i++) { … … 126 123 currentTour++; 127 124 } 125 126 for (int i = 0; i < pens.Count; i++) 127 pens[i].Dispose(); 128 128 } else { 129 129 Point locationPoint; … … 144 144 } 145 145 } 146 147 for (int i = 0; i < pens.Length; i++)148 pens[i].Dispose();149 146 } 150 147 }
Note: See TracChangeset
for help on using the changeset viewer.