Ejemplo n.º 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;
        }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 5
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)
 {
 }
Ejemplo n.º 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)
 {
 }