コード例 #1
0
 void TasClient_UserRemoved(object sender, UserDisconnected e)
 {
     var userName = e.Name;
     var pmControl = GetPrivateMessageControl(userName);
     if (pmControl != null) toolTabs.SetIcon(userName, ZklResources.grayuser, true);
 }
コード例 #2
0
 void TasClient_UserRemoved(object sender, UserDisconnected e) {
     var userName = e.Name;
     if (PlayerListItems.Any(u => u.UserName == userName)) AddLine(new LeaveLine(userName, string.Format("User has disconnected ({0}).", e.Reason)));
 }
コード例 #3
0
 /// <summary>
 ///     Remove/reduce poll count due to lobby quits
 /// </summary>
 void TasOnUserRemoved(object sender, UserDisconnected args)
 {
     if (Challenge == null)
     {
         if (AttackOptions.Count > 0)
         {
             string userName = args.Name;
             int sumRemoved = 0;
             foreach (AttackOption aop in AttackOptions) sumRemoved += aop.Attackers.RemoveAll(x => x == userName);
             if (sumRemoved > 0) UpdateLobby();
         }
     }
     else
     {
         string userName = args.Name;
         if (Challenge.Defenders.RemoveAll(x => x == userName) > 0) UpdateLobby();
     }
 }
コード例 #4
0
 private async Task Process(UserDisconnected arg)
 {
     ExistingUsers.Remove(arg.Name);
     UserRemoved(this, arg);
 }
コード例 #5
0
 void TasClient_UserRemoved(object sender, UserDisconnected e)
 {
   var userName = e.Name;
   if (userName != UserName) return;
   AddLine(new LeaveLine(userName));
 }
コード例 #6
0
 async Task Process(UserDisconnected arg)
 {
     existingUsers.Remove(arg.Name);
     UserRemoved(this, new EventArgs <UserDisconnected>(arg));
 }