public MonthForecaster(KeeperDb db, RegularPaymentsProvider regularPaymentsProvider, RateExtractor rateExtractor, DepositCalculationAggregator depositCalculationAggregator) { _db = db; _regularPaymentsProvider = regularPaymentsProvider; _rateExtractor = rateExtractor; _depositCalculationAggregator = depositCalculationAggregator; }
public AccountForestViewModel(ShellModel shellModel, KeeperDb db, AccountTreesGardener accountTreesGardener, AccountLowLevelOperator accountLowLevelOperator, DepositCalculationAggregator depositCalculationAggregator) { MyForestModel = shellModel.MyForestModel; _db = db; _accountTreesGardener = accountTreesGardener; _accountLowLevelOperator = accountLowLevelOperator; _depositCalculationAggregator = depositCalculationAggregator; InitVariablesToShowAccounts(); }
public DepositsViewModel(KeeperDb db, RateExtractor rateExtractor, DepositCalculationAggregator depositCalculatorAggregator, OldRatesDiagramDataExtractor oldRatesDiagramDataExtractor) { var sw = new Stopwatch(); Console.WriteLine("DepositViewModel ctor starts {0}", sw.Elapsed); sw.Start(); _db = db; _rateExtractor = rateExtractor; _depositCalculatorAggregator = depositCalculatorAggregator; _oldRatesDiagramDataExtractor = oldRatesDiagramDataExtractor; MyTitleStyle = new Style(); DepositList = new List <Deposit>(); foreach (var account in _db.FlattenAccounts()) { if (!account.Is("Депозиты") || account.Children.Count != 0 || !account.IsDeposit()) { continue; } _depositCalculatorAggregator.FillinFieldsForOneDepositReport(account.Deposit); DepositList.Add(account.Deposit); } SelectedDeposit = DepositList[0]; UpperRow = new GridLength(1, GridUnitType.Star); LowerRow = new GridLength(1, GridUnitType.Star); LeftColumn = new GridLength(1, GridUnitType.Star); RightColumn = new GridLength(1, GridUnitType.Star); DepoCurrenciesProportionChartCtor(); Console.WriteLine("DepositViewModel ctor 1 {0}", sw.Elapsed); YearsProfitCtor(); Console.WriteLine("DepositViewModel ctor 2 {0}", sw.Elapsed); TotalBalancesCtor(); Console.WriteLine("DepositViewModel ctor 3 {0}", sw.Elapsed); // CashDepoProportionChartCtor(); sw.Stop(); Console.WriteLine("DepositViewModel ctor takes {0}", sw.Elapsed); }