Exemplo n.º 1
0
        public ContractForm(IGameLogicInteractable game, Contract contract, uint flightID)
        {
            InitializeComponent();
            this.game     = game;
            this.flightID = flightID;
            cities        = game.GetCitiesInfo().Values.ToList();
            this.contract = contract;

            BackColor = MainForm.MostlyBackColor;
            btnAddFlight.BackColor = MainForm.MostlyBackColor;
            btnCancel.BackColor    = MainForm.MostlyBackColor;

            planesForContract = new UserScroll();
            planesForContract.SetLocation(20, 40);
            planesForContract.Text = "Ваши самолеты";
            FillPlanes(PlaneDataType.SelectPlane, planesForContract);
            this.Controls.Add(planesForContract);
        }
Exemplo n.º 2
0
        private void InitLayoutControls()
        {
            // начало расположения вышеперечисленных элементов на главной форме
            int mainX = 14, mainY = 110, mainNewX = mainX + userAiroportPlanes.Width + 20;

            userAiroportPlanes.SetLocation(mainX, mainY);
            userAiroportPlanes.Text = "Ваши самолеты";
            this.Controls.Add(userAiroportPlanes);

            userAiroportContracts.SetLocation(mainNewX, mainY);
            userAiroportContracts.Text = "Ваши контракты";
            this.Controls.Add(userAiroportContracts);

            userBoard.SetLocation(mainX, mainY);
            this.Controls.Add(userBoard);

            userMarketPlanesSell.SetLocation(mainX, mainY);
            userMarketPlanesSell.Text = "Ваши самолеты";
            this.Controls.Add(userMarketPlanesSell);

            userMarketPlanesBuy.SetLocation(mainNewX, mainY);
            userMarketPlanesBuy.Text = "Покупка самолетов";
            this.Controls.Add(userMarketPlanesBuy);
        }