110,502
社区成员
发帖
与我相关
我的任务
分享
private void ReceiveMsg()
{bool exitWhile = false;
while (exitWhile == false)
{
string receiveString = null;
try
{
receiveString = sr.ReadLine();
}
catch
{
SetListBox("接收失败");
}
if (receiveString == null)
{
SetListBox("失败");
break;
}
string[] splitString = receiveString.Split('|');
switch (splitString[0])
{
case "LOGINTRUE":
// SetListBox(splitString[1].ToString());
sw.WriteLine("LIST");
sw.Flush();
break;
case "LIST":
List(splitString);
break;
case"MSG":
SetListBox(splitString[1].ToString()+":"+splitString[2].ToString()+splitString[3].ToString());
TMessage.WinHand.Add(splitString[1].ToString(),splitString[3].ToString());
break;
case "FLIST":
Flist(splitString);
break;
}