private void AskExecute(object obj) { var c = new AskAndAnswer(SelectedCategory.ID); c.Closed += (s, e) => { if (c.DialogResult == true) { Refresh(); } }; c.Show(); }
private void EditExecute(object obj) { if (SelectedQuestion == null) { MessageBox.Show("请选择要编辑的问题"); return; } var c = new AskAndAnswer(SelectedQuestion.DeepCopy()); c.Closed += (s, e) => { if (c.DialogResult == true) { Refresh(); } }; c.Show(); }