diff --git a/FunGame.Desktop/Controller/LoginController.cs b/FunGame.Desktop/Controller/LoginController.cs index 4645aa2..1c935e0 100644 --- a/FunGame.Desktop/Controller/LoginController.cs +++ b/FunGame.Desktop/Controller/LoginController.cs @@ -22,14 +22,14 @@ namespace Milimoe.FunGame.Desktop.Controller UIForm = form; } - public async Task LoginAccountAsync(string username, string password, string autokey = "") + public async Task LoginAccountAsync(string username, string password, string autokey = "", bool encrypt = true) { bool result = false; string msg = ""; try { - password = password.Encrypt(username); + if (encrypt) password = password.Encrypt(username); LoginEventArgs args = new(username, password, autokey); if (OnBeforeLoginEvent(args)) diff --git a/FunGame.Desktop/Controller/RegisterController.cs b/FunGame.Desktop/Controller/RegisterController.cs index db493c1..64d4bd0 100644 --- a/FunGame.Desktop/Controller/RegisterController.cs +++ b/FunGame.Desktop/Controller/RegisterController.cs @@ -41,7 +41,7 @@ namespace Milimoe.FunGame.Desktop.Controller { case RegInvokeType.InputVerifyCode: { - while (true) + while (!result) { string verifycode = ShowMessage.InputMessageCancel("请输入注册邮件中的6位数字验证码", "注册验证码", out MessageResult cancel); if (cancel != MessageResult.Cancel) diff --git a/FunGame.Desktop/UI/Register/Register.cs b/FunGame.Desktop/UI/Register/Register.cs index 175beb7..30513c8 100644 --- a/FunGame.Desktop/UI/Register/Register.cs +++ b/FunGame.Desktop/UI/Register/Register.cs @@ -116,7 +116,7 @@ namespace Milimoe.FunGame.Desktop.UI { string username = ((RegisterEventArgs)e).Username; string password = ((RegisterEventArgs)e).Password; - TaskUtility.StartAndAwaitTask(async () => await LoginController.LoginAccountAsync(username, password)); + TaskUtility.StartAndAwaitTask(async () => await LoginController.LoginAccountAsync(username, password, encrypt: false)); RunTime.Login?.Close(); return EventResult.Success; }