一个没有测试就提交的BUG

This commit is contained in:
Mili 2023-04-01 21:13:28 +08:00
parent cb6cd2e60f
commit a07d3a69df

View File

@ -2,15 +2,15 @@
{ {
public class ConnectEventArgs : GeneralEventArgs public class ConnectEventArgs : GeneralEventArgs
{ {
public string ServerIP { get; set; } = ""; public string ServerIP { get; set; } = "127.0.0.1";
public string ServerPort { get; set; } = ""; public int ServerPort { get; set; } = 22222;
public ConnectEventArgs(params object[]? objs) public ConnectEventArgs(params object[]? objs)
{ {
if (objs != null) if (objs != null)
{ {
if (objs.Length > 0) ServerIP = (string)objs[0]; if (objs.Length > 0) ServerIP = (string)objs[0];
if (objs.Length > 1) ServerPort = (string)objs[1]; if (objs.Length > 1) ServerPort = (int)objs[1];
} }
} }
} }