Beispiel #1
0
        private void 添加ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            QuestionInfoForm qif = new QuestionInfoForm();

            qif.StartPosition = FormStartPosition.CenterScreen;
            qif.father        = this;
            qif.ShowDialog();
        }
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         int          questionid = int.Parse(textBox1.Text);
         DialogResult dr         = MessageBoxEx.Show(this, "确认更改?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
         if (dr.ToString() == "Yes")
         {
             QuestionInfoForm qif = new QuestionInfoForm();
             qif.setQuestionid(questionid);
             qif.father        = this.father;
             qif.StartPosition = FormStartPosition.CenterScreen;
             qif.ShowDialog();
         }
     }
     catch (Exception e1)
     {
         MessageBoxEx.Show(this, "请输入正确编号");
     }
 }