public static void RemoveAccount(Accountofdevice account) { // Remove the account from the accounts list AccountList.Remove(account); // Re save the updated list SaveAccountListAsync(); }
public static Accountofdevice AddAccount(string username) { // Create a new account with the username Accountofdevice account = new Accountofdevice() { Username = username }; // Add it to the local list of accounts AccountList.Add(account); // SaveAccountList and return the account SaveAccountListAsync(); return(account); }