Exemplo n.º 1
0
        private void cmdMakeSnapshotOfCache_Click(object sender, EventArgs e)
        {
            RevisionForm input = new RevisionForm();
              input.ReadOnly = false;
              if (input.ShowDialog() == DialogResult.OK)
              {
            CacheRevision rev = new CacheRevision();
            rev.Date = DateTime.Now;
            rev.Name = input.InputName;
            rev.Description = input.InputDescription;

            FastZip zip = new FastZip();
            zip.CreateZip(rev.CreateFileName(), txtCacheLocation.Text, true, "");
            rev.Data = zip;

            File.WriteAllText(rev.CreateFileName() + ".desc.txt", rev.Description);

            lbCacheSnapshots.Items.Add(rev);

              }
        }
Exemplo n.º 2
0
 private void lbCacheSnapshots_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     CacheRevision rev = (CacheRevision)lbCacheSnapshots.SelectedItem;
       RevisionForm form = new RevisionForm();
       form.ReadOnly = true;
       form.InputName = rev.Name;
       form.InputDescription = rev.Description;
       form.Show();
 }