示例#1
0
        //sign up
        private void SignUpClick(object sender, RoutedEventArgs e)
        {
            SignUpWindow signUpWindow = new SignUpWindow();

            signUpWindow.Show();
            this.Close();
        }
示例#2
0
        private void btnSignUp_Click(object sender, EventArgs e)
        {
            SignUpWindow newWindow = new SignUpWindow(this);

            newWindow.StartPosition = FormStartPosition.Manual;
            newWindow.Location      = new Point(this.Location.X, this.Location.Y);
            newWindow.Show();
            this.Hide();
        }
        private void signUpL_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            SignUpWindow signUpWindow = new SignUpWindow();

            signUpWindow.Owner = this;
            if (signUpWindow.ShowDialog() == true)
            {
                if (!connector.connect())
                {
                    MessageBox.Show(this, "注册失败,无法连接服务器!");
                    return;
                }
                connector.SignUp(signUpWindow.NickName, signUpWindow.Password);
            }
        }