示例#1
0
    static public void Deserialize(ref uVK.UserDatas datas)
    {
        IFormatter formatter = new BinaryFormatter();

        using (Stream stream = new FileStream(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\uVK\\UserDatas\\data.bin", FileMode.Open))
        {
            datas = (uVK.UserDatas)formatter.Deserialize(stream);
        }
    }
示例#2
0
    public static void Serialize(uVK.UserDatas datas)
    {
        IFormatter formatter = new BinaryFormatter();

        Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\uVK\\UserDatas\\");
        using (Stream stream = new FileStream(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\uVK\\UserDatas\\data.bin", FileMode.Create))
        {
            formatter.Serialize(stream, datas);
        }
    }
示例#3
0
 public VkDatas()
 {
     datas = new uVK.UserDatas();
     Cache = new SaveAudios();
 }