Exemple #1
0
 private void frmProgress_Load(object sender, EventArgs e)
 {
     backuper = new Backuper();
     backuper.start();
     timer1.Enabled = true;
     hideOnNextTimeout = false;
 }
Exemple #2
0
        public BackupService()
        {
            InitializeComponent();
            InitLogs();
            var currentFolder = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            BackupFolderPath = System.IO.Path.Combine(currentFolder, "Backups");
            Backuper         = new Backuper();
        }
Exemple #3
0
        private void CreateBackup()
        {
            var backupFileName      = GetBackupFileName();
            var destinationFilePath = System.IO.Path.Combine(BackupFolderPath, backupFileName);

            try
            {
                Backuper.CreateZipFolder(Path, destinationFilePath);
            }
            catch (Exception ex)
            {
                eventLog1.WriteEntry($"Backuper.CreateZipFolder-{ex.Message}", System.Diagnostics.EventLogEntryType.Error);
            }
        }