Ejemplo n.º 1
0
        public MainForm()
        {
            InitializeComponent();

            model = new ProgramModel();
            model.StageChanged += Model_StageChanged;

            ShowStartScreen(model);
        }
Ejemplo n.º 2
0
 public void Configure(IProgramModel model_)
 {
     if (configured)
     {
         return;
     }
     model = model_;
     launchButton.Click += StartButton_Click;
     configured          = true;
 }
Ejemplo n.º 3
0
        public void Configure(IProgramModel model_)
        {
            if (configured)
            {
                return;
            }
            model = model_;
            field = new Field(model, Width, Height);

            field.AddLabelsPoints(addControl);

            Invalidate();
            configured = true;
        }
Ejemplo n.º 4
0
        public void Configure(IProgramModel model_)
        {
            if (configured)
            {
                return;
            }

            model = model_;
            fieldControl.Configure(model);

            startButton.Click += StartButton_Click;
            pauseButton.Click += PauseButton_Click;

            graphicTimer.Tick += GraphicTimer_Tick;
            clockTimer.Tick   += ClockTimer_Tick;

            configured = true;
        }
Ejemplo n.º 5
0
        public Field(IProgramModel model, int width, int height)
        {
            this.model = model;
            Width      = width;
            Height     = height;
            ProgramOptions.PixelsInCell = GetPixelsInCell(width, height);
            Points = new Points(this);

            Aircrafts = new Dictionary <AircraftType, Dictionary <int, IAircraft> >
            {
                { AircraftType.Plane, new Dictionary <int, IAircraft>() },
                { AircraftType.Umv, new Dictionary <int, IAircraft>() }
            };

            AircraftPaths = new Dictionary <AircraftFlow, Dictionary <AircraftType, Dictionary <int, List <Point3D> > > >
            {
                { AircraftFlow.Arrive, new Dictionary <AircraftType, Dictionary <int, List <Point3D> > >() },
                { AircraftFlow.Depurture, new Dictionary <AircraftType, Dictionary <int, List <Point3D> > >() },
                { AircraftFlow.Passing, new Dictionary <AircraftType, Dictionary <int, List <Point3D> > >() }
            };

            LabelsPoints = new Dictionary <Point3D, Label>();
        }
Ejemplo n.º 6
0
 private void ShowMainScreen(IProgramModel model)
 {
     mainControl.Configure(model);
     mainControl.Show();
 }
Ejemplo n.º 7
0
 private void ShowStartScreen(IProgramModel model)
 {
     HideScreens();
     startControl.Configure(model);
     startControl.Show();
 }