private void LoginWindow_LoggedOut() { Dispatcher.Invoke(new Action(() => { LoginBtn.IsEnabled = true; LoginBtn.Content = "登录EA"; })); ea = null; }
private void LoginWindow_LoggedIn(string json) { Dispatcher.Invoke(new Action(() => { LoginBtn.IsEnabled = true; LoginBtn.Content = "注销登录"; })); string token = Regex.Match(json, "{\"access_token\":\"(?<Token>.+)\",\"token_type\":\".+\",\"expires_in\":\".+\"}").Groups["Token"].Value; ea = new EA(token); }