Пример #1
0
 /// <summary>
 /// 停止数据库备份线程
 /// </summary>
 private void StopDBBackupThread()
 {
     if (dbBackupThread != null)
     {
         dbBackupThread.Abort();
         dbBackupThread = null;
     }
 }
Пример #2
0
        /// <summary>
        /// 启动数据库备份线程
        /// </summary>
        private void StartDBBackupThread()
        {
            bool openDBBackup = ConfigurationHelper.GetBoolValue("EnabelDBBackup");

            if (!openDBBackup)
            {
                return;
            }
            float backupDelayDays = ConfigurationHelper.GetFloatValue("BackupDelayDays");

            if (dbBackupThread == null)
            {
                dbBackupThread = new DBBackupThread(backupDelayDays);
                dbBackupThread.Start();
            }
        }