public CashFlowTypesViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { SuppressEvent = false; _cashFlows = new BindableCollectionExt<CashFlow>(); _cashFlows.PropertyChanged += (s, e) => { OnPropertyChanged(s, e); CachedService.Clear(CachedServiceKeys.AllCashFlows); }; _cashFlowGroups = new BindableCollectionExt<CashFlowGroup>(); _cashFlowGroups.PropertyChanged += (s, e) => { if (SuppressEvent == true) { return; } OnPropertyChanged(s, e); CachedService.Clear(CachedServiceKeys.AllCashFlowGroups); CachedService.Clear(CachedServiceKeys.AllCashFlows); var cashFlowGroup = s as CashFlowGroup; _cashFlows.Where(x => x.CashFlowGroupId == cashFlowGroup.Id) .ForEach(x => x.Group = cashFlowGroup); NewCashFlowGroup = null; NewCashFlowGroup = CashFlowGroups.First(); }; }
public Budget() { IncomeValues = new BindableCollectionExt<IncomeValue>(); SavingValues = new BindableCollectionExt<SavingValue>(); BudgetPlanItems = new BindableCollectionExt<BudgetPlan>(); Expenses = new BindableCollectionExt<Expense>(); }
public Saving() { Values = new BindableCollectionExt <SavingValue>(); CashFlow = new CashFlow { Description = "Oszczędności" }; }
public ExpensesViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { _filteredBudgetExpenses = new List <Expense>(); ExpensesGridCashFlows = new BindableCollectionExt <CashFlow>(); CashFlows = new BindableCollectionExt <CashFlow>(); Filter = new ExpensesFilterVM(EventAggregator); IsFilteringEnabled = true; ExpensesFilteringViewModel = IoC.Get <ExpensesFilteringViewModel>(); }
public BudgetCalculationsViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { SuppressEvent = false; Equations = new BindableCollectionExt <BudgetCalculatorEquation>(); BudgetCalculatorEvaluator = IoC.Get <BudgetCalculatorEvaluator>(); Equations.PropertyChanged += (s, e) => { if (!SuppressEvent) { Save(s as Entity); } }; EventAggregator.Subscribe(this); }
public BudgetPlanItemVM(Budget budget, CashFlow cashFlow, IEnumerable<BudgetPlan> planItems) { Budget = budget; CashFlow = cashFlow; Values = new BindableCollectionExt<BudgetPlan>(planItems); Values.CollectionChanged += (s, e) => { if (e.Action == NotifyCollectionChangedAction.Remove) { var item = e.OldItems[0] as BudgetPlan; Budget.BudgetPlanItems.Remove(item); } RefreshUI(); }; Values.PropertyChanged += (s, e) => { RefreshUI(); }; }
public BudgetPlanItemVM(Budget budget, CashFlow cashFlow, IEnumerable <BudgetPlan> planItems) { Budget = budget; CashFlow = cashFlow; Values = new BindableCollectionExt <BudgetPlan>(planItems); Values.CollectionChanged += (s, e) => { if (e.Action == NotifyCollectionChangedAction.Remove) { var item = e.OldItems[0] as BudgetPlan; Budget.BudgetPlanItems.Remove(item); } RefreshUI(); }; Values.PropertyChanged += (s, e) => { RefreshUI(); }; }
public RevenuesViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { AvailableIncomes = new BindableCollectionExt<Income>(); AvailableSavings = new BindableCollectionExt<Saving>(); }
public Income() { Values = new BindableCollectionExt <IncomeValue>(); }
public CalculatorViewModel() { Items = new BindableCollectionExt <CalculatorItemVM>(); Items.PropertyChanged += delegate { NotifyOfPropertyChange(() => TotalValue); }; }
public BudgetPlanGroupItemVM(IEnumerable <BudgetPlanItemVM> items = null) { Items = new BindableCollectionExt <BudgetPlanItemVM>(items); Items.PropertyChanged += (s, e) => { RefreshUI(); }; Items.CollectionChanged += (s, e) => { RefreshUI(); }; }
public Saving() { Values = new BindableCollectionExt<SavingValue>(); CashFlow = new CashFlow { Description = "Oszczędności" }; }
public BudgetPlanViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { AllBudgetPlanList = new BindableCollectionExt <BudgetPlanItemVM>(); BudgetPlanListGrouped = new BindableCollectionExt <BudgetPlanGroupItemVM>(); }
public CalculatorViewModel() { Items = new BindableCollectionExt<CalculatorItemVM>(); Items.PropertyChanged += delegate { NotifyOfPropertyChange(() => TotalValue); }; }
public BudgetCalculatorEquation() { Items = new BindableCollectionExt <BudgetCalculatorItem>(); }
public BudgetCalculatorEquation() { Items = new BindableCollectionExt<BudgetCalculatorItem>(); }
public SavingsViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { _savings = new BindableCollectionExt<Saving>(); _savings.PropertyChanged += OnSavingPropertyChanged; }
public BudgetPlanViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { AllBudgetPlanList = new BindableCollectionExt<BudgetPlanItemVM>(); BudgetPlanListGrouped = new BindableCollectionExt<BudgetPlanGroupItemVM>(); }
public CashFlowGroupDeleteConfirmationViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { CashFlowGroups = new BindableCollectionExt<CashFlowGroup>(); }
public CashFlowGroupDeleteConfirmationViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { CashFlowGroups = new BindableCollectionExt <CashFlowGroup>(); }
public Income() { Values = new BindableCollectionExt<IncomeValue>(); }
public SavingsViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { _savings = new BindableCollectionExt <Saving>(); _savings.PropertyChanged += OnSavingPropertyChanged; }
public BudgetPlanGroupItemVM(IEnumerable<BudgetPlanItemVM> items = null) { Items = new BindableCollectionExt<BudgetPlanItemVM>(items); Items.PropertyChanged += (s, e) => { RefreshUI(); }; Items.CollectionChanged += (s, e) => { RefreshUI(); }; }
public IncomesViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator) : base(shell, database, configuration, cashedService, eventAggregator) { _incomes = new BindableCollectionExt <Income>(); }