private void ProcessTranportObject(MyTransportObject obj)
 {
     if (obj.Obj is ChatContent)
     {
         SendMyObject(obj.Obj as ChatContent);
     }
     Logger.Write(obj.Obj.ToString());
 }
        private bool CheckLogin()
        {
            MyTransportObject dataReceive = clientDataTrans.ReceiveData();
            UserAccount       tempUser    = dataReceive.Obj as UserAccount;

            if (tempUser.CheckExisted())
            {
                this.User = tempUser;
                SendUser(tempUser);
                return(true);
            }
            SendUser(tempUser);
            return(false);
        }
Example #3
0
        public bool Login()
        {
            dataTrans.SendData(new MyTransportObject(this.User));
            MyTransportObject receiveData = dataTrans.ReceiveData();
            UserAccount       receiveUser = receiveData.Obj as UserAccount;

            if (receiveUser.UserName == "")
            {
                return(false);
            }
            this.User = receiveUser;
            threadListen.Start();
            return(true);
        }
Example #4
0
        private bool CheckLogin()
        {
            MyTransportObject dataReceive = clientDataTrans.ReceiveData();
            UserAccount       tempUser    = dataReceive.Obj as UserAccount;

            if (tempUser.CheckExisted())
            {
                if (!TheServer.Instance.ListClient.IsOnline(tempUser))
                {
                    this.User = tempUser;
                    SendUser(tempUser);
                    return(true);
                }
            }
            tempUser.Refresh();
            SendUser(tempUser);
            return(false);
        }