private void confirmBtn_Click(object sender, RoutedEventArgs e) { if (userNickName.Text == "" || userPasswd.Text == "") { MessageBox.Show("密码、昵称不可为空!", "message", MessageBoxButton.OK); } else { updateBtn.IsEnabled = true; confirmBtn.IsEnabled = false; cancelBtn.IsEnabled = false; userPasswd.IsEnabled = false; userNickName.IsEnabled = false; userPhone.IsEnabled = false; userQQ.IsEnabled = false; userEmail.IsEnabled = false; userAddress.IsEnabled = false; AccessHelper.UpdateUser(userID, userPasswd.Text, userNickName.Text, userPhone.Text, userQQ.Text, userEmail.Text, userAddress.Text); EventCenter.Broadcast <string>(EventType.UpdateNickname, userNickName.Text); MessageBox.Show("修改完成!", "message", MessageBoxButton.OK); } }