Exemplo n.º 1
0
 public void Save(string file, IBackup backup)
 {
     BinaryWriter bw = new BinaryWriter(new FileStream(file, FileMode.OpenOrCreate));
     bw.Write(signature);
     bw.Write(backup.GetName());
     bw.Write(backup.GetDescription());
     bw.Write((backup as Backup_Jar).GetData());
 }
Exemplo n.º 2
0
        public void Save(string file, IBackup backup)
        {
            BinaryWriter bw = new BinaryWriter(new FileStream(file, FileMode.OpenOrCreate));

            bw.Write(signature);
            bw.Write(backup.GetName());
            bw.Write(backup.GetDescription());
            bw.Write((backup as Backup_Jar).GetData());
        }
Exemplo n.º 3
0
 public static void RemoveBackup(IBackup backup)
 {
     File.Delete(backups.Find(b => b.GetName() == backup.GetName()).GetFilePath());
     backups.Remove(backup);
 }
Exemplo n.º 4
0
 public static void RemoveBackup(IBackup backup)
 {
     File.Delete(backups.Find(b => b.GetName() == backup.GetName()).GetFilePath());
     backups.Remove(backup);
 }
Exemplo n.º 5
0
 public void Save(string file, IBackup backup)
 {
     byte[] jardata = (backup as Backup_Jar).GetData();
     BinaryWriter bw = new BinaryWriter(new FileStream(file, FileMode.OpenOrCreate));
     bw.Write(signature);
     bw.Write(backup.GetName());
     bw.Write(backup.GetDescription());
     bw.Write(jardata.Length);
     bw.Write(jardata);
     bw.Close();
 }