private void Btsignup_Click(object sender, RoutedEventArgs e) { Socketkit s = new Socketkit(); string number = s.TcpSignup(tb_number.Text, tb_password.Text); MessageBox.Show(string.Format("注册成功!您的号码为:{0}", number), "注册成功!"); this.Hide(); this.login.Show(); }
private void Btlogin_Click(object sender, RoutedEventArgs e) { Socketkit sk = new Socketkit(); string msg = sk.TcpLogin(tb_number.Text, tb_password.Password); MessageBox.Show(msg); if (msg.Equals("LOGIN?OK")) { //登录成功 } else { return; } }