/// <summary>
        ///     Default constructor
        /// </summary>
        protected ModifyPaymentViewModel(ICrudServicesAsync crudServices,
                                         IDialogService dialogService,
                                         ISettingsFacade settingsFacade,
                                         IBackupService backupService,
                                         INavigationService navigationService)
        {
            this.crudServices      = crudServices;
            this.dialogService     = dialogService;
            this.settingsFacade    = settingsFacade;
            this.backupService     = backupService;
            this.navigationService = navigationService;

            MessengerInstance.Register <CategorySelectedMessage>(this, ReceiveMessage);
        }
Example #2
0
 public EditCategoryViewModel(IMediator mediator,
                              IDialogService dialogService,
                              ISettingsFacade settingsFacade,
                              IBackupService backupService,
                              INavigationService navigationService,
                              IMapper mapper)
     : base(mediator, settingsFacade, backupService, navigationService, mapper)
 {
     this.mediator       = mediator;
     this.dialogService  = dialogService;
     this.settingsFacade = settingsFacade;
     this.backupService  = backupService;
     this.mapper         = mapper;
 }
Example #3
0
        public AddAccountViewModel(IMediator mediator,
                                   IMapper mapper,
                                   ISettingsFacade settingsFacade,
                                   IBackupService backupService,
                                   IDialogService dialogService,
                                   INavigationService navigationService)
            : base(settingsFacade, backupService, navigationService)
        {
            this.mediator      = mediator;
            this.dialogService = dialogService;
            this.mapper        = mapper;

            Title = Strings.AddAccountTitle;
        }
Example #4
0
 public AddPaymentViewModel(IMediator mediator,
                            IMapper mapper,
                            IPaymentService paymentService,
                            IDialogService dialogService,
                            ISettingsFacade settingsFacade,
                            IBackupService backupService,
                            INavigationService navigationService)
     : base(mediator, mapper, dialogService, settingsFacade, backupService, navigationService)
 {
     this.mediator          = mediator;
     this.mapper            = mapper;
     this.paymentService    = paymentService;
     this.navigationService = navigationService;
     this.dialogService     = dialogService;
 }
Example #5
0
 public EditPaymentViewModel(IPaymentService paymentService,
                             ICrudServicesAsync crudServices,
                             IDialogService dialogService,
                             ISettingsFacade settingsFacade,
                             IBackupService backupService,
                             INavigationService navigationService)
     : base(crudServices, dialogService, settingsFacade, backupService, navigationService)
 {
     this.paymentService    = paymentService;
     this.navigationService = navigationService;
     this.crudServices      = crudServices;
     this.dialogService     = dialogService;
     this.backupService     = backupService;
     this.paymentService    = paymentService;
 }
Example #6
0
        /// <summary>
        ///     Default constructor
        /// </summary>
        protected ModifyPaymentViewModel(IMediator mediator,
                                         IMapper mapper,
                                         IDialogService dialogService,
                                         ISettingsFacade settingsFacade,
                                         IBackupService backupService,
                                         INavigationService navigationService)
        {
            this.dialogService     = dialogService;
            this.settingsFacade    = settingsFacade;
            this.backupService     = backupService;
            this.navigationService = navigationService;
            this.mediator          = mediator;
            this.mapper            = mapper;

            MessengerInstance.Register <CategorySelectedMessage>(this, ReceiveMessage);
        }
        /// <summary>
        ///     Constructor
        /// </summary>
        public AccountListViewModel(ICrudServicesAsync crudService,
                                    IBalanceCalculationService balanceCalculationService,
                                    IDialogService dialogService,
                                    ISettingsFacade settingsFacade,
                                    INavigationService navigationService)
        {
            this.crudService       = crudService;
            this.dialogService     = dialogService;
            this.navigationService = navigationService;
            this.settingsFacade    = settingsFacade;

            BalanceViewModel    = new BalanceViewModel(balanceCalculationService);
            ViewActionViewModel = new AccountListViewActionViewModel(crudService, this.navigationService);

            Accounts = new ObservableCollection <AlphaGroupListGroupCollection <AccountViewModel> >();
        }
