Ejemplo n.º 1
0
 /// <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();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the one DemoApplicationContext.
 /// </summary>
 public static ScheduleBuilderApplicationContext getAppContext()
 {
     if (appContext == null)
     {
         appContext = new ScheduleBuilderApplicationContext();
     }
     return(appContext);
 }
Ejemplo n.º 3
0
        /// <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();
        }
Ejemplo n.º 4
0
        /// <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();
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        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();
            }
        }
Ejemplo n.º 7
0
 /// <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();
 }
Ejemplo n.º 8
0
 /// <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();
 }
Ejemplo n.º 9
0
 /// <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();
 }
Ejemplo n.º 10
0
 /// <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();
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Returns to the login screen view.
 /// </summary>
 private void logout_Click(object sender, EventArgs e)
 {
     ScheduleBuilderApplicationContext.getAppContext().RunForm(new LoginScreen());
     this.Close();
 }
Ejemplo n.º 12
0
 /// <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());
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Opens the ManageCourses view. Does not close homeScreen.
 /// </summary>
 private void manageCourses_Click(object sender, EventArgs e)
 {
     ScheduleBuilderApplicationContext.getAppContext().RunForm(new ManageCourses());
 }
Ejemplo n.º 14
0
 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();
 }