示例#1
0
        public static void CreateBase(EntityStorage eStorage)
        {
            currentBase = new Base();
            currentBase.EStorage = eStorage;
            currentBase.Factors = new List<FactorSettings>();
            currentBase.Settings = new Dictionary<string, object>();

            currentBase.Settings.Add(FACULTIES, new List<Faculty>());
        }
示例#2
0
 public static void LoadBase(string filePath)
 {
     currentFilePath = filePath;
     BinaryFormatter formatter = new BinaryFormatter();
     try
     {
         using (FileStream fs = new FileStream(currentFilePath, FileMode.Open))
         {
             currentBase = (Base)formatter.Deserialize(fs);
         }
     }
     catch
     {
         throw;
     }
 }
示例#3
0
        public static void CreateBase(EntityStorage eStorage)
        {
            currentBase = new Base();
            currentBase.EStorage = eStorage;
            currentBase.Factors = FactorsLoader.GetFactorSettings().ToList();
            currentBase.Settings = new Dictionary<string, object>();
            currentBase.Schedules = new Dictionary<string, Schedule>();

            currentBase.Settings.Add(FACULTIES, new List<Faculty>());
        }
示例#4
0
        public static void CreateBase()
        {
            currentBase = new Base();
            currentBase.EStorage = new EntityStorage(new Domain.Model.StudentsClass[]{ } , new Domain.Model.ClassRoomType[] { }, new Domain.Model.StudentSubGroup[] { }, new Domain.Model.Teacher[] { }, new Domain.Model.ClassRoom[] { });
            currentBase.Factors = FactorsLoader.GetFactorSettings().ToList();
            currentBase.Settings = new Dictionary<string, object>();
            currentBase.Schedules = new Dictionary<string, Schedule>();

            currentBase.Settings.Add(FACULTIES, new List<Faculty>());
        }
示例#5
0
 public static void OpenBase(Base openedBase)
 {
     foreach (var item in FactorsLoader.GetLostFactorSettings(openedBase.Factors))
     {
         openedBase.Factors.Remove(item);
     }
     currentBase = openedBase;
     currentBase.Factors.AddRange(FactorsLoader.GetNewFactorSettings());
 }