Exemple #1
0
        private void CityComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            baseParams.CitySelectedIndex = CityComboBox.SelectedIndex;

            if (IsRunning)
            {
                switch (baseParams.CityClimate)
                {
                case CityClimateType.NorthClimate:
                    baseParams.ElectricityProductionFactor = 0.8115;
                    break;

                case CityClimateType.MiddleClimate:
                    baseParams.ElectricityProductionFactor = 0.7495;
                    break;

                case CityClimateType.SouthClimate:
                    baseParams.ElectricityProductionFactor = 0.6323;
                    break;

                default:
                    Console.WriteLine("error occurred");
                    return;
                }

                MaintenanceParams maintenanceParams = Parameter.Maintenance;
                maintenanceParams.Refresh();
                (MainWindow.DemoInstance as Demo).RefreshComputation();
            }
            ElectricityCO2FactorTextBox.Text = baseParams.ElectricityProductionFactor.ToString();
        }
Exemple #2
0
 static Parameter()
 {
     Base        = new BaseParams();
     Building    = new BuildingParams();
     Trip        = new TripParams();
     Green       = new GreenParams();
     Maintenance = new MaintenanceParams();
 }
Exemple #3
0
        private void BaseYearsComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //Todo: update here , get from DB
            baseParams.BaseYear = 2005 + BaseYearsComboBox.SelectedIndex;
            baseParams.BaseYearSelectedIndex = BaseYearsComboBox.SelectedIndex;

            MaintenanceParams maintenanceParams = Parameter.Maintenance;

            maintenanceParams.Refresh();
            (MainWindow.DemoInstance as Demo).RefreshComputation();
        }