Esempio n. 1
0
 //кнопка - выбрать вершину
 private void selectButton_Click(object sender, EventArgs e)
 {
     selectButton.Enabled     = false;
     drawVertexButton.Enabled = true;
     drawEdgeButton.Enabled   = true;
     deleteButton.Enabled     = true;
     G.clearSheet();
     G.drawALLGraph(V, E);
     sheet.Image = G.GetBitmap();
     selected1   = -1;
 }
Esempio n. 2
0
 private void Routes(List <Vertex> route)
 {
     for (int i = 0; i < route.Count; i++)
     {
         G.drawVertex(route[i].x, route[i].y, route.Count.ToString());
         sheet.Image = G.GetBitmap();
         if (i + 1 < route.Count)
         {
             E.Add(new Edge(i, i + 1));
             G.drawEdge(route[i], route[i + 1], E[E.Count - 1], E.Count - 1);
             sheet.Image = G.GetBitmap();
         }
     }
 }
Esempio n. 3
0
        public Form1()
        {
            InitializeComponent();
            textBox1.Hide();
            V           = new List <Vertex>();
            G           = new DrawGraph(sheet.Width, sheet.Height);
            E           = new List <Edge>();
            Vtmp        = V;
            Etmp        = E;
            sheet.Image = G.GetBitmap();
            //label2.RenderTransform = new RotateTransform(90);

            ToolTip toolTip1 = new ToolTip();

            toolTip1.AutoPopDelay = 5000;
            toolTip1.InitialDelay = 500;
            toolTip1.ReshowDelay  = 400;
            toolTip1.ShowAlways   = true;

            toolTip1.SetToolTip(this.button1, "Узнать основные характеристики графа");
            toolTip1.SetToolTip(this.selectButton, "Узнать степень вершины графа, указав на неё");
            toolTip1.SetToolTip(this.drawVertexButton, "Рисовать вершины графа");
            toolTip1.SetToolTip(this.drawEdgeButton, "Рисовать рёбра графа");
            toolTip1.SetToolTip(this.deleteButton, "Выбрать компонент графа, который требуется удалить");
            toolTip1.SetToolTip(this.deleteALLButton, "Удалить граф и очистить все панели");
            toolTip1.SetToolTip(this.button3, "Найти хроматический полином графа");
            toolTip1.SetToolTip(this.button6, "Вывести метрические характеристики графа");
            toolTip1.SetToolTip(this.buttonAdj, "Вывести матрицу смежности");
            toolTip1.SetToolTip(this.buttonInc, "Вывести матрицу инцидентности");
            toolTip1.SetToolTip(this.chainButton, "Вывести все простые цепи");
            toolTip1.SetToolTip(this.cycleButton, "Вывести все циклы");
        }
 public Form1()
 {
     InitializeComponent();
     V           = new List <Vertex>();
     G           = new DrawGraph(sheet.Width, sheet.Height);
     E           = new List <Edge>();
     sheet.Image = G.GetBitmap();
 }
Esempio n. 5
0
 public Form1()
 {
     InitializeComponent();
     V           = new List <Vrchol>();
     G           = new DrawGraph(sheet.Width, sheet.Height);
     E           = new List <Hrana>();
     sheet.Image = G.GetBitmap();
 }
