- 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/MDCVRPPDTWView.cs
r6947 r7858 46 46 int cities = Content.Cities.Value; 47 47 48 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)),49 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)),50 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)),51 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)),52 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)),53 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)};54 55 48 Pen flowPen = new Pen(Brushes.Red, 3); 56 49 flowPen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor; … … 79 72 80 73 int currentTour = 0; 81 foreach (Tour tour in Solution.GetTours()) { 74 75 List<Tour> tours = Solution.GetTours(); 76 List<Pen> pens = GetColors(tours.Count); 77 78 foreach (Tour tour in tours) { 82 79 int tourIndex = Solution.GetTourIndex(tour); 83 80 int vehicle = Solution.GetVehicleAssignment(tourIndex); … … 148 145 149 146 if (!drawFlow) 150 graphics.DrawPolygon(pens[ ((currentTour >= pens.Length) ? (pens.Length - 1) : (currentTour))], tourPoints);147 graphics.DrawPolygon(pens[currentTour], tourPoints); 151 148 152 149 for (int i = 0; i < tour.Stops.Count; i++) { … … 168 165 currentTour++; 169 166 } 167 168 for (int i = 0; i < pens.Count; i++) 169 pens[i].Dispose(); 170 170 } else { 171 171 { … … 197 197 } 198 198 199 for (int i = 0; i < pens.Length; i++)200 pens[i].Dispose();201 202 199 flowPen.Dispose(); 203 200 }
Note: See TracChangeset
for help on using the changeset viewer.