private void Init() { persisted = PersistedData.ReadXML("info.xml"); if (!import.Exists) { import.Create(); } ScanImported(); }
public static void WriteXML(string path, PersistedData data) { if (data.Dirty) { data.Dirty = false; var writer = new XmlSerializer(typeof(PersistedData)); var file = File.Create(path); writer.Serialize(file, data); file.Close(); } }
public void SavePersistedData() { PersistedData.WriteXML("info.xml", persisted); }