Пример #1
0
        private void Init()
        {
            Thread thr_model = new Thread(new ThreadStart(Modelling));

            thr_model.IsBackground = true;
            Thread thr_time = new Thread(new ThreadStart(Timing));

            thr_time.IsBackground = true;
            airports = new CAirport[planescount];
            planes   = new CPlane[planescount];
            for (int i = 0; i < planescount; i++)
            { //создаём аэропорты и самолёты
                airports[i] = new CAirport(i.ToString());
                planes[i]   = new CPlane(airports[i], seats);

                Invoke(new OutputDelegate(Output), new object[] { String.Format("Работа... {0}", globaltime.ToString("f")) });
            }
            thr_model.Start();
            thr_time.Start();
            button1.Text = "Остановить";
        }
Пример #2
0
 public void SetLandingNext(CPlane plane)
 {
     landing = plane;
 }