Beispiel #1
0
 private void saveHerosToFolder(string FolderPath)
 {
     if (!System.IO.Directory.Exists(FolderPath))
     {
         System.IO.Directory.CreateDirectory(FolderPath);
     }
     foreach (Hero h in heroes)
     {
         EasyXML.SerializeXML(h, FolderPath + '/' + h.Name + ".xml");
     }
 }
Beispiel #2
0
 private void saveDMChestsToFolder(string FolderPath)
 {
     if (!System.IO.Directory.Exists(FolderPath))
     {
         System.IO.Directory.CreateDirectory(FolderPath);
     }
     foreach (Inventory inv in lista)
     {
         EasyXML.SerializeXML(inv, FolderPath + '/' + inv.Name + ".xml");
     }
 }
Beispiel #3
0
 private void loadDMChestsFromFolder(string FolderPath)
 {
     string[] names = null;
     try
     {
         names = System.IO.Directory.GetFiles(FolderPath, "*.xml");
     }
     catch { }
     if (names != null)
     {
         foreach (string str in names)
         {
             Inventory h = EasyXML.DeserializeXML <Inventory>(str);
             lista.Add(h);
         }
     }
 }
Beispiel #4
0
 private void loadHeroesFromFolder(string FolderPath)
 {
     string[] names = null;
     try
     {
         names = System.IO.Directory.GetFiles(FolderPath, "*.xml");
     }
     catch { }
     if (names != null)
     {
         foreach (string str in names)
         {
             Hero h = EasyXML.DeserializeXML <Hero>(str);
             heroes.Add(h);
         }
     }
 }