private static int GetDebtOrder(SimulationDebtAccount debt, SnowBallSetup setup, int defaultOrder) { int index = Array.IndexOf(setup.DebtOrder, debt.Id); if (index < 0) { index = defaultOrder; } return(index); }
public SnowBallSetupViewModel(ProfileViewModel profile, SnowBallSetup model) { Profile = profile; _initialAmount = model?.InitialAmount ?? 0; _desiredOrder = model?.DebtOrder; DoRefresh(); Profile.Debts.CollectionChanged += Debts_CollectionChanged; }