private static void SaveWorks() { ObjectSerization.Serization(Works, _FilePath); if (WorksChanged != null) { WorksChanged(Works, new EventArgs()); } }
public static void Initialize(TimeSpan Saiso, string FilePath = "Settings/WorksManager.wmg") { Work._SaiSo = Saiso; _FilePath = FilePath; FileInfo file = new FileInfo(_FilePath); if (file.Exists) { Works = ObjectSerization.Deserization(_FilePath) as LinkedList <Work>; Work.AWorkTerminatedByUser += OnAWorkTerminated; Work.AworkDone += OnAWorkDone; WorkExcuter.Initialize(); } else { SaveWorks(); Initialize(Saiso); } }