public TmphResources GetResources(string filePath) { TmphResources resources = new TmphResources(); if (File.Exists(filePath)) { resources = ResourcesSerializer.DeSerialize(filePath); resources.createIndex(); } return resources; }
public void Serialize(TmphResources resources, string filePath) { ResourcesSerializer.Serialize(filePath, resources); }
public static void Serialize(string filePath, TmphResources Resources) { System.Xml.Serialization.XmlSerializer XmlSerializer = new System.Xml.Serialization.XmlSerializer(typeof(TmphResources)); System.IO.FileStream FileStream = new System.IO.FileStream(filePath, System.IO.FileMode.Create); XmlSerializer.Serialize(FileStream, Resources); FileStream.Close(); }