private void button3_Click(object sender, EventArgs e) { //Launches the storedquizzes form ViewStoredQuizzes SQ = new ViewStoredQuizzes(); this.Hide(); SQ.Show(); SQ.ClosedPage += (source, EventArgs) => { this.Show(); }; SQ.SelectedQuiz += ViewStatsCall; }
private void ViewStatsCall(ViewStoredQuizzes VS, StoredQuizzes storedQuizzes, List <StoredQuestions> storedQuestions, List <StoredQuizQuestions> storedQuizQuestions) { //Launches the viewstats form ViewStats vs = new ViewStats(student, storedQuizzes, storedQuestions, storedQuizQuestions); vs.Show(); vs.FormClosed += (source, EventArgs) => { this.Show(); }; vs.OpenStoredQuizzes += (source, EventArgs) => { //The user can specify to return to the storedquizzes, if they wish to do that this event is called button3_Click(null, EventArgs.Empty); }; }