private void registBtn_Click(object sender, RoutedEventArgs e) { if (userName.Text == "" || userPasswd.Text == "" || userNickName.Text == "") { MessageBox.Show("用户名、密码、昵称不可为空!", "message", MessageBoxButton.OK); } else { AccessHelper.RegistUser(userName.Text, userPasswd.Text, userNickName.Text, userPhone.Text, userQQ.Text, userEmail.Text, userAddress.Text); this.Close(); } }