public RecentAccountViewModel(IRegionManager regionManager, IRecentAccountsService recentAccountsService, IEventAggregator eventAggregator) { _regionManager = regionManager; _recentAccountsService = recentAccountsService; _eventAggregator = eventAggregator; InitializeAccounts(); ChooseItemCommand = new DelegateCommand(GotoAccount); _eventAggregator.GetEvent <RecentAccountServiceEvent>().Subscribe(InitializeAccounts); }
public AccountViewModelX(IEventAggregator event_aggtr, IServiceFactory service_fctry, IRegionManager regionManager, IProductListService product_svc, IStateListService address_postal_serv, IReportService reportService, IAccountEntityService account_entity_svc, IRecentAccountsService recent_acct_servc, IWorkingAccountService working_acct_serv) { event_aggregator = event_aggtr; service_factory = service_fctry; region_manager = regionManager; product_service = product_svc; address_postal_service = address_postal_serv; report_service = reportService; account_entity_service = account_entity_svc; recent_account_service = recent_acct_servc; working_account_service = working_acct_serv; GetProductList(); GetStateList(); BindCommands(); //InitNewAccount(); //Account.PropertyChanged += Context_PropertyChanged; RegisterApplicationCommands(); //ApplicationCommands.DeleteAccountCommand.RegisterCommand(DeleteAccountCommand); event_aggregator.GetEvent <AccountLoadedEvent>().Publish(string.Empty); }