Esempio n. 1
0
        private void AskExecute(object obj)
        {
            var c = new AskAndAnswer(SelectedCategory.ID);

            c.Closed += (s, e) =>
            {
                if (c.DialogResult == true)
                {
                    Refresh();
                }
            };
            c.Show();
        }
Esempio n. 2
0
        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();
        }