private void Button_Result(object sender, RoutedEventArgs e)
        {
            try
            {
                var model  = new LcComputation(MapDataManager.LatestMap, Demo.CaculateType);
                var result = new ResultSummary
                {
                    Count    = model.AllUnits.Count,
                    Area     = model.AllUnits.Sum(x => x.Area),
                    Green    = model.GetGreenCarbonConsumption(),
                    Building = model.GetBuildingCarbonProduction(),
                    Trip     = model.GetTripCarbonProduction()
                };

                string SumResult = LocalizationHelper.GetString("RS:SumResult");
                Gui.PropertyWindow(SumResult, result, 300, 400);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ERROR");
            }
        }
Пример #2
0
 public void UpdateResult()
 {
     LcComputation.GetBuildingCarbonProduction(this);
     LcComputation.GetGreenCarbonConsumption(this);
 }