Ejemplo n.º 1
0
        private void registerButton_Click(object sender, EventArgs e)
        {
            switch (authTypeComboBox.SelectedIndex)
            {
            case 0:
                StudentRegisterForm.ShowRegisterDialog();
                break;

            case 1:
                TeacherRegisterForm.ShowRegisterDialog();
                break;

            default:
                MessageBox.Show("请先选择身份",
                                "错误",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
                break;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 显示注册窗口
 /// </summary>
 /// <returns>注册情况</returns>
 public static DialogResult ShowRegisterDialog()
 {
     using (var form = new TeacherRegisterForm())
         return(form.ShowDialog());
 }