コード例 #1
0
 private void TestForm_Load(object sender, EventArgs e)
 {
     try
     {
         Account = TokenHandler.Check();
         SetupLogin(false);
         PopulateFields();
     }
     catch (Exception)
     {
         SetupLogin(true);
     }
 }
コード例 #2
0
        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();
        }