public MainWindowViewModelDesignTime() : base(new ConfigurationBuilder().Build()) { InterestPlanViewModels.Clear(); InterestPlanViewModels.Add(new InterestPlanViewModel(InterestPlanViewModelOption.GetExample1())); InterestPlanViewModels.Add(new InterestPlanViewModel(InterestPlanViewModelOption.GetExample2())); Cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures); }
private void UpdateOverallResidualDebt() { OverallResidualDebt = InterestPlanViewModels.Count == 0 ? 0 : InterestPlanViewModels.Select(a => a.ResidualDebt).Aggregate((a, b) => a + b); }
private void UpdateOverallTotalInterest() { OverallTotalInterest = InterestPlanViewModels.Count == 0 ? 0 : InterestPlanViewModels.Select(a => a.TotalInterest).Aggregate((a, b) => a + b); }
private void AddInterestPlanViewModel(InterestPlanViewModel interestPlanViewModel) { interestPlanViewModel.PropertyChanged += InterestPlanViewModel_PropertyChanged; InterestPlanViewModels.Add(interestPlanViewModel); }