コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: vmishukov/Diplom
        public Form1()
        {
            InitializeComponent();

            AllRotations rotations = new AllRotations();

            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();
            route404 = AllRotations.GetRoute404();
            route107 = AllRotations.GetRoute107();
            route43  = AllRotations.GetRoute43();
            route20  = AllRotations.GetRoute20();

            Routes(route107);
            Routes(route7);
            Routes(route62);
            Routes(route23);
            Routes(route43);


            AddEpicenters();

            CreateGrid();

            AddBuses();

            DisplayEpicenters Ep = new DisplayEpicenters(Epics);

            Ep.Show();
        }