예제 #1
0
 public MainViewModel(ApiConnectionService api, VarsService varsService, AccountsService accountsService)
 {
     _api         = api;
     _varsService = varsService;
     InitCommands();
     Accounts = accountsService
                .GetAccounts()
                .Select(a => new AccountViewModel(
                            a,
                            new Command(() =>
     {
         api.UseStoredAccount(a.ID);
         CurrentAccount = a;
     })))
                .ToArray();
     CurrentAccount = accountsService.GetCurrentAccount();
 }
예제 #2
0
 public AccountsService(LocalDBFactory dbFactory, VarsService varsService)
 {
     _dbFactory   = dbFactory;
     _varsService = varsService;
 }