示例#1
0
 public void login()
 {
     //user should be logged in now
     if (GlobalData.currentUser.Role == UserData.Roles.Instructor)
     {
         Screens.InstructorScreen newScreen = new Screens.InstructorScreen();
         newScreen.Dock = DockStyle.Fill;
         this.Controls.Add(newScreen);
         newScreen.BringToFront();
         this.tsmLogout.Visible = true;
     }
     else
     {
         Screens.StudentScreen newScreen = new Screens.StudentScreen();
         newScreen.Dock = DockStyle.Fill;
         this.Controls.Add(newScreen);
         newScreen.BringToFront();
         this.tsmLogout.Visible = true;
     }
 }
示例#2
0
 public void login()
 {
     //user should be logged in now
     if (GlobalData.currentUser.Role == UserData.Roles.Instructor)
     {
         Screens.InstructorScreen newScreen = new Screens.InstructorScreen();
         newScreen.Dock = DockStyle.Fill;
         this.Controls.Add(newScreen);
         newScreen.BringToFront();
         this.tsmLogout.Visible = true;
     }
     else
     {
         Screens.StudentScreen newScreen = new Screens.StudentScreen();
         newScreen.Dock = DockStyle.Fill;
         this.Controls.Add(newScreen);
         newScreen.BringToFront();
         this.tsmLogout.Visible = true;
     }
 }