示例#1
0
        public static BodySelfTest2 createForm()
        {
            if (instance == null || instance.IsDisposed)
            {
                instance = new BodySelfTest2();
            }

            return instance;
        }
示例#2
0
 private void button1_Click(object sender, EventArgs e)
 {
     object categoryValue = topicCategory.SelectedValue;
     if ((string)categoryValue == "")
     {
         MessageBox.Show("请选择种类!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
     else if (txtExamName.Text == "")
     {
         MessageBox.Show("自我测试标题不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
     else
     {
         mainFrame.panel6.Controls.Clear();
         BodySelfTest2 self2 = new BodySelfTest2();
         self2.TopLevel = false;
         self2.self = this;
         self2.FormBorderStyle = FormBorderStyle.None;
         self2.Dock = System.Windows.Forms.DockStyle.Fill;
         mainFrame.panel6.Controls.Add(self2);
         self2.Show();
     }
 }