Example #8
0
        /// <summary>
        ///     Constructor
        /// </summary>
        public AccountListViewModel(IMediator mediator,
                                    IMapper mapper,
                                    IBalanceCalculationService balanceCalculationService,
                                    IDialogService dialogService,
                                    ISettingsFacade settingsFacade,
                                    INavigationService navigationService)
        {
            this.mediator          = mediator;
            this.mapper            = mapper;
            this.dialogService     = dialogService;
            this.navigationService = navigationService;
            this.settingsFacade    = settingsFacade;

            BalanceViewModel    = new BalanceViewModel(balanceCalculationService);
            ViewActionViewModel = new AccountListViewActionViewModel(mediator, this.navigationService);

            Accounts = new ObservableCollection <AlphaGroupListGroupCollection <AccountViewModel> >();
        }
Example #9
0
        /// <summary>
        ///     Default constructor
        /// </summary>
        public PaymentListViewModel(ICrudServicesAsync crudServices,
                                    IPaymentService paymentService,
                                    IDialogService dialogService,
                                    ISettingsFacade settingsFacade,
                                    IBalanceCalculationService balanceCalculationService,
                                    IBackupService backupService,
                                    INavigationService navigationService)
        {
            this.crudServices              = crudServices;
            this.paymentService            = paymentService;
            this.dialogService             = dialogService;
            this.settingsFacade            = settingsFacade;
            this.balanceCalculationService = balanceCalculationService;
            this.backupService             = backupService;
            this.navigationService         = navigationService;

            MessengerInstance.Register <PaymentListFilterChangedMessage>(this, LoadPayments);
        }
Example #10
0
        /// <summary>
        ///     Default constructor
        /// </summary>
        public PaymentListViewModel(IMediator mediator,
                                    IMapper mapper,
                                    IPaymentService paymentService,
                                    IDialogService dialogService,
                                    ISettingsFacade settingsFacade,
                                    IBalanceCalculationService balanceCalculationService,
                                    IBackupService backupService,
                                    INavigationService navigationService)
        {
            this.mediator                  = mediator;
            this.mapper                    = mapper; this.paymentService = paymentService;
            this.dialogService             = dialogService;
            this.settingsFacade            = settingsFacade;
            this.balanceCalculationService = balanceCalculationService;
            this.backupService             = backupService;
            this.navigationService         = navigationService;

            MessengerInstance.Register <PaymentListFilterChangedMessage>(this, async message => { await LoadPayments(message); });
        }
Example #11
0
        /// <summary>
        ///     Constructor
        /// </summary>
        public PaymentListViewActionViewModel(int accountId,
                                              ICrudServicesAsync crudServices,
                                              ISettingsFacade settingsFacade,
                                              IDialogService dialogService,
                                              IBalanceViewModel balanceViewModel,
                                              INavigationService navigationService)
        {
            this.accountId = accountId;

            this.crudServices      = crudServices;
            this.settingsFacade    = settingsFacade;
            this.dialogService     = dialogService;
            this.balanceViewModel  = balanceViewModel;
            this.navigationService = navigationService;

            var accountCount = crudServices.ReadManyNoTracked <AccountViewModel>().Count();

            IsTransferAvailable   = accountCount >= 2;
            IsAddIncomeAvailable  = accountCount >= 1;
            IsAddExpenseAvailable = accountCount >= 1;
        }
        /// <summary>
        ///     Constructor
        /// </summary>
        public PaymentListViewActionViewModel(int accountId,
                                              IMediator mediator,
                                              ISettingsFacade settingsFacade,
                                              IDialogService dialogService,
                                              IBalanceViewModel balanceViewModel,
                                              INavigationService navigationService)
        {
            this.accountId = accountId;

            this.mediator          = mediator;
            this.settingsFacade    = settingsFacade;
            this.dialogService     = dialogService;
            this.balanceViewModel  = balanceViewModel;
            this.navigationService = navigationService;

            int accountCount = mediator.Send(new GetAccountCountQuery()).Result;

            IsTransferAvailable   = accountCount >= 2;
            IsAddIncomeAvailable  = accountCount >= 1;
            IsAddExpenseAvailable = accountCount >= 1;
        }
 /// <summary>
 ///     Creates an CategoryListViewModel for usage when the list including the option is needed.
 /// </summary>
 public CategoryListViewModel(ICrudServicesAsync curdServicesAsync,
                              IDialogService dialogService,
                              INavigationService navigationService) : base(curdServicesAsync, dialogService, navigationService)
 {
 }
 /// <summary>
 ///     Creates an CategoryListViewModel for usage when the list including the option is needed.
 /// </summary>
 public CategoryListViewModel(IMediator mediator,
                              IMapper mapper,
                              IDialogService dialogService,
                              INavigationService navigationService) : base(mediator, mapper, dialogService, navigationService)
 {
 }