private void ByQRCode_QrCodeStatus_Changed(ByQRCode.QrCodeStatus status, Account account = null) { if (status == ByQRCode.QrCodeStatus.Success) { bilibili.BiliUser.account = account; InfoLog.InfoPrintf("UID:" + account.Uid + ",登陆成功", InfoLog.InfoClass.杂项提示); //MessageBox.Show("UID:"+account.Uid+",登陆成功"); MMPU.UID = account.Uid; MMPU.写ini配置文件("User", "UID", MMPU.UID, MMPU.BiliUserFile); foreach (var item in account.Cookies) { MMPU.Cookie = MMPU.Cookie + item + ";"; } MMPU.CookieEX = account.Expires_Cookies; MMPU.csrf = account.CsrfToken; ; MMPU.写ini配置文件("User", "csrf", MMPU.csrf, MMPU.BiliUserFile); MMPU.写ini配置文件("User", "Cookie", Encryption.AesStr(MMPU.Cookie, MMPU.AESKey, MMPU.AESVal), MMPU.BiliUserFile); MMPU.写ini配置文件("User", "CookieEX", MMPU.CookieEX.ToString("yyyy-MM-dd HH:mm:ss"), MMPU.BiliUserFile); Dispatcher.Invoke(new Action(delegate { Close(); })); } }
private void ByQRCode_QrCodeStatus_Changed(ByQRCode.QrCodeStatus status, Account account = null) { if (status == ByQRCode.QrCodeStatus.Success) { Plugin.BilibiliAccount.account = account; Console.WriteLine(status); //MessageBox.Show("UID:"+account.Uid+",登陆成功"); MMPU.UID = account.Uid; MMPU.写ini配置文件("User", "UID", MMPU.UID, MMPU.BiliUserFile); foreach (var item in account.Cookies) { MMPU.Cookie = MMPU.Cookie + item + ";"; } MMPU.CookieEX = account.Expires_Cookies; MMPU.csrf = account.CsrfToken; ; MMPU.写ini配置文件("User", "csrf", MMPU.csrf, MMPU.BiliUserFile); MMPU.写ini配置文件("User", "Cookie", Encryption.AesStr(MMPU.Cookie, MMPU.AESKey, MMPU.AESVal), MMPU.BiliUserFile); MMPU.写ini配置文件("User", "CookieEX", MMPU.CookieEX.ToString(), MMPU.BiliUserFile); Dispatcher.Invoke(new Action(delegate { Close(); })); } }