public Form1() { InitializeComponent(); pictureBox5.Image = new Bitmap("../../Resources/map2.PNG"); G = new DrawGraph(sheet.Width, sheet.Height); E = new List <Edge>(); label1.Text = (pictureBox5.Size.Height * pictureBox5.Size.Width).ToString(); AllRotationsPoints = AllRotations.GetAllRotationsPoints(); route7 = AllRotations.GetRoute7(); route23 = AllRotations.GetRoute23(); stop = AllRotations.GetStop(); route62 = AllRotations.GetRoute62(); route107 = AllRotations.GetRoute107(); route43 = AllRotations.GetRoute43(); route20 = AllRotations.GetRoute20(); //Routes(route107); Routes(route7); Routes(route62); Routes(route23); Routes(route43); routes = new Dictionary <int, List <Vertex> >() { { 7, route7 }, { 23, route23 }, { 62, route62 }, { 20, route20 }, { 43, route43 } }; AddEpicenters(); CreateGrid(); BusPark.setEpicenters(Epics); BusPark.setGrid(TheGrid); BusPark.setMap(pictureBox5); AddBuses(); globgrid = new Dictionary <int, int>(); for (int i = 0; i < TheGrid.Count; i++) { globgrid.Add(i, 0); } // sheet.Image = new Bitmap("../../Resources/map2.PNG"); timer1.Interval = 25000; timer1.Start(); timer2.Interval = 1; timer2.Start(); DisplayEpicenters Ep = new DisplayEpicenters(Epics); Ep.Show(); }
private void AddBuses() { Bus7_1 = new BusPark(route7, pictureBus7_1, 0, stop, 7); Bus7_1.Start(); Bus7_2 = new BusPark(route7, pictureBox7_3, 1, stop, 7); Bus7_2.Start(); Bus7_3 = new BusPark(route7, pictureBus7_2, 20, stop, 7); Bus7_3.Start(); Bus7_4 = new BusPark(route7, pictureBox1, 1, stop, 7); Bus7_4.Start(); Bus7_5 = new BusPark(route7, pictureBox2, 3, true, stop, 7); Bus7_5.Start(); Bus7_6 = new BusPark(route7, pictureBox3, 5, stop, 7); Bus7_6.Start(); Bus7_7 = new BusPark(route7, pictureBox4, 7, stop, 7); Bus7_7.Start(); Bus7_8 = new BusPark(route7, pictureBox6, 9, true, stop, 7); Bus7_8.Start(); Bus7_9 = new BusPark(route7, pictureBox8, 16, stop, 7); Bus7_9.Start(); Bus7_10 = new BusPark(route7, pictureBox9, 13, stop, 7); Bus7_10.Start(); Bus7_11 = new BusPark(route7, pictureBox10, 14, stop, 7); Bus7_11.Start(); Bus7_12 = new BusPark(route7, pictureBox11, 16, true, stop, 7); Bus7_12.Start(); Bus7_13 = new BusPark(route7, pictureBox12, 18, stop, 7); Bus7_13.Start(); Bus7_14 = new BusPark(route7, pictureBox13, 20, stop, 7); Bus7_14.Start(); Bus7_15 = new BusPark(route7, pictureBox14, 6, stop, 7); Bus7_15.Start(); Bus7_16 = new BusPark(route7, pictureBox7, 10, true, stop, 7); Bus7_16.Start(); Bus23_1 = new BusPark(route23, pictureBus23_1, 1, stop, 23); Bus23_1.Start(); Bus23_2 = new BusPark(route23, pictureBus23_2, 14, stop, 23); Bus23_2.Start(); Bus62_1 = new BusPark(route62, pictureBus62_1, 1, stop, 62); Bus62_1.Start(); Bus_43 = new BusPark(route43, pictureBox16, 0, stop, 43); Bus_43.Start(); Bus_20 = new BusPark(route20, pictureBox17, 0, stop, 20); Bus_20.Start(); park7 = new List <BusPark>() { Bus7_1, Bus7_2, Bus7_3, Bus7_4, Bus7_5, Bus7_6, Bus7_7, Bus7_8, Bus7_9, Bus7_10, Bus7_11, Bus7_12, Bus7_13, Bus7_14, Bus7_15, Bus7_16 }; park23 = new List <BusPark>() { Bus23_1, Bus23_2 }; park62 = new List <BusPark>() { Bus62_1 }; park20 = new List <BusPark>() { Bus_20 }; park43 = new List <BusPark>() { Bus_43 }; //park107 = new List<BusPark>() { Bus_107 }; buses = new List <BusPark>() { Bus7_1, Bus7_2, Bus7_3, Bus62_1, Bus23_2, Bus7_4, Bus7_5, Bus7_6, Bus7_7, Bus7_8, Bus7_9, Bus7_10, Bus7_11, Bus7_12, Bus7_13, Bus7_14, Bus7_15, Bus7_16, Bus23_1, Bus_20, Bus_43 }; busesPark = new List <List <BusPark> >() { park7, park23, park62, park20, park43 }; }
public Form1() { InitializeComponent(); AllRotationsPoints = new List <Point>(); AllRotationsPoints.Add(new Point(204, 438)); AllRotationsPoints.Add(new Point(247, 577)); AllRotationsPoints.Add(new Point(490, 530)); AllRotationsPoints.Add(new Point(574, 708)); AllRotationsPoints.Add(new Point(642, 728)); AllRotationsPoints.Add(new Point(739, 658)); AllRotationsPoints.Add(new Point(854, 794)); AllRotationsPoints.Add(new Point(1063, 633)); AllRotationsPoints.Add(new Point(1043, 575)); AllRotationsPoints.Add(new Point(1036, 541)); AllRotationsPoints.Add(new Point(931, 390)); AllRotationsPoints.Add(new Point(1029, 320)); AllRotationsPoints.Add(new Point(974, 247)); AllRotationsPoints.Add(new Point(878, 311)); AllRotationsPoints.Add(new Point(848, 277)); AllRotationsPoints.Add(new Point(680, 268)); AllRotationsPoints.Add(new Point(684, 69)); AllRotationsPoints.Add(new Point(797, 68)); AllRotationsPoints.Add(new Point(847, 121)); AllRotationsPoints.Add(new Point(1032, 2)); AllRotationsPoints.Add(new Point(1109, 12)); AllRotationsPoints.Add(new Point(213, 484)); AllRotationsPoints.Add(new Point(167, 513)); AllRotationsPoints.Add(new Point(179, 563)); AllRotationsPoints.Add(new Point(163, 579)); AllRotationsPoints.Add(new Point(164, 620)); AllRotationsPoints.Add(new Point(0, 642)); AllRotationsPoints.Add(new Point(888, 278)); AllRotationsPoints.Add(new Point(890, 187)); AllRotationsPoints.Add(new Point(373, 377)); AllRotationsPoints.Add(new Point(400, 375)); AllRotationsPoints.Add(new Point(565, 276)); AllRotationsPoints.Add(new Point(1034, 187)); //// AllRotationsPoints.Add(new Point(1515, 547)); AllRotationsPoints.Add(new Point(1452, 567)); AllRotationsPoints.Add(new Point(1411, 573)); AllRotationsPoints.Add(new Point(1341, 609)); AllRotationsPoints.Add(new Point(1175, 606)); AllRotationsPoints.Add(new Point(1151, 507)); AllRotationsPoints.Add(new Point(1079, 544)); //AllRotationsPoints.Add(new Point(1036, 541)); AllRotationsPoints.Add(new Point(869, 312)); AllRotationsPoints.Add(new Point(828, 342)); AllRotationsPoints.Add(new Point(805, 448)); AllRotationsPoints.Add(new Point(804, 565)); AllRotationsPoints.Add(new Point(814, 608)); AllRotationsPoints.Add(new Point(912, 736)); AllRotationsPoints.Add(new Point(728, 871)); route7 = new List <Vertex>(); route7.Add(new Vertex(AllRotationsPoints[0].X, AllRotationsPoints[0].Y)); route7.Add(new Vertex(AllRotationsPoints[1].X, AllRotationsPoints[1].Y)); route7.Add(new Vertex(AllRotationsPoints[2].X, AllRotationsPoints[2].Y)); route7.Add(new Vertex(AllRotationsPoints[3].X, AllRotationsPoints[3].Y)); route7.Add(new Vertex(AllRotationsPoints[4].X, AllRotationsPoints[4].Y)); route7.Add(new Vertex(AllRotationsPoints[5].X, AllRotationsPoints[5].Y)); route7.Add(new Vertex(AllRotationsPoints[6].X, AllRotationsPoints[6].Y)); route7.Add(new Vertex(AllRotationsPoints[7].X, AllRotationsPoints[7].Y)); route7.Add(new Vertex(AllRotationsPoints[8].X, AllRotationsPoints[8].Y)); route7.Add(new Vertex(AllRotationsPoints[9].X, AllRotationsPoints[9].Y)); route7.Add(new Vertex(AllRotationsPoints[10].X, AllRotationsPoints[10].Y)); route7.Add(new Vertex(AllRotationsPoints[11].X, AllRotationsPoints[11].Y)); route7.Add(new Vertex(AllRotationsPoints[12].X, AllRotationsPoints[12].Y)); route7.Add(new Vertex(AllRotationsPoints[13].X, AllRotationsPoints[13].Y)); route7.Add(new Vertex(AllRotationsPoints[14].X, AllRotationsPoints[14].Y)); route7.Add(new Vertex(AllRotationsPoints[15].X, AllRotationsPoints[15].Y)); route7.Add(new Vertex(AllRotationsPoints[16].X, AllRotationsPoints[16].Y)); route7.Add(new Vertex(AllRotationsPoints[17].X, AllRotationsPoints[17].Y)); route7.Add(new Vertex(AllRotationsPoints[18].X, AllRotationsPoints[18].Y)); route7.Add(new Vertex(AllRotationsPoints[19].X, AllRotationsPoints[19].Y)); route7.Add(new Vertex(AllRotationsPoints[20].X, AllRotationsPoints[20].Y)); route62 = new List <Vertex>(); route62.Add(CallRotationPoint(AllRotationsPoints, 1034, 187)); route62.Add(CallRotationPoint(AllRotationsPoints, 890, 187)); route62.Add(CallRotationPoint(AllRotationsPoints, 888, 278)); route62.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(565, 276))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(565, 276))].Y)); route62.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(400, 375))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(400, 375))].Y)); route62.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(373, 377))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(373, 377))].Y)); route62.Add(new Vertex(AllRotationsPoints[0].X, AllRotationsPoints[0].Y)); route62.Add(route7[1]); route62.Add(route7[2]); route62.Add(route7[3]); route62.Add(route7[4]); route62.Add(route7[5]); route62.Add(route7[6]); route62.Add(route7[7]); route62.Add(route7[8]); route62.Add(route7[9]); route62.Add(route7[14]); route62.Add(CallRotationPoint(AllRotationsPoints, 888, 278)); route62.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(890, 187))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(890, 187))].Y)); route62.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1034, 187))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1034, 187))].Y)); route23 = new List <Vertex>(); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(0, 642))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(0, 642))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(164, 620))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(164, 620))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(163, 579))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(163, 579))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(179, 563))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(179, 563))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(167, 513))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(167, 513))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(213, 484))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(213, 484))].Y)); route23.Add(route7[1]); route23.Add(route7[2]); route23.Add(route7[3]); route23.Add(route7[4]); route23.Add(route7[5]); route23.Add(route7[6]); route23.Add(route7[7]); route23.Add(route7[8]); route23.Add(route7[9]); route23.Add(route7[14]); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(888, 278))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(888, 278))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(890, 187))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(890, 187))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1034, 187))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1034, 187))].Y)); route404 = new List <Vertex>(); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1515, 547))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1515, 547))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1452, 567))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1452, 567))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1411, 573))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1411, 573))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1341, 609))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1341, 609))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1175, 606))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1175, 606))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1151, 507))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1151, 507))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1079, 544))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1079, 544))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1036, 541))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1036, 541))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(869, 312))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(869, 312))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(828, 342))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(828, 342))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(805, 448))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(805, 448))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(804, 565))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(804, 565))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(814, 608))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(814, 608))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(912, 736))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(912, 736))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(728, 871))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(728, 871))].Y)); G = new DrawGraph(sheet.Width, sheet.Height); E = new List <Edge>(); for (int i = 0; i < route62.Count; i++) { G.drawVertex(route62[i].x, route62[i].y, route62.Count.ToString()); sheet.Image = G.GetBitmap(); if (i + 1 < route62.Count) { E.Add(new Edge(i, i + 1)); G.drawEdge(route62[i], route62[i + 1], E[E.Count - 1], E.Count - 1); sheet.Image = G.GetBitmap(); } } for (int i = 0; i < route7.Count; i++) { G.drawVertex(route7[i].x, route7[i].y, route7.Count.ToString()); sheet.Image = G.GetBitmap(); if (i + 1 < route7.Count) { E.Add(new Edge(i, i + 1)); G.drawEdge(route7[i], route7[i + 1], E[E.Count - 1], E.Count - 1); sheet.Image = G.GetBitmap(); } } for (int i = 0; i < route23.Count; i++) { G.drawVertex(route23[i].x, route23[i].y, route23.Count.ToString()); sheet.Image = G.GetBitmap(); if (i + 1 < route23.Count) { E.Add(new Edge(i, i + 1)); G.drawEdge(route23[i], route23[i + 1], E[E.Count - 1], E.Count - 1); sheet.Image = G.GetBitmap(); } } Bus7_1 = new BusPark(route7, pictureBus7_1, 0); Bus7_2 = new BusPark(route7, pictureBox7_3, 10); Bus7_3 = new BusPark(route7, pictureBus7_2, 20); Bus23_1 = new BusPark(route23, pictureBus23_1, 5); Bus23_2 = new BusPark(route23, pictureBus23_2, 14); Bus62_1 = new BusPark(route62, pictureBus62_1, 1); Bus404_1 = new BusPark(route404, pictureBus404_1, 1); Bus404_2 = new BusPark(route404, pictureBus404_2, route404.Count - 1); timer1.Interval = 1; timer1.Start(); }
public Form1() { InitializeComponent(); AllRotationsPoints = new List <Point>(); AllRotationsPoints.Add(new Point(204, 438)); AllRotationsPoints.Add(new Point(247, 577)); AllRotationsPoints.Add(new Point(490, 530)); AllRotationsPoints.Add(new Point(574, 708)); AllRotationsPoints.Add(new Point(642, 728)); AllRotationsPoints.Add(new Point(739, 658)); AllRotationsPoints.Add(new Point(854, 794)); AllRotationsPoints.Add(new Point(1063, 633)); AllRotationsPoints.Add(new Point(1043, 575)); AllRotationsPoints.Add(new Point(1036, 541)); AllRotationsPoints.Add(new Point(931, 390)); AllRotationsPoints.Add(new Point(1029, 320)); AllRotationsPoints.Add(new Point(974, 247)); AllRotationsPoints.Add(new Point(878, 311)); AllRotationsPoints.Add(new Point(848, 277)); AllRotationsPoints.Add(new Point(680, 268)); AllRotationsPoints.Add(new Point(684, 69)); AllRotationsPoints.Add(new Point(797, 68)); AllRotationsPoints.Add(new Point(847, 121)); AllRotationsPoints.Add(new Point(1032, 2)); AllRotationsPoints.Add(new Point(1109, 12)); AllRotationsPoints.Add(new Point(213, 484)); AllRotationsPoints.Add(new Point(167, 513)); AllRotationsPoints.Add(new Point(179, 563)); AllRotationsPoints.Add(new Point(163, 579)); AllRotationsPoints.Add(new Point(164, 620)); AllRotationsPoints.Add(new Point(0, 642)); AllRotationsPoints.Add(new Point(888, 278)); AllRotationsPoints.Add(new Point(890, 187)); AllRotationsPoints.Add(new Point(373, 377)); AllRotationsPoints.Add(new Point(400, 375)); AllRotationsPoints.Add(new Point(565, 276)); AllRotationsPoints.Add(new Point(1034, 187)); //// AllRotationsPoints.Add(new Point(1515, 547)); AllRotationsPoints.Add(new Point(1452, 567)); AllRotationsPoints.Add(new Point(1411, 573)); AllRotationsPoints.Add(new Point(1341, 609)); AllRotationsPoints.Add(new Point(1175, 606)); AllRotationsPoints.Add(new Point(1151, 507)); AllRotationsPoints.Add(new Point(1079, 544)); //AllRotationsPoints.Add(new Point(1036, 541)); AllRotationsPoints.Add(new Point(869, 312)); AllRotationsPoints.Add(new Point(828, 342)); AllRotationsPoints.Add(new Point(805, 448)); AllRotationsPoints.Add(new Point(804, 565)); AllRotationsPoints.Add(new Point(814, 608)); AllRotationsPoints.Add(new Point(912, 736)); AllRotationsPoints.Add(new Point(728, 871)); route7 = new List <Vertex>(); route7.Add(new Vertex(AllRotationsPoints[0].X, AllRotationsPoints[0].Y)); route7.Add(new Vertex(AllRotationsPoints[1].X, AllRotationsPoints[1].Y)); route7.Add(new Vertex(AllRotationsPoints[2].X, AllRotationsPoints[2].Y)); route7.Add(new Vertex(AllRotationsPoints[3].X, AllRotationsPoints[3].Y)); route7.Add(new Vertex(AllRotationsPoints[4].X, AllRotationsPoints[4].Y)); route7.Add(new Vertex(AllRotationsPoints[5].X, AllRotationsPoints[5].Y)); route7.Add(new Vertex(AllRotationsPoints[6].X, AllRotationsPoints[6].Y)); route7.Add(new Vertex(AllRotationsPoints[7].X, AllRotationsPoints[7].Y)); route7.Add(new Vertex(AllRotationsPoints[8].X, AllRotationsPoints[8].Y)); route7.Add(new Vertex(AllRotationsPoints[9].X, AllRotationsPoints[9].Y)); route7.Add(new Vertex(AllRotationsPoints[10].X, AllRotationsPoints[10].Y)); route7.Add(new Vertex(AllRotationsPoints[11].X, AllRotationsPoints[11].Y)); route7.Add(new Vertex(AllRotationsPoints[12].X, AllRotationsPoints[12].Y)); route7.Add(new Vertex(AllRotationsPoints[13].X, AllRotationsPoints[13].Y)); route7.Add(new Vertex(AllRotationsPoints[14].X, AllRotationsPoints[14].Y)); route7.Add(new Vertex(AllRotationsPoints[15].X, AllRotationsPoints[15].Y)); route7.Add(new Vertex(AllRotationsPoints[16].X, AllRotationsPoints[16].Y)); route7.Add(new Vertex(AllRotationsPoints[17].X, AllRotationsPoints[17].Y)); route7.Add(new Vertex(AllRotationsPoints[18].X, AllRotationsPoints[18].Y)); route7.Add(new Vertex(AllRotationsPoints[19].X, AllRotationsPoints[19].Y)); route7.Add(new Vertex(AllRotationsPoints[20].X, AllRotationsPoints[20].Y)); route62 = new List <Vertex>(); route62.Add(CallRotationPoint(AllRotationsPoints, 1034, 187)); route62.Add(CallRotationPoint(AllRotationsPoints, 890, 187)); route62.Add(CallRotationPoint(AllRotationsPoints, 888, 278)); route62.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(565, 276))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(565, 276))].Y)); route62.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(400, 375))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(400, 375))].Y)); route62.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(373, 377))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(373, 377))].Y)); route62.Add(new Vertex(AllRotationsPoints[0].X, AllRotationsPoints[0].Y)); route62.Add(route7[1]); route62.Add(route7[2]); route62.Add(route7[3]); route62.Add(route7[4]); route62.Add(route7[5]); route62.Add(route7[6]); route62.Add(route7[7]); route62.Add(route7[8]); route62.Add(route7[9]); route62.Add(route7[14]); route62.Add(CallRotationPoint(AllRotationsPoints, 888, 278)); route62.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(890, 187))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(890, 187))].Y)); route62.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1034, 187))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1034, 187))].Y)); route23 = new List <Vertex>(); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(0, 642))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(0, 642))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(164, 620))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(164, 620))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(163, 579))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(163, 579))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(179, 563))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(179, 563))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(167, 513))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(167, 513))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(213, 484))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(213, 484))].Y)); route23.Add(route7[1]); route23.Add(route7[2]); route23.Add(route7[3]); route23.Add(route7[4]); route23.Add(route7[5]); route23.Add(route7[6]); route23.Add(route7[7]); route23.Add(route7[8]); route23.Add(route7[9]); route23.Add(route7[14]); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(888, 278))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(888, 278))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(890, 187))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(890, 187))].Y)); route23.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1034, 187))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1034, 187))].Y)); route404 = new List <Vertex>(); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1515, 547))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1515, 547))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1452, 567))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1452, 567))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1411, 573))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1411, 573))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1341, 609))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1341, 609))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1175, 606))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1175, 606))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1151, 507))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1151, 507))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1079, 544))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1079, 544))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1036, 541))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(1036, 541))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(869, 312))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(869, 312))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(828, 342))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(828, 342))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(805, 448))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(805, 448))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(804, 565))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(804, 565))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(814, 608))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(814, 608))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(912, 736))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(912, 736))].Y)); route404.Add(new Vertex(AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(728, 871))].X, AllRotationsPoints[AllRotationsPoints.IndexOf(new Point(728, 871))].Y)); G = new DrawGraph(sheet.Width, sheet.Height); E = new List <Edge>(); for (int i = 0; i < route62.Count; i++) { G.drawVertex(route62[i].x, route62[i].y, route62.Count.ToString()); sheet.Image = G.GetBitmap(); if (i + 1 < route62.Count) { E.Add(new Edge(i, i + 1)); G.drawEdge(route62[i], route62[i + 1], E[E.Count - 1], E.Count - 1); sheet.Image = G.GetBitmap(); } } for (int i = 0; i < route7.Count; i++) { G.drawVertex(route7[i].x, route7[i].y, route7.Count.ToString()); sheet.Image = G.GetBitmap(); if (i + 1 < route7.Count) { E.Add(new Edge(i, i + 1)); G.drawEdge(route7[i], route7[i + 1], E[E.Count - 1], E.Count - 1); sheet.Image = G.GetBitmap(); } } for (int i = 0; i < route23.Count; i++) { G.drawVertex(route23[i].x, route23[i].y, route23.Count.ToString()); sheet.Image = G.GetBitmap(); if (i + 1 < route23.Count) { E.Add(new Edge(i, i + 1)); G.drawEdge(route23[i], route23[i + 1], E[E.Count - 1], E.Count - 1); sheet.Image = G.GetBitmap(); } } testim = new List <Epicenters>(); testim.Add(new Epicenters(pictureBox5, 500, 500, 100)); testim.Add(new Epicenters(pictureBox5, 900, 400, 50)); Bus7_1 = new BusPark(route7, pictureBus7_1, 0, testim, pictureBox5); Bus7_2 = new BusPark(route7, pictureBox7_3, 10, testim, pictureBox5); Bus7_3 = new BusPark(route7, pictureBus7_2, 20, testim, pictureBox5); Bus7_4 = new BusPark(route7, pictureBox1, 1, testim, pictureBox5); Bus7_5 = new BusPark(route7, pictureBox2, 3, true, testim, pictureBox5); Bus7_6 = new BusPark(route7, pictureBox3, 5, testim, pictureBox5); Bus7_7 = new BusPark(route7, pictureBox4, 7, testim, pictureBox5); Bus7_8 = new BusPark(route7, pictureBox6, 9, true, testim, pictureBox5); Bus7_9 = new BusPark(route7, pictureBox8, 16, testim, pictureBox5); Bus7_10 = new BusPark(route7, pictureBox9, 13, testim, pictureBox5); Bus7_11 = new BusPark(route7, pictureBox10, 14, testim, pictureBox5); Bus7_12 = new BusPark(route7, pictureBox11, 16, true, testim, pictureBox5); Bus7_13 = new BusPark(route7, pictureBox12, 18, testim, pictureBox5); Bus7_14 = new BusPark(route7, pictureBox13, 20, testim, pictureBox5); Bus7_15 = new BusPark(route7, pictureBox14, 6, testim, pictureBox5); Bus7_16 = new BusPark(route7, pictureBox7, 10, true, testim, pictureBox5); Bus23_1 = new BusPark(route23, pictureBus23_1, 5, testim, pictureBox5); Bus23_2 = new BusPark(route23, pictureBus23_2, 14, testim, pictureBox5); Bus62_1 = new BusPark(route62, pictureBus62_1, 1, testim, pictureBox5); Bus404_1 = new BusPark(route404, pictureBus404_1, 1, testim, pictureBox5); Bus404_2 = new BusPark(route404, pictureBus404_2, route404.Count - 1, testim, pictureBox5); // pictureBox5.CreateGraphics().FillEllipse(new LinearGradientBrush(new Point(0, 10), new Point(200, 10), Color.FromArgb(255, 255, 0, 0), Color.FromArgb(255, 0, 0, 255)), 0, 30, 200, 100); timer1.Interval = 1; timer1.Start(); }