예제 #1
0
 public Resources GetResources(string filePath)
 {
     Resources resources = new Resources();
     if (File.Exists(filePath))
     {
         resources = ResourcesSerializer.DeSerialize(filePath);
         resources.createIndex();
     }
     return resources;
 }
예제 #2
0
 public void Serialize(Resources resources, string filePath)
 {
     ResourcesSerializer.Serialize(filePath, resources);
 }
예제 #3
0
 public static void Serialize(string filePath, Resources resources)
 {
     System.Xml.Serialization.XmlSerializer xmlSerializer = new System.Xml.Serialization.XmlSerializer(typeof(Resources));
     System.IO.FileStream fileStream = new System.IO.FileStream(filePath, System.IO.FileMode.Create);
     xmlSerializer.Serialize(fileStream, resources);
     fileStream.Close();
 }