Exemple #1
0
        public BackupManager(BackupSource source, string destinationPath, string password, string passwordCheckPhrase, SingleAssemblyResourceManager generalResourceManager, BackupCleaningOptions cleaningOptions, bool useDatabase, KlerksSoft.EasyProgressDialog.ProgressDialog progressDialog)
        {
            if (!useDatabase && !string.IsNullOrEmpty(password))
                throw new ArgumentException("password must be empty if database is not used.", "password");

            _source = source;
            _backupLocation = destinationPath;
            _password = password;
            _passwordCheckPhrase = passwordCheckPhrase;
            _progressDialog = progressDialog;
            _generalResourceManager = generalResourceManager;
            _cleaningOptions = cleaningOptions;
            _useDatabase = useDatabase;
        }
        public BackupManager(BackupSource source, string destinationPath, string password, string passwordCheckPhrase, SingleAssemblyResourceManager generalResourceManager, BackupCleaningOptions cleaningOptions, bool useDatabase, KlerksSoft.EasyProgressDialog.ProgressDialog progressDialog)
        {
            if (!useDatabase && !string.IsNullOrEmpty(password))
            {
                throw new ArgumentException("password must be empty if database is not used.", "password");
            }

            _source                 = source;
            _backupLocation         = destinationPath;
            _password               = password;
            _passwordCheckPhrase    = passwordCheckPhrase;
            _progressDialog         = progressDialog;
            _generalResourceManager = generalResourceManager;
            _cleaningOptions        = cleaningOptions;
            _useDatabase            = useDatabase;
        }
Exemple #3
0
        private void frm_FolderBackup_Load(object sender, EventArgs e)
        {
            btn_Previous.Enabled       = false;
            grp_BackupLocation.Visible = false;

            string ownerText = Properties.Settings.Default.OwnerName;

            if (!String.IsNullOrEmpty(ownerText))
            {
                ownerText = " " + ownerText;
            }
            lbl_Intro.Text = lbl_Intro.Text.Replace("{OwnerText}", ownerText);

            BackupCleaningOptions cleaningOptions = new BackupCleaningOptions();

            cleaningOptions.FinalCutOffDays = Properties.Settings.Default.FinalCutOffDays;
            cleaningOptions.Period1Interval = Properties.Settings.Default.Period1Interval;
            cleaningOptions.Period1Start    = Properties.Settings.Default.Period1Start;
            cleaningOptions.Period2Interval = Properties.Settings.Default.Period2Interval;
            cleaningOptions.Period2Start    = Properties.Settings.Default.Period2Start;
            cleaningOptions.Period3Interval = Properties.Settings.Default.Period3Interval;
            cleaningOptions.Period3Start    = Properties.Settings.Default.Period3Start;

            _backupSource = new BackupSource(Properties.Settings.Default.LocationToBackup,
                                             generalResourceManager,
                                             progressDialog);

            _backupMgr = new BackupManager(_backupSource,
                                           Properties.Settings.Default.BackupLocation,
                                           Properties.Settings.Default.EncryptionPassword,
                                           Properties.Settings.Default.EncryptionCheckPhrase,
                                           generalResourceManager,
                                           cleaningOptions,
                                           Properties.Settings.Default.UseDatabase,
                                           progressDialog);

            lbl_BackupLocation.Text    = _backupSource.SourcePath;
            lbl_LocToBackUp.Text       = _backupSource.SourcePath;
            txt_BackupDestination.Text = _backupMgr.BackupLocation;
        }
Exemple #4
0
        private void frm_FolderBackup_Load(object sender, EventArgs e)
        {
            btn_Previous.Enabled = false;
            grp_BackupLocation.Visible = false;

            string ownerText = Properties.Settings.Default.OwnerName;
            if (!String.IsNullOrEmpty(ownerText)) ownerText = " " + ownerText;
            lbl_Intro.Text = lbl_Intro.Text.Replace("{OwnerText}", ownerText);

            BackupCleaningOptions cleaningOptions = new BackupCleaningOptions();
            cleaningOptions.FinalCutOffDays = Properties.Settings.Default.FinalCutOffDays;
            cleaningOptions.Period1Interval = Properties.Settings.Default.Period1Interval;
            cleaningOptions.Period1Start = Properties.Settings.Default.Period1Start;
            cleaningOptions.Period2Interval = Properties.Settings.Default.Period2Interval;
            cleaningOptions.Period2Start = Properties.Settings.Default.Period2Start;
            cleaningOptions.Period3Interval = Properties.Settings.Default.Period3Interval;
            cleaningOptions.Period3Start = Properties.Settings.Default.Period3Start;

            _backupSource = new BackupSource(Properties.Settings.Default.LocationToBackup,
                generalResourceManager,
                progressDialog);

            _backupMgr = new BackupManager(_backupSource,
                Properties.Settings.Default.BackupLocation,
                Properties.Settings.Default.EncryptionPassword,
                Properties.Settings.Default.EncryptionCheckPhrase,
                generalResourceManager,
                cleaningOptions,
                Properties.Settings.Default.UseDatabase,
                progressDialog);

            lbl_BackupLocation.Text = _backupSource.SourcePath;
            lbl_LocToBackUp.Text = _backupSource.SourcePath;
            txt_BackupDestination.Text = _backupMgr.BackupLocation;
        }
 public BackupManager(BackupSource source, string destinationPath, string password, string passwordCheckPhrase, SingleAssemblyResourceManager generalResourceManager, BackupCleaningOptions cleaningOptions, bool useDatabase)
     : this(source, destinationPath, password, passwordCheckPhrase, generalResourceManager, cleaningOptions, useDatabase, null)
 {
 }
Exemple #6
0
 public BackupManager(BackupSource source, string destinationPath, string password, string passwordCheckPhrase, SingleAssemblyResourceManager generalResourceManager, BackupCleaningOptions cleaningOptions, bool useDatabase)
     : this(source, destinationPath, password, passwordCheckPhrase, generalResourceManager, cleaningOptions, useDatabase, null)
 {
 }