private void frmProgress_Load(object sender, EventArgs e) { backuper = new Backuper(); backuper.start(); timer1.Enabled = true; hideOnNextTimeout = false; }
public BackupService() { InitializeComponent(); InitLogs(); var currentFolder = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); BackupFolderPath = System.IO.Path.Combine(currentFolder, "Backups"); Backuper = new Backuper(); }
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); } }