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