Example #1
0
        public CollectionsForm(Form1 form, FederalDistrict fedDist)
        {
            mode  = 1;
            form1 = form;
            InitializeComponent();
            if (FederalDistricts.list.Count > 0)
            {
                typeBox.Items.Add("Область");
                if (Regions.list.Count > 0)
                {
                    typeBox.Items.Add("Район");
                }
            }


            federalDistrict = fedDist;

            fedDistLabel.Visible = false;
            fedDistBox.Visible   = false;
            regionLabel.Visible  = false;
            regionBox.Visible    = false;

            nameBox.Text          = fedDist.name;
            areaBox.Value         = fedDist.area;
            populationBox.Value   = fedDist.population;
            centerBox.Text        = fedDist.center;
            typeBox.SelectedIndex = 0;
            createBttn.Text       = "Изменить";
            typeBox.Visible       = false;
            label1.Visible        = false;
        }
Example #2
0
 public Region(FederalDistrict federalDistrict, string name, int area, int population, string center) : base(name, area, population, center)
 {
     this.federalDistrict = federalDistrict;
     this.name            = name;
     this.area            = area;
     this.population      = population;
     this.center          = center;
 }