Commit 0104e43e authored by nanahira's avatar nanahira

fixes

parent 2f21a4b9
...@@ -206,7 +206,11 @@ public static class TcpHelper ...@@ -206,7 +206,11 @@ public static class TcpHelper
{ {
if (Program.I().menu.isShowed == false) if (Program.I().menu.isShowed == false)
{ {
Program.I().shiftToServant(Program.I().mycard.isMatching ? Program.I().mycard : Program.I().selectServer); if (Program.I().mycard.isMatching) {
Program.I().shiftToServant(Program.I().mycard);
} else {
Program.I().shiftToServant(Program.I().selectServer);
}
} }
if (!roomListChecking) if (!roomListChecking)
{ {
......
...@@ -96,7 +96,7 @@ public class MyCard : WindowServantSP ...@@ -96,7 +96,7 @@ public class MyCard : WindowServantSP
(new Thread(() => { TcpHelper.join(mycard_ip, username, match_type == "athletic" ? athletic_port : entertain_port, pswString, "0x" + String.Format("{0:X}", Config.ClientVersion)); })).Start(); (new Thread(() => { TcpHelper.join(mycard_ip, username, match_type == "athletic" ? athletic_port : entertain_port, pswString, "0x" + String.Format("{0:X}", Config.ClientVersion)); })).Start();
isRequesting = false; isRequesting = false;
} catch (Exception e) { } catch (Exception e) {
if (e != ThreadAbortException) { if (e.GetType() != ThreadAbortException) {
Program.PrintToChat(InterString.Get("未知错误: ") + e.Message); Program.PrintToChat(InterString.Get("未知错误: ") + e.Message);
} else { } else {
Program.PrintToChat("匹配已中断。"); Program.PrintToChat("匹配已中断。");
...@@ -106,8 +106,8 @@ public class MyCard : WindowServantSP ...@@ -106,8 +106,8 @@ public class MyCard : WindowServantSP
} }
void startMatch(string match_type) { void startMatch(string match_type) {
const string username = inputUsername.value; string username = inputUsername.value;
const string password = inputPsw.value; string password = inputPsw.value;
if (username == "" || password == "") if (username == "" || password == "")
{ {
RMSshow_onlyYes("", InterString.Get("用户名或密码为空。"), null); RMSshow_onlyYes("", InterString.Get("用户名或密码为空。"), null);
......
...@@ -351,7 +351,7 @@ public class SelectServer : WindowServantSP ...@@ -351,7 +351,7 @@ public class SelectServer : WindowServantSP
} }
File.WriteAllText("config/passwords.conf", all); File.WriteAllText("config/passwords.conf", all);
printFile(false); printFile(false);
Program.I().mycard.isMatchingWithMyCard = false; Program.I().mycard.isMatching = false;
(new Thread(() => { TcpHelper.join(ipString, name, portString, pswString, versionString); })).Start(); (new Thread(() => { TcpHelper.join(ipString, name, portString, pswString, versionString); })).Start();
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment