public override void gereClient(TcpClient comm)
 {
     client = new ChatAplication.user(comm);
     Thread threadReceive = new Thread(this.getMessage);
     threadReceive.Start(client);
     //Authentificate.Authentificate.Authentification.loginUser.Add(client);
 }
 public bool addUser(String login, String password)
 {
     ChatAplication.user _user = new ChatAplication.user(login, password);
     ChatAplication.user curU = loginUser.Find(delegate(ChatAplication.user user)
     {
         return user.loginName.Equals(login);
     });
     if (curU == null)
     {
         loginUser.Add(_user);
         return true;
     }
     else return false;
 }
            public bool addUser(String login, String password)
            {
                ChatAplication.user _user = new ChatAplication.user(login, password);
<<<<<<< HEAD
                
                //if the userName has already registed,return false
                
                if (!um.find(login))
                {
                    um.insertIntoDatabase(login,password);
=======
                ChatAplication.user curU = loginUser.Find(delegate(ChatAplication.user user)//if the userName has already registed,return false
                {
                    return user.loginName.Equals(login);
                });
                if (curU == null)
                {
                    loginUser.Add(_user);
>>>>>>> e3a5133b9bac634b9919edc1ccf1a605f8ea649a
                    return true;
                }
                else return false;

            }

            public void removeUser(String login)
            {
<<<<<<< HEAD
                um.deleteFromDatabase(login);
=======
                int curN = loginUser.FindIndex(delegate(ChatAplication.user user)
                    {

                        return user.loginName.Equals(login);
                    });

                if (curN >= 0) loginUser.RemoveAt(curN);
>>>>>>> e3a5133b9bac634b9919edc1ccf1a605f8ea649a

            }