Ejemplo n.º 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);
        }
    }
Ejemplo n.º 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);
        }
    }
Ejemplo n.º 3
0
 public VkDatas()
 {
     datas = new uVK.UserDatas();
     Cache = new SaveAudios();
 }