示例#1
0
 public static void getSaveFileRead(string file)
 {
     byte[] bytes = File.ReadAllBytes(file);
     bytes = Compression.gZipDecompress(bytes);
     bytes = Cryptations.RC4(bytes, Encoding.Default.GetBytes("Emrah.?Kaynar.?20657580"));
     Items.ItemList itemList = ((Items.ItemList)(new XmlSerializer()).DeSerializeWithCreateInstance(bytes));
     saveList.Add(itemList);
 }
示例#2
0
 public static void SaveAllSaveFiles()
 {
     foreach (Items.ItemList item in saveList.ToArray())
     {
         string str   = item.EnSerialize();
         byte[] bytes = Encoding.Default.GetBytes(str);
         bytes = Cryptations.RC4(bytes, Encoding.Default.GetBytes("Emrah.?Kaynar.?20657580"));
         bytes = Compression.gZipCompress(bytes);
         FileStream fstream = new FileStream(savePath + item.GroupName + ".save", FileMode.Create);
         fstream.Write(bytes, 0, bytes.Length);
         fstream.Close();
         fstream = null;
     }
 }