Esempio n. 6
0
        //кнопка - удалить граф
        private void deleteALLButton_Click(object sender, EventArgs e)
        {
            button1.Visible          = false;
            drawVertexButton.Enabled = true;
            selectButton.Enabled     = true;
            drawEdgeButton.Enabled   = true;
            deleteButton.Enabled     = true;
            const string message = "Вы действительно хотите полностью удалить графы?";
            const string caption = "Удаление";
            var          MBSave  = MessageBox.Show(message, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (MBSave == DialogResult.Yes)
            {
                if (V1 != null)
                {
                    V1.Clear();
                    E1.Clear();
                    G.clearSheet();
                    sheet1.Image = G.GetBitmap();
                    CountV1      = 1;
                }
                if (V2 != null)
                {
                    V2.Clear();
                    E2.Clear();
                    G2.clearSheet();
                    sheet2.Image = G2.GetBitmap();
                    CountV2      = 1;
                }
                if (V3 != null)
                {
                    V3.Clear();
                    E3.Clear();
                    G3.clearSheet();
                    sheet3.Image = G3.GetBitmap();
                    listBox.Items.Clear();
                }
                sheet1.Enabled = true;
                sheet2.Enabled = true;
            }
        }
Esempio n. 7
0
        public Form1()
        {
            InitializeComponent();
            V     = new List <Vertex>();
            G     = new DrawGraph(sheet.Width, sheet.Height);
            E     = new List <Edge>();
            W     = new List <Weight>();
            Value = new List <String>();
            Euler = new List <int>();

            sheet.Image = G.GetBitmap();
        }
Esempio n. 8
0
        private void DrawFromMatrix_Click(object sender, EventArgs e)
        {
            numberOfVertices  = Convert.ToInt32(textBox1.Text);
            int[,] DrawMatrix = new int[numberOfVertices, numberOfVertices];
            for (int i = 0; i < numberOfVertices; i++)
            {
                for (int j = 0; j < numberOfVertices; j++)
                {
                    DrawMatrix[i, j] = Convert.ToInt32(dataGridView1.Rows[i].Cells[j].Value);
                }
            }
            int    x       = 50;
            int    y       = 50;
            Random randomX = new Random();
            Random randomY = new Random();

            V.Clear();
            E.Clear();
            G.clearSheet();
            for (int i = 0; i < numberOfVertices; i++)
            {
                x = randomX.Next(20, 500);
                y = randomX.Next(20, 500);
                V.Add(new Vertex(x, y));
                G.drawVertex(x, y, V.Count.ToString());
                sheet.Image = G.GetBitmap();
            }
            for (int i = 0; i < numberOfVertices; i++)
            {
                for (int j = 0; j < numberOfVertices; j++)
                {
                    if (DrawMatrix[i, j] != 0)
                    {
                        E.Add(new Edge(i, j));
                        G.drawEdge(V[i], V[j], E[E.Count - 1], E.Count - 1);
                        sheet.Image = G.GetBitmap();
                    }
                }
            }
        }
Esempio n. 9
0
 //кнопка - удалить граф
 private void deleteALLButton_Click(object sender, EventArgs e)
 {
     selectButton.Enabled = true;
     drawVertexButton.Enabled = true;
     drawEdgeButton.Enabled = true;
     deleteButton.Enabled = true;
     const string message = "Вы действительно хотите полностью удалить граф?";
     const string caption = "Удаление";
     var MBSave = MessageBox.Show(message, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
     if (MBSave == DialogResult.Yes)
     {
         V.Clear();
         E.Clear();
         G.clearSheet();
         sheet.Image = G.GetBitmap();
     }
 }
Esempio n. 10
0
 public Form1()
 {
     InitializeComponent();
     button1.Visible = false;
     V1           = new SortedList <int, Vertex>();
     V2           = new SortedList <int, Vertex>();
     V3           = new SortedList <int, Vertex>();
     G            = new DrawGraph(sheet1.Width, sheet1.Height);
     G2           = new DrawGraph(sheet2.Width, sheet2.Height);
     G3           = new DrawGraph(sheet3.Width, sheet3.Height);
     E1           = new List <Edge>();
     E2           = new List <Edge>();
     E3           = new List <Edge>();
     sheet1.Image = G.GetBitmap();
     sheet2.Image = G2.GetBitmap();
     sheet3.Image = G3.GetBitmap();
 }
Esempio n. 11
0
        public Form1()
        {
            InitializeComponent();
            V = new List <Vertex>();
            G = new DrawGraph(sheet.Width, sheet.Height);
            E = new List <Edge>();
            W = new List <Weight>();

            CurV = new List <Vertex>();
            CurW = new List <Weight>();
            CurE = new List <Edge>();

            Value         = new List <String>();
            Euler         = new List <int>();
            algoService   = new ReqAlgosService();
            matrixService = new MatrixService();
            dfsService    = new DFSService();

            sheet.Image = G.GetBitmap();
        }
Esempio n. 12
0
        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();
        }
Esempio n. 13
0
 //кнопка - рисовать вершину графа
 private void drawVertexButton_Click(object sender, EventArgs e)
 {
     drawVertexButton.Enabled = false;
     button1.Visible          = false;
     selectButton.Enabled     = true;
     drawEdgeButton.Enabled   = true;
     deleteButton.Enabled     = true;
     G.clearSheet();
     G.drawALLGraph(V1, E1);
     sheet1.Image = G.GetBitmap();
     G2.clearSheet();
     G2.drawALLGraph(V2, E2);
     sheet2.Image = G2.GetBitmap();
 }
Esempio n. 14
0
        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();
        }