예제 #1
0
 //注册界面初始化
 private void regist_Load(object sender, EventArgs e)
 {
     MaximizeBox = false;              //关闭注册窗口的最大化功能
     RegistIdentity.SelectedIndex = 3; //设置下拉菜单的默认选项
     //将所有提示信息的lable置空
     label8.Text     = "*必填";
     label9.Text     = "*必填";
     label11.Text    = "*必填";
     label12.Text    = "";
     label14.Text    = "*必填";
     button1.Enabled = false;                                     //用户未输入注册信息时,默认注册按钮不可点击
     Identification.identification(RegistIdentity.SelectedIndex); //根据用户选择的值判断用户身份
     if (Globel.id_tag.Equals("s"))
     {
         label2.Text = "学生注册";
         this.Text   = "学生注册";
     }
     else if (Globel.id_tag.Equals("t"))
     {
         label2.Text = "教师注册";
         this.Text   = "教师注册";
     }
     else if (Globel.id_tag.Equals("ts"))
     {
         label2.Text = "教学秘书注册";
         this.Text   = "教学秘书注册";
     }
     label2.Text            = "选择身份";
     this.Text              = "注册";
     Verification_Code.Text = Verification.Code(); //加载验证码
     panel1.Visible         = false;               //未选择注册身份之前默认不显示所有输入框
 }
예제 #2
0
 //选择用户身份改变时触发的事件
 private void RegistIdentity_SelectedIndexChanged(object sender, EventArgs e)
 {
     Identification.identification(RegistIdentity.SelectedIndex);//根据用户选择的值判断用户身份
     if (Globel.id_tag.Equals("s"))
     {
         label2.Text = "学生注册";
         this.Text   = "学生注册";
         label6.Text = "学号:";
     }
     else if (Globel.id_tag.Equals("t"))
     {
         label2.Text = "教师注册";
         this.Text   = "教师注册";
         label6.Text = "教师编号:";
     }
     else if (Globel.id_tag.Equals("ts"))
     {
         label2.Text = "教学秘书注册";
         this.Text   = "教学秘书注册";
         label6.Text = "教秘编号:";
     }
     Verification_Code.Text = Verification.Code(); //刷新验证码
     panel1.Visible         = true;                //显示用户输入面板
     if (RegistIdentity.SelectedIndex == 3)
     {
         label2.Text    = "选择身份";
         this.Text      = "注册";
         panel1.Visible = false;
     }
 }
예제 #3
0
 //登录窗口初始化
 private void Login_Load(object sender, EventArgs e)
 {
     label6.Text            = "";
     identity.SelectedIndex = 0;                   //登录系统的身份默认是学生
     MaximizeBox            = false;               //关闭登录窗口的最大化功能
     Verification_Code.Text = Verification.Code(); //动态生成验证码
     DoLogin.Enabled        = false;               //默认在不输入验证码时无法点击登录按钮
     Globel.username        = Tusername.Text;
 }