コード例 #1
0
 private void LoginButton_Click(object sender, EventArgs e)
 {
     if (db.IsValidLogin(UserText.Text, PasswordText.Text))
     {
         this.Hide();
         Form formToShow;
         if (db.CheckRights(UserText.Text))
         {
             formToShow = new TeacherForm();
         }
         else
         {
             formToShow = new StudentSelectForm(db.getuserid(UserText.Text));
         }
         formToShow.ShowDialog();
         formToShow.Dispose();
         PasswordText.Text = "";
         this.Show();
     }
     else
     {
         PasswordText.Text = "";
         string            message = "Wrong Passwort/User!";
         string            caption = "Vocabulator Login Error";
         MessageBoxButtons buttons = MessageBoxButtons.OK;
         DialogResult      result  = MessageBox.Show(message, caption, buttons);
     }
 }
コード例 #2
0
ファイル: StudentForm.cs プロジェクト: m1Gd70bH/vocabulator
        private void BackBtn_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form form = new StudentSelectForm(userId);

            form.ShowDialog();
        }
コード例 #3
0
ファイル: StudentForm.cs プロジェクト: m1Gd70bH/vocabulator
        private void StudentForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Hide();
            Form form = new StudentSelectForm(userId);

            form.ShowDialog();
        }
コード例 #4
0
        private void ReportStudentForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Hide();
            Form formToShow = new StudentSelectForm(userid);

            formToShow.ShowDialog();
        }