// ---------------------------------------------------
        // CONSTRUCTORS
        // ---------------------------------------------------
        /// <summary>
        /// Default Ctor
        /// </summary>
        public DatabaseRestoreForm()
        {
            InitializeComponent();

            this._brh = new BackupRestoreHandler(Configuration.ConnectionString);

            this._selected_item = null;
            this._load = true;
            this.DialogResult = DialogResult.Cancel;

            this.pbProcess.Minimum = 0;
            this.pbProcess.Maximum = 100;

            this._brh.RestorePercentEvent += new BackupRestoreHandler.RestorePercentEventHandler(_brh_RestorePercentEvent);
            this._brh.RestoreCompleteEvent += new BackupRestoreHandler.RestoreCompleteEventHandler(_brh_RestoreCompleteEvent);

            this._brh.SavePath = Configuration.CommonApplicationTempPath;

            this.chkDeleteBeforeRestore.Checked = false;
            this.chkReplace.Checked = true;
            this.txtPath.Text = Configuration.CommonApplicationTempPath;
            this.fbDialog.RootFolder = Environment.SpecialFolder.MyComputer;
            this.btnRestore.Enabled = false;

            this._LoadRestoreItems();
        }
示例#2
0
        // ---------------------------------------------------
        // CONSTRUCTORS
        // ---------------------------------------------------
        /// <summary>
        /// Default Ctor
        /// </summary>
        public DatabaseBackupForm()
        {
            InitializeComponent();

            this._brh = new BackupRestoreHandler(Configuration.ConnectionString);

            this.DialogResult = DialogResult.Cancel;

            this._brh.BackupPercentEvent += new BackupRestoreHandler.BackupPercentEventHandler(_brh_BackupPercentEvent);
            this._brh.BackupCompleteEvent += new BackupRestoreHandler.BackupCompleteEventHandler(_brh_BackupCompleteEvent);

            this.pbProgress.Minimum = 0;
            this.pbProgress.Maximum = 100;

            this.fbDialog.RootFolder = Environment.SpecialFolder.MyComputer;

            try {
                this.gbBackup.Text = "Letztes Backup am: " + this._brh.GetLastBackupDate().ToString();
                this.txtPath.Text = Configuration.CommonApplicationTempPath;
            }
            catch(Exception ex) {
                StringBuilder str = new StringBuilder();
                str.Append("Die Backupschnittstelle konnte nicht initialisiert werden.");
                str.Append(" Eventuell sind nicht alle notwendigen Komponenten installiert.");
                str.Append("\n\n");
                str.Append("Fehlermeldung: ");
                str.Append(ex.Message);

                StaticWindows.ErrorBox(str.ToString());
            }
        }
示例#3
0
        // ---------------------------------------------------
        // CONSTRUCTORS
        // ---------------------------------------------------

        /// <summary>
        /// Default Ctor
        /// </summary>
        public DatabaseBackupForm()
        {
            InitializeComponent();

            this._brh = new BackupRestoreHandler(Configuration.ConnectionString);

            this.DialogResult = DialogResult.Cancel;

            this._brh.BackupPercentEvent  += new BackupRestoreHandler.BackupPercentEventHandler(_brh_BackupPercentEvent);
            this._brh.BackupCompleteEvent += new BackupRestoreHandler.BackupCompleteEventHandler(_brh_BackupCompleteEvent);

            this.pbProgress.Minimum = 0;
            this.pbProgress.Maximum = 100;

            this.fbDialog.RootFolder = Environment.SpecialFolder.MyComputer;

            try {
                this.gbBackup.Text = "Letztes Backup am: " + this._brh.GetLastBackupDate().ToString();
                this.txtPath.Text  = Configuration.CommonApplicationTempPath;
            }
            catch (Exception ex) {
                StringBuilder str = new StringBuilder();
                str.Append("Die Backupschnittstelle konnte nicht initialisiert werden.");
                str.Append(" Eventuell sind nicht alle notwendigen Komponenten installiert.");
                str.Append("\n\n");
                str.Append("Fehlermeldung: ");
                str.Append(ex.Message);

                StaticWindows.ErrorBox(str.ToString());
            }
        }
示例#4
0
        // ---------------------------------------------------
        // CONSTRUCTORS
        // ---------------------------------------------------

        /// <summary>
        /// Default Ctor
        /// </summary>
        public DatabaseRestoreForm()
        {
            InitializeComponent();

            this._brh = new BackupRestoreHandler(Configuration.ConnectionString);

            this._selected_item = null;
            this._load          = true;
            this.DialogResult   = DialogResult.Cancel;

            this.pbProcess.Minimum = 0;
            this.pbProcess.Maximum = 100;

            this._brh.RestorePercentEvent  += new BackupRestoreHandler.RestorePercentEventHandler(_brh_RestorePercentEvent);
            this._brh.RestoreCompleteEvent += new BackupRestoreHandler.RestoreCompleteEventHandler(_brh_RestoreCompleteEvent);

            this._brh.SavePath = Configuration.CommonApplicationTempPath;

            this.chkDeleteBeforeRestore.Checked = false;
            this.chkReplace.Checked             = true;
            this.txtPath.Text        = Configuration.CommonApplicationTempPath;
            this.fbDialog.RootFolder = Environment.SpecialFolder.MyComputer;
            this.btnRestore.Enabled  = false;

            this._LoadRestoreItems();
        }