Ejemplo n.º 1
0
        internal virtual void Login(string _userName, string _password, ServerUnit _serverUnit)
        {
            if (serverUnit != null)
            {
                Kick();

                serverUnit.Kick();

                serverUnit = null;
            }

            if (isWaittingForResponse)
            {
                replaceServerUnitCallBack = delegate()
                {
                    serverUnit = _serverUnit;

                    _serverUnit.GetLoginResult(this);
                };
            }
            else
            {
                serverUnit = _serverUnit;

                _serverUnit.GetLoginResult(this);
            }
        }
Ejemplo n.º 2
0
        internal void GetLoginResult(UserData _userData, ServerUnit _serverUnit)
        {
            if (_userData != null)
            {
                SuperUserServiceBase userService = Server.getUserService();

                userService.SetUserData(_userData);

                userService.SetServerUnit(_serverUnit);

                dic.Add(_userData.userName, userService);

                _serverUnit.GetLoginResult(userService);
            }
            else
            {
                _serverUnit.GetLoginResult(null);
            }
        }
Ejemplo n.º 3
0
        internal override void Login(string _userName, string _password, ServerUnit _serverUnit)
        {
            bool result = userData.passward.Equals(_password);

            if (!result)
            {
                _serverUnit.GetLoginResult(null);
            }
            else
            {
                base.Login(_userName, _password, _serverUnit);
            }
        }