Example #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());
 }
Example #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());
        }
Example #3
0
 public static void RemoveBackup(IBackup backup)
 {
     File.Delete(backups.Find(b => b.GetName() == backup.GetName()).GetFilePath());
     backups.Remove(backup);
 }
Example #4
0
 public static void RemoveBackup(IBackup backup)
 {
     File.Delete(backups.Find(b => b.GetName() == backup.GetName()).GetFilePath());
     backups.Remove(backup);
 }
Example #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();
 }