private void ModifyTeamMnBtn_Click(object sender, EventArgs e) { YouAreHere(ModifyTeamMnBtn); SelectedCourseLabel.Hide(); CoursesList.Hide(); SelectCourseBtn.Hide(); ProjectGroupBox.Hide(); ProjectList.Hide(); GradeList.Hide(); GradeGroupBox.Hide(); TeamList.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top); TeamGroupBox.Show(); TeamList.Show(); TeamGroupBox.Location = new Point(550, 12); TeamList.Location = new Point(150, 12); RefreshList(); ClearAllBoxes(); EnableViewLists(); ChangeBtnNames(); }
public ProfessorForm() { InitializeComponent(); //Project List:A list that displays the professor's projects ProjectList.Bounds = new Rectangle(new Point(150, 12), new Size(250, 500)); ProjectList.View = View.Details; ProjectList.FullRowSelect = true; ProjectList.GridLines = true; ProjectList.Sorting = SortOrder.Ascending; ProjectList.Columns.Add("Project Name", -2, HorizontalAlignment.Left); ProjectList.Columns.Add("Max Grade", -2, HorizontalAlignment.Left); //========================================================================== //Students List: A list that displays each teams infos StudentsList.Bounds = new Rectangle(new Point(150, 12), new Size(375, 500)); StudentsList.View = View.Details; StudentsList.FullRowSelect = true; StudentsList.GridLines = true; StudentsList.Sorting = SortOrder.Ascending; StudentsList.Columns.Add("Team", -2, HorizontalAlignment.Left); StudentsList.Columns.Add("Registration Number", -2, HorizontalAlignment.Left); StudentsList.Columns.Add("Email", -2, HorizontalAlignment.Left); //============================================================================= //Grade List: A list that displays the team with its project an the grade GradeList.Bounds = new Rectangle(new Point(150, 12), new Size(275, 500)); GradeList.View = View.Details; GradeList.FullRowSelect = true; GradeList.GridLines = true; GradeList.Sorting = SortOrder.Ascending; GradeList.Columns.Add("Team", -2, HorizontalAlignment.Left); GradeList.Columns.Add("Project", -2, HorizontalAlignment.Left); GradeList.Columns.Add("Grade", -2, HorizontalAlignment.Left); //============================================================================== TeamGroupBox.Text = ""; ProjectGroupBox.Text = ""; GradeGroupBox.Text = ""; TeamGroupBox.Bounds = new Rectangle(new Point(550, 12), new Size(320, 320)); TeamGroupBox.Show(); StudentsList.Show(); GradeList.Hide(); GradeGroupBox.Hide(); AssignToWhomLabel.Hide(); AssignProjectBtn.Hide(); ProjectGroupBox.Hide(); ProjectList.Hide(); }
private void ModifyProjectMnBtn_Click(object sender, EventArgs e) { StudentsList.Hide(); TeamGroupBox.Hide(); AssignToWhomLabel.Hide(); AssignProjectBtn.Hide(); GradeList.Hide(); GradeGroupBox.Hide(); ProjectList.Show(); ProjectGroupBox.Show(); ProjectGroupBox.Location = new Point(450, 12); }
private void ChooseCourseMnBtn_Click(object sender, EventArgs e) { YouAreHere(ChooseCourseMnBtn); ProjectGroupBox.Hide(); ProjectList.Hide(); GradeList.Hide(); GradeGroupBox.Hide(); TeamGroupBox.Hide(); TeamList.Hide(); SelectedCourseLabel.Show(); CoursesList.Show(); SelectCourseBtn.Show(); }
private void ModifyTeamMnBtn_Click(object sender, EventArgs e) { ProjectGroupBox.Hide(); ProjectList.Hide(); GradeList.Hide(); AssignToWhomLabel.Hide(); AssignProjectBtn.Hide(); GradeGroupBox.Hide(); StudentsList.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top); TeamGroupBox.Show(); StudentsList.Show(); TeamGroupBox.Location = new Point(550, 12); StudentsList.Location = new Point(150, 12); }
private void AssignProjectMnBtn_Click(object sender, EventArgs e) { ProjectGroupBox.Hide(); TeamGroupBox.Hide(); GradeList.Hide(); GradeGroupBox.Hide(); StudentsList.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Top); AssignToWhomLabel.Show(); AssignProjectBtn.Show(); ProjectList.Show(); StudentsList.Show(); StudentsList.Location = new Point(635, 12); AssignProjectBtn.Location = new Point(467, 100); AssignToWhomLabel.Location = new Point(407, 50); }
public FormProfessor(string reg_num, FormLogin login) { InitializeComponent(); this.login = login; ChooseCourseMnBtn.BackColor = Color.FromArgb(100, 10, 10, 10); ModifyProjectMnBtn.BackColor = Color.FromArgb(100, 10, 10, 10); ModifyTeamMnBtn.BackColor = Color.FromArgb(100, 10, 10, 10); GradeProjectsMnBtn.BackColor = Color.FromArgb(100, 10, 10, 10); label1.BackColor = Color.FromArgb(100, 10, 10, 10); LogoutBtn.BackColor = Color.FromArgb(100, 10, 10, 10); TeamGroupBox.Paint += Paint; ProjectGroupBox.Paint += Paint; GradeGroupBox.Paint += Paint; currentUser = Database.GetUser(UserTypes.PROFESSOR, reg_num); user = (Professor)currentUser; //Courses List: A list that displays professor's courses CoursesList.Bounds = new Rectangle(new Point(450, 50), new Size(275, 400)); CoursesList.View = View.Details; CoursesList.FullRowSelect = true; CoursesList.GridLines = true; CoursesList.Sorting = SortOrder.Ascending; CoursesList.Columns.Add("Cource name", -2, HorizontalAlignment.Center); CoursesList.Columns.Add("ID", -2, HorizontalAlignment.Center); foreach (Course course in user.getCourseList()) { var listViewItem = new ListViewItem(course.getCourseName()); listViewItem.SubItems.Add(course.getCourseID()); CoursesList.Items.Add(listViewItem); } SelectedCourseLabel.Location = new Point(475, 20); SelectCourseBtn.Location = new Point(551, 458); //============================================================================== //Project List:A list that displays the professor's projects ProjectList.Bounds = new Rectangle(new Point(150, 12), new Size(250, 500)); ProjectList.View = View.Details; ProjectList.FullRowSelect = true; ProjectList.GridLines = true; ProjectList.Sorting = SortOrder.Ascending; ProjectList.Columns.Add("ID", -2, HorizontalAlignment.Left); ProjectList.Columns.Add("Project Name", -2, HorizontalAlignment.Left); ProjectList.Columns.Add("Max Grade", -2, HorizontalAlignment.Left); //========================================================================== //Students List: A list that displays each teams infos TeamList.Bounds = new Rectangle(new Point(150, 12), new Size(375, 500)); TeamList.View = View.Details; TeamList.FullRowSelect = true; TeamList.GridLines = true; TeamList.Sorting = SortOrder.Ascending; TeamList.Columns.Add("Team", -2, HorizontalAlignment.Left); TeamList.Columns.Add("Student 1", -2, HorizontalAlignment.Left); TeamList.Columns.Add("Student 2", -2, HorizontalAlignment.Left); TeamList.Columns.Add("Student 3", -2, HorizontalAlignment.Left); TeamList.Columns.Add("Student 4", -2, HorizontalAlignment.Left); TeamList.Columns.Add("Student 5", -2, HorizontalAlignment.Left); //============================================================================= //Grade List: A list that displays the team with its project an the grade GradeList.Bounds = new Rectangle(new Point(150, 12), new Size(275, 500)); GradeList.View = View.Details; GradeList.FullRowSelect = true; GradeList.GridLines = true; GradeList.Sorting = SortOrder.Ascending; GradeList.Columns.Add("Team", -2, HorizontalAlignment.Left); GradeList.Columns.Add("Project ID", -2, HorizontalAlignment.Left); GradeList.Columns.Add("Project name", -2, HorizontalAlignment.Left); GradeList.Columns.Add("Project Uploaded", -2, HorizontalAlignment.Left); GradeList.Columns.Add("Grade", -2, HorizontalAlignment.Left); //============================================================================== //Teams Right Click menu creation ToolStripMenuItem TeamRightClickMenuEdit = new ToolStripMenuItem("Edit"); ToolStripMenuItem TeamRightClickMenuDelete = new ToolStripMenuItem("Delete"); TeamRightClickMenuDelete.Click += new EventHandler(TeamDelete_RightClick); TeamRightClickMenuEdit.Click += new EventHandler(TeamEdit_RightClick); TeamRightClickMenu.Items.AddRange(new ToolStripItem[] { TeamRightClickMenuEdit, TeamRightClickMenuDelete }); //========================================================================================================== //Projects Right Click menu creation ToolStripMenuItem ProjectRightClickMenuEdit = new ToolStripMenuItem("Edit"); ToolStripMenuItem ProjectRightClickMenuDelete = new ToolStripMenuItem("Delete"); ProjectRightClickMenuDelete.Click += new EventHandler(ProjectDelete_RightClick); ProjectRightClickMenuEdit.Click += new EventHandler(ProjectEdit_RightClick); ProjectRightClickMenu.Items.AddRange(new ToolStripItem[] { ProjectRightClickMenuEdit, ProjectRightClickMenuDelete }); //=================================================================================================================== CourseHolderLabel.BackColor = Color.FromArgb(100, 10, 10, 10); TeamGroupBox.Text = ""; ProjectGroupBox.Text = ""; GradeGroupBox.Text = ""; TeamGroupBox.Bounds = new Rectangle(new Point(550, 12), new Size(380, 355)); CoursesList.Show(); SelectCourseBtn.Show(); ChooseCourseMnBtn.BackColor = Color.Black; TeamGroupBox.Hide(); TeamList.Hide(); GradeList.Hide(); GradeGroupBox.Hide(); ProjectGroupBox.Hide(); ProjectList.Hide(); ModifyProjectMnBtn.Enabled = false; ModifyTeamMnBtn.Enabled = false; GradeProjectsMnBtn.Enabled = false; }