/// <summary>
        ///     Constructor
        /// </summary>
        public AccountListViewModel(IMediator mediator,
                                    IMapper mapper,
                                    IBalanceCalculationService balanceCalculationService,
                                    IDialogService dialogService,
                                    ISettingsFacade settingsFacade,
                                    NavigationService 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> >();
        }
示例#2
0
        public AccountListViewModel(IMediator mediator,
                                    IMapper mapper,
                                    IBalanceCalculationService balanceCalculationService,
                                    IDialogService dialogService,
                                    ISettingsFacade settingsFacade,
                                    NavigationService navigationService)
        {
            this.mediator          = mediator;
            this.mapper            = mapper;
            this.dialogService     = dialogService;
            this.navigationService = navigationService;
            this.settingsFacade    = settingsFacade;

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

            Accounts = new ObservableCollection <AlphaGroupListGroupCollection <AccountViewModel> >();

            MessengerInstance.Register <ReloadMessage>(this, async(m) => await LoadAsync());
        }