void TasClient_UserRemoved(object sender, UserDisconnected e)
 {
     var userName = e.Name;
     var pmControl = GetPrivateMessageControl(userName);
     if (pmControl != null) toolTabs.SetIcon(userName, ZklResources.grayuser, true);
 }
 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)));
 }
 /// <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();
     }
 }
Example #4
0
 private async Task Process(UserDisconnected arg)
 {
     ExistingUsers.Remove(arg.Name);
     UserRemoved(this, arg);
 }
 void TasClient_UserRemoved(object sender, UserDisconnected e)
 {
   var userName = e.Name;
   if (userName != UserName) return;
   AddLine(new LeaveLine(userName));
 }
Example #6
0
 async Task Process(UserDisconnected arg)
 {
     existingUsers.Remove(arg.Name);
     UserRemoved(this, new EventArgs <UserDisconnected>(arg));
 }