/// <summary> /// Adds this student to the University and opens the students homeScreen. Closes this form. /// </summary> private void submit_Click(object sender, EventArgs e) { //go to home screen for this student. //TODO: add student to the university. ScheduleBuilderApplicationContext.getAppContext().RunForm(new HomeScreen()); this.Close(); }
/// <summary> /// Returns the one DemoApplicationContext. /// </summary> public static ScheduleBuilderApplicationContext getAppContext() { if (appContext == null) { appContext = new ScheduleBuilderApplicationContext(); } return(appContext); }
/// <summary> /// Loads the students information from the University database. Opens the students Homescreen. /// Closes this form. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Login_Click(object sender, EventArgs e) { //Open the homeScreen ScheduleBuilderApplicationContext.getAppContext().RunForm(new HomeScreen()); //TODO: load information into that page. this.Close(); }
/// <summary> /// Opens the NewStudent view. Closes this form. /// </summary> private void newStudent_Click(object sender, EventArgs e) { //Open the newStudent view NewStudent ns = new NewStudent(id.Text, firstName.Text); ScheduleBuilderApplicationContext.getAppContext().RunForm(new NewStudent()); this.Close(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Start an application context and run one form inside it ScheduleBuilderApplicationContext appContext = ScheduleBuilderApplicationContext.getAppContext(); appContext.RunForm(new LoginScreen()); Application.Run(appContext); }
private void DoesNotExistDialog() { DialogResult dialogResult = MessageBox.Show("This course does not exist in the University Database. Would you like to add it?", "Does not exist", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { //do something AddToUniversity course = new AddToUniversity(this.CourseAbbr.Text, this.CourseValue.Text); ScheduleBuilderApplicationContext.getAppContext().RunForm(course); //TODO: after this is complete, submit this form. this.Close(); } else if (dialogResult == DialogResult.No) { //close the message box. Close(); } }
/// <summary> /// Closes the window and adds the course to the stuents course list. /// Returns to the ManageCourses view. /// </summary> private void Done_Click(object sender, EventArgs e) { AddCourseToStudent(CourseAbbr.Text, CourseValue.Text, taken.Checked); ScheduleBuilderApplicationContext.getAppContext().RunForm(new ManageCourses()); this.Close(); }
/// <summary> /// Closes the form and returns to the AddCourse Screen. /// </summary> private void Cancel_Click(object sender, EventArgs e) { ScheduleBuilderApplicationContext.getAppContext().RunForm(new AddCourse()); this.Close(); }
/// <summary> /// Saves the classes information into some data structure. /// Goes back to the AddCourse Screen. /// </summary> private void AddClass_Click(object sender, EventArgs e) { //TODO: Add the course to the university ScheduleBuilderApplicationContext.getAppContext().RunForm(new AddCourse()); this.Close(); }
/// <summary> /// Generates a plan view. This button was why I started the project. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void viewMyPlan_Click(object sender, EventArgs e) { ScheduleBuilderApplicationContext.getAppContext().RunForm(new PlanView()); this.Close(); }
/// <summary> /// Returns to the login screen view. /// </summary> private void logout_Click(object sender, EventArgs e) { ScheduleBuilderApplicationContext.getAppContext().RunForm(new LoginScreen()); this.Close(); }
/// <summary> /// Opens the EditMajors view. Does not Close homescreen. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void editMajors_Click(object sender, EventArgs e) { ScheduleBuilderApplicationContext.getAppContext().RunForm(new EditMajors()); }
/// <summary> /// Opens the ManageCourses view. Does not close homeScreen. /// </summary> private void manageCourses_Click(object sender, EventArgs e) { ScheduleBuilderApplicationContext.getAppContext().RunForm(new ManageCourses()); }
private void AddPrereq_Click(object sender, EventArgs e) { //Open the Two Prereqs form saving the text information that existed in the current fields. ScheduleBuilderApplicationContext.getAppContext().RunForm(new TwoPrereqs(CourseAbbreviation.Text, CourseValue.Text, CrHours.Text, Fall.Checked, Spring.Checked, Summer.Checked, PrereqCourseAbbreviation.Text, PrereqCourseValue.Text)); this.Close(); }