Beispiel #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();

            if (fbd.ShowDialog() == DialogResult.OK)
            {
                Backupper.TargetPath = fbd.SelectedPath;
                this.Hide();
                try
                {
                    Backupper.PrepareToWork();
                    Backupper.CopyAll(Backupper.TargetPath);
                    Watcher.RunWatch(Backupper.TargetPath);
                    this.Show();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message + ex.StackTrace);
                }
            }
        }
Beispiel #2
0
 private void Button1_Click(object sender, EventArgs e)
 {
     Backupper.Restore(recovTime);
     this.Close();
 }