Exemple #1
0
 public static MiscTextGod Read(BinaryReader br)
 {
     MiscTextGod.iLoadedIteration = br.ReadInt32();
     MiscTextGod ret = new MiscTextGod();
     if (MiscTextGod.iLoadedIteration >= 2)
     {
         ret.sVersion = br.ReadString();
     }
     ret.sLanguage = br.ReadString();
     int iCount = br.ReadInt32();
     for (int i = 0; i < iCount; i++)
     {
         string sKey = br.ReadString();
         ret.dsxTextCollections[sKey] = MiscTextCollection.Read(br);
     }
     return ret;
 }
Exemple #2
0
 public static MiscTextGod ReadFile(string sPath)
 {
     MiscTextGod ret;
     try
     {
         using (FileStream readStream = new FileStream(sPath, FileMode.Open, FileAccess.Read))
         {
             using (BinaryReader br = new BinaryReader(readStream))
             {
                 br.ReadInt32();
                 ret = MiscTextGod.Read(br);
                 br.Close();
             }
         }
     }
     catch
     {
         ret = new MiscTextGod();
     }
     return ret;
 }