Example #1
0
 public static void SaveSettings(FacultiesAndGroups sett)
 {
     BinaryFormatter formatter = new BinaryFormatter();
     using (FileStream fs = new FileStream("Settings.dat", FileMode.Create))
     {
         formatter.Serialize(fs, sett);
     }
 }
        void CreateLocalCopy()
        {

            Storage = CurrentBase.EStorage;
            List<Faculty> localCopyOfFacultyList = new List<Faculty>();
            foreach (var item in CurrentBase.Faculties)
            {
                localCopyOfFacultyList.Add(item);
            }
            FacultiesAndGroups = new FacultiesAndGroups(localCopyOfFacultyList);
            groupsWithoutFaculty = new List<StudentSubGroup>();

        }
 private void FillFacultyAndCoursCombobox()
 {
     if (CurrentBase.BaseIsLoaded() && !CurrentSchedule.ScheduleIsFromFile())
     {
         facultiesAndGroups = new FacultiesAndGroups();
         foreach (Faculty faculty in facultiesAndGroups.Faculties)
         {
             facultComboBox.Items.Add(faculty.Name);
         }
         facultComboBox.SelectedIndex = -1;
         for (int i = 1; i <= 5; i++)
         {
             coursComboBox.Items.Add(i);
         }
         coursComboBox.SelectedIndex = -1;
         LoadFacultyAndGroups();
     }
     else { facultComboBox.IsEnabled = false; coursComboBox.IsEnabled = false; }
 }