Exemplo n.º 1
0
        private void Init()
        {
            EducationalServices    eduServices = new EducationalServices();
            ComboBoxItemCollection coll        = comboBoxEdit1.Properties.Items;

            coll.BeginUpdate();
            try
            {
                List <Educational> EList = eduServices.GetAllEducationals();
                foreach (Educational edu in eduServices.GetAllEducationals())
                {
                    coll.Add(edu.EducationalName);
                }
            }
            finally
            {
                coll.EndUpdate();
            }
            comboBoxEdit1.SelectedIndex = -1;

            Application.DoEvents();
        }
Exemplo n.º 2
0
        public Configuration(bool setDefault) // This is called by the XmlConfig class to set the default values
        {
            Version = Debug.GetVersion();

            Schools = new EducationalServices(false, 300, 1000, 4500);

            Residential_LowDensity[Building.Levels.Level1] = new Building.Level(20, 60, 120, 120, 100, 120);
            Residential_LowDensity[Building.Levels.Level2] = new Building.Level(25, 60, 110, 110, 100, 160);
            Residential_LowDensity[Building.Levels.Level3] = new Building.Level(30, 60, 100, 100, 60, 240);
            Residential_LowDensity[Building.Levels.Level4] = new Building.Level(35, 60, 90, 90, 40, 360);
            Residential_LowDensity[Building.Levels.Level5] = new Building.Level(40, 60, 80, 80, 30, 450);

            Residential_HighDensity[Building.Levels.Level1] = new Building.Level(60, 30, 60, 60, 70, 70);
            Residential_HighDensity[Building.Levels.Level2] = new Building.Level(100, 28, 55, 55, 70, 100);
            Residential_HighDensity[Building.Levels.Level3] = new Building.Level(130, 26, 50, 50, 40, 130);
            Residential_HighDensity[Building.Levels.Level4] = new Building.Level(150, 24, 45, 45, 30, 160);
            Residential_HighDensity[Building.Levels.Level5] = new Building.Level(160, 22, 40, 40, 20, 200);

            Commercial_LowDensity[Building.Levels.Level1] = new Building.Level(50, 50, 60, 60, 100, 520);
            Commercial_LowDensity[Building.Levels.Level2] = new Building.Level(75, 60, 80, 80, 50, 800);
            Commercial_LowDensity[Building.Levels.Level3] = new Building.Level(100, 70, 100, 100, 25, 1120);

            Commercial_HighDensity[Building.Levels.Level1] = new Building.Level(75, 30, 70, 70, 50, 280);
            Commercial_HighDensity[Building.Levels.Level2] = new Building.Level(100, 30, 60, 60, 50, 560);
            Commercial_HighDensity[Building.Levels.Level3] = new Building.Level(125, 30, 50, 50, 25, 800);

            Industrial_Generic[Building.Levels.Level1] = new Building.Level(100, 150, 100, 100, 200, 160);
            Industrial_Generic[Building.Levels.Level2] = new Building.Level(150, 200, 130, 130, 150, 200);
            Industrial_Generic[Building.Levels.Level3] = new Building.Level(200, 250, 160, 160, 100, 240);

            Industrial_Forestry[Building.Levels.None] = new Building.Level(100, 90, 60, 60, 100, 140);
            Industrial_Farming[Building.Levels.None]  = new Building.Level(100, 110, 350, 350, 150, 180);
            Industrial_Oil[Building.Levels.None]      = new Building.Level(150, 350, 200, 200, 200, 360);
            Industrial_Ore[Building.Levels.None]      = new Building.Level(150, 300, 250, 250, 150, 300);

            Office[Building.Levels.Level1] = new Building.Level(50, 80, 90, 90, 100, 140);
            Office[Building.Levels.Level2] = new Building.Level(110, 100, 100, 100, 50, 200);
            Office[Building.Levels.Level3] = new Building.Level(170, 120, 110, 110, 25, 300);
        }