private void _deleteUserButton_Click(object sender, EventArgs e) { var userName = _userNameListBox.SelectedItem.ToString(); try { _faceService.DeleteUserByName(userName); MessageBox.Show(userName + ",刪除成功", ""); } catch (Exception ex) { MessageBox.Show(ex.Message, ""); throw; } RefreshControl(); }