Guest User

Untitled

a guest
Jul 26th, 2018
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. public void AddAccount(string email, string password)
  2.         {
  3.             try
  4.             {
  5.                 Account account = new Account()
  6.                 {
  7.                     Actions = Actions.Login,
  8.                     Username = email,
  9.                     Password = password
  10.                 };
  11.                 account.InitCompleteHandler += InitComplete;
  12.                 Task.Factory.StartNew(account.Login);
  13.             }
  14.             catch (Exception)
  15.             {
  16.                 throw;
  17.             }
  18.         }
  19.  
  20.         private void InitComplete(Account account)
  21.         {
  22.             accounts.Add(account);
  23.             LoginCompleteHandler();
  24.         }
Add Comment
Please, Sign In to add comment