Esempio n. 1
0
 /// <summary>
 /// Fills listviews and comboboxes with relative data
 /// </summary>
 public void populateData()
 {
     lstvCourse.ItemsSource      = Courses.getCourseList();
     lstvSubjectList.ItemsSource = null;
     cbxSCourse.ItemsSource      = Courses.getCourseCodes(StudentType.REGULAR);
     cbxMCourse.ItemsSource      = cbxSCourse.ItemsSource;
 }
Esempio n. 2
0
        private void cbxEType_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (cbxEType.SelectedIndex != -1)
            {
                if (cbxEType.SelectedIndex == 0)
                {
                    cbxECourse.ItemsSource = Courses.getCourseCodes(StudentType.REGULAR);
                }
                else if (cbxEType.SelectedIndex == 1)
                {
                    cbxECourse.ItemsSource = Courses.getCourseCodes(StudentType.ABSENT);
                }
                else
                {
                    cbxECourse.ItemsSource = Courses.getCourseCodes(StudentType.FAILURE);
                }

                //clear other combobox selection
                cbxECourse.Text       = "-- SELECT COURSE --";
                cbxESem.ItemsSource   = null;
                cbxESem.Text          = "-- SEMESTER --";
                cbxEYear.ItemsSource  = null;
                cbxEYear.Text         = "-- YEAR --";
                cbxEMonth.ItemsSource = null;
                cbxEMonth.Text        = "-- MONTH --";
            }
        }
        public generator_window()
        {
            InitializeComponent();
            Windows.setWindowChrome(this);
            Windows.generatorWindow = this;

            //Set default directory to desktop
            lblOutputFolder.Content = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            cbxCourse.ItemsSource   = Courses.getCourseCodes(StudentType.REGULAR);
        }