- 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/CVRPPDTWView.cs
r6851 r7858 42 42 IntArray pickupDeliveryLocation = Content.PickupDeliveryLocation; 43 43 44 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)),45 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)),46 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)),47 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)),48 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)),49 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)};50 51 44 Pen flowPen = new Pen(Brushes.Red, 3); 52 45 flowPen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor; … … 69 62 if (Solution != null) { 70 63 int currentTour = 0; 71 foreach (Tour tour in Solution.GetTours()) { 64 65 List<Tour> tours = Solution.GetTours(); 66 List<Pen> pens = GetColors(tours.Count); 67 68 foreach (Tour tour in tours) { 72 69 double t = 0.0; 73 70 Point[] tourPoints = new Point[tour.Stops.Count + 2]; … … 122 119 123 120 if (!drawFlow) 124 graphics.DrawPolygon(pens[ ((currentTour >= pens.Length) ? (pens.Length - 1) : (currentTour))], tourPoints);121 graphics.DrawPolygon(pens[currentTour], tourPoints); 125 122 126 123 for (int i = 0; i < tour.Stops.Count; i++) { … … 142 139 currentTour++; 143 140 } 141 142 for (int i = 0; i < pens.Count; i++) 143 pens[i].Dispose(); 144 144 } else { 145 145 { … … 170 170 } 171 171 172 for (int i = 0; i < pens.Length; i++)173 pens[i].Dispose();174 175 172 flowPen.Dispose(); 176 173 }
Note: See TracChangeset
for help on using the changeset viewer.