Пример #1
0
 private void lstCourses_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             int         key            = (int)lstCourses.SelectedValue;
             frmLessions objfrmLessions = new frmLessions(key.ToString());
             this.Hide();
             objfrmLessions.ShowDialog();
         }
         else if (e.KeyCode == Keys.F1)
         {
             int key = (int)lstCourses.SelectedValue;
             DisplayDiscription(key);
         }
         else if (e.KeyCode == Keys.Back || e.KeyCode == Keys.Escape)
         {
             FrmLogin objFrmLogin = new FrmLogin();
             this.Hide();
             objFrmLogin.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Пример #2
0
 private void FrmTopic_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Back || e.KeyCode == Keys.Escape)
         {
             frmLessions objLession = new frmLessions(CourseID, LessionID);
             this.Hide();
             objLession.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Пример #3
0
 private void lstTopics_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             Topics     objTopics     = (Topics)lstTopics.SelectedItem;
             FrmContent objFrmContent = new FrmContent(objTopics);
             this.Hide();
             objFrmContent.ShowDialog();
         }
         else if (e.KeyCode == Keys.Back || e.KeyCode == Keys.Escape)
         {
             frmLessions objLession = new frmLessions(CourseID, LessionID);
             this.Hide();
             objLession.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }