Esempio n. 1
0
        public void SwitchBuildingParcel()
        {
            if (_objs != null)
            {
                foreach (var o in _objs)
                {
                    ComputationUnit unit = o as ComputationUnit;
                    unit.UpdateResult();
                    unit.UpdateFeature();
                }

                PropGrid.Refresh();
            }
        }
Esempio n. 2
0
        public void RefreshComputation()
        {
            if (_objs != null)
            {
                foreach (var o in _objs)
                {
                    ComputationUnit unit = o as ComputationUnit;
                    unit.UpdatePopulation();
                    unit.UpdateResult();
                    unit.UpdateFeature();
                }

                PropGrid.Refresh();
            }
        }
Esempio n. 3
0
        private void PropertyValueChanged(ComputationUnit unit, string changedProperty)
        {
            if (changedProperty == "FAR" || changedProperty == "Levels" || changedProperty == "Type" ||
                changedProperty == "Area" || changedProperty == "Levels" || changedProperty == "PerCapitaLivingSpace")
            {
                unit.UpdatePopulation();
            }

            if (unit.Type == BuildingType.Mixed)
            {
                unit.IsValidMixedValue();
                unit.UpdatePopulation();
            }

            unit.UpdateResult();
            unit.UpdateFeature();
        }