示例#1
0
        private void assignmentsBx_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            int index = this.assignmentsBx.IndexFromPoint(e.Location);

            if (index != System.Windows.Forms.ListBox.NoMatches)
            {
                string name = assignmentsBx.SelectedItem.ToString();
                Quiz   quiz = Program.Database.getAssignmentFromName(name, currentClass.rowId);
                if (currentUser.Role == UserTypes.Teacher)
                {
                    AssignmentForm form = AssignmentForm.editAssignmentForm(quiz);
                    form.Show();
                }
                else
                {
                    AssignmentForm form = AssignmentForm.studentAssignmentForm(quiz, currentUser.rowId);
                    form.Show();
                }
            }
        }
示例#2
0
        private void addAssignmentBtn_Click(object sender, EventArgs e)
        {
            AssignmentForm form = AssignmentForm.uploadAssignmentForm(currentClass.rowId);

            form.Show();
        }