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>()); }
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; } }
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>()); }
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>()); }
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()); }