public Metadata() { Occ = new OccData(this); LocomotivesData = new LocomotivesData(this); LocomotivesDurationData = new DurationsData(this); FeedbacksData = new FeedbacksData(this); }
public bool LoadOccData(string pathToOccmodel, bool resetToInitState = false) { if (string.IsNullOrEmpty(pathToOccmodel)) { return(false); } if (!File.Exists(pathToOccmodel)) { File.WriteAllText(pathToOccmodel, "[]", Encoding.UTF8); } Occ = new OccData(this); var r = Occ.Load(pathToOccmodel); if (resetToInitState) { foreach (var it in Occ.Blocks) { if (it == null) { continue; } it.FinalBlock = string.Empty; it.RouteToFinal = string.Empty; it.FinalEntered = false; } Save(SaveModelType.OccData); } return(r); }