Exemplo n.º 1
0
        public string login(string id, string password)
        {
            try
            {
                client = new TcpClient(serverIP, port);
            }
            catch
            {
                return("link_fail");
            }
            Quit        = false;
            listen_port = getPort();
            sendToServer(string.Format("login,{0},{1},{2},{3}", localIP, listen_port.ToString(), id, password));
            string content = new BinaryReader(client.GetStream()).ReadString();

            //登录成功
            if (content.StartsWith("login_success"))
            {
                lwc = new Class_LinkWithClient(new User(content.Split(',')));
                lwc.start();
            }
            return(content);
        }
Exemplo n.º 2
0
 public Control_FriendList(Class_LinkWithClient lwc)
 {
     InitializeComponent();
     this.lwc = lwc;
 }
Exemplo n.º 3
0
 public Control_Reminder(Class_LinkWithClient lwc)
 {
     InitializeComponent();
     this.lwc = lwc;
     User test = new User();
 }