private void TestForm_Load(object sender, EventArgs e) { try { Account = TokenHandler.Check(); SetupLogin(false); PopulateFields(); } catch (Exception) { SetupLogin(true); } }
private void btnLogin_Click(object sender, EventArgs e) { var account = Auth.CreateLogin(); if (account == null) { return; } this.Account = account; TokenHandler.Write(account.Client.Tokens); SetupLogin(false); PopulateFields(); }