public HasBalanceAccountsViewModel(BankAccountsViewModel accounts, DebtsViewModel debts)
     : base(accounts, debts)
 {
     _debts = debts;
     _debts.CollectionChanged += OnDebtsCollectionChanged;
     UpdateItemCache();
 }
        public ProfileViewModel(Profile model)
        {
            _name   = model.Name;
            Created = model.Created;

            Accounts  = new BankAccountsViewModel(this, model.Accounts);
            Bills     = new BillsViewModel(this, model.Bills);
            Debts     = new DebtsViewModel(this, model.Debts);
            Paychecks = new PaychecksViewModel(this, model.Paychecks);

            Payments           = new PaymentsViewModel(Bills, Debts);
            HasBalanceAccounts = new HasBalanceAccountsViewModel(Accounts, Debts);

            Transactions = new TransactionsViewModel(this, model.Transactions);

            Snowball = new SnowBallSetupViewModel(this, model.Snowball);
            Events   = new EventSetupViewModel(this, model.Events);

            Bills.ForEach(b => b.CompleteInitialization());
            Debts.ForEach(d => d.CompleteInitialization());

            Setup = new SimulationSetupViewModel(model.Setup);
        }