示例#1
0
 public void Add(Event e)
 {
     Events.Add(e);
     PersistencyService.SaveEventsAsJsonAsync(Events);
 }
 public async void LoadAccountsAsync()
 {
     _observableCollection = await PersistencyService.LoadGenericFromJsonAsync <Account>("accounts.json");
 }
 public void Add(string username, string password)
 {
     ObservableCollection.Add(new Account(username, password));
     PersistencyService.SaveGenericAsJsonAsync(_observableCollection, "accounts.json");
 }
 public void Remove(Account account)
 {
     _observableCollection.Remove(account);
     PersistencyService.SaveGenericAsJsonAsync(_observableCollection, "accounts.json");
 }
 private AccountCatalogSingleton()
 {
     PersistencyService.SaveGenericAsJsonAsync(new ObservableCollection <Account>(), "accounts.json");
 }