/// <summary> /// 进入房间 /// </summary> public void Enter(MOBAClient client) { if (!ClientList.Contains(client)) { ClientList.Add(client); } }
/// <summary> /// 离开房间 /// </summary> /// <param name="client"></param> public void Leave(MOBAClient client) { //移除退出的客户端 if (ClientList.Contains(client)) { ClientList.Remove(client); } }
/// <summary> /// 离开房间 /// </summary> public void Leave(MOBAClient client) { if (ClientList.Contains(client)) { ClientList.Remove(client); } if (!LeaveClients.Contains(client)) { LeaveClients.Add(client); } }
/// <summary> /// 离开房间 /// </summary> /// <param name="client"></param> public void Leave(MobaClient client) { if (ClientList.Contains(client)) { ClientList.Remove(client); } if (!LeaveClient.Contains(client)) { LeaveClient.Add(client); } ClearSchedule(); }
private void AddToJudgeListView(HandleClient client) { lock (ClientList) { if (!ClientList.Contains(client)) { ClientList.Add(client); } } contestPresenter?.View?.Invoke(new InvokeContestPresenter( () => { contestPresenter.AddToClientListView(client); } )); }