Daniel's XL Toolbox NG
XLToolbox.Backup.Backups Class Reference

Represents a collection of backups for a given file. More...

Public Member Functions

void BuildList ()
 
bool Create ()
 
void Purge ()
 Purges the backup files: Keeps all files of today, one for the last week, one for the month before last week, and one for all past years. More...
 
bool DeleteAllBackups ()
 Removes all backup files. More...
 
 Backups (string filePath)
 Creates a new BackupFiles object for a given file, using the backup directory from the UserSettings. More...
 
 Backups (string filePath, string backupDir)
 Creates a new BackupFiles object for a given file and a given backup directory. More...
 

Static Public Member Functions

static void Enable ()
 
static void Disable ()
 

Static Protected Member Functions

static void Application_WorkbookBeforeSave (Microsoft.Office.Interop.Excel.Workbook Wb, bool SaveAsUI, ref bool Cancel)
 

Properties

static bool IsEnabled [get, set]
 
string FilePath [get]
 Gets the entire path to the file being backed up. More...
 
string BackupDir [get, set]
 Gets or sets the relative directory where backups are stored. More...
 
string BackupPath [get]
 Gets the full backup path for the file. More...
 
List< BackupFileFiles [get]
 
int Count [get]
 
Exception Exception [get]
 

Events

static EventHandler< Bovender.ExceptionHandler.ManageExceptionEventArgsBackupFailed
 

Detailed Description

Represents a collection of backups for a given file.

Constructor & Destructor Documentation

◆ Backups() [1/2]

XLToolbox.Backup.Backups.Backups ( string  filePath)
inline

Creates a new BackupFiles object for a given file, using the backup directory from the UserSettings.

◆ Backups() [2/2]

XLToolbox.Backup.Backups.Backups ( string  filePath,
string  backupDir 
)
inline

Creates a new BackupFiles object for a given file and a given backup directory.

Member Function Documentation

◆ Application_WorkbookBeforeSave()

static void XLToolbox.Backup.Backups.Application_WorkbookBeforeSave ( Microsoft.Office.Interop.Excel.Workbook  Wb,
bool  SaveAsUI,
ref bool  Cancel 
)
inlinestaticprotected

◆ BuildList()

void XLToolbox.Backup.Backups.BuildList ( )
inline

◆ Create()

bool XLToolbox.Backup.Backups.Create ( )
inline

◆ DeleteAllBackups()

bool XLToolbox.Backup.Backups.DeleteAllBackups ( )
inline

Removes all backup files.

Returns
True if all files were delete, false if at least one backup file could not be deleted.

◆ Disable()

static void XLToolbox.Backup.Backups.Disable ( )
inlinestatic

◆ Enable()

static void XLToolbox.Backup.Backups.Enable ( )
inlinestatic

◆ Purge()

void XLToolbox.Backup.Backups.Purge ( )
inline

Purges the backup files: Keeps all files of today, one for the last week, one for the month before last week, and one for all past years.

Property Documentation

◆ BackupDir

string XLToolbox.Backup.Backups.BackupDir
getset

Gets or sets the relative directory where backups are stored.

◆ BackupPath

string XLToolbox.Backup.Backups.BackupPath
get

Gets the full backup path for the file.

◆ Count

int XLToolbox.Backup.Backups.Count
get

◆ Exception

Exception XLToolbox.Backup.Backups.Exception
get

◆ FilePath

string XLToolbox.Backup.Backups.FilePath
get

Gets the entire path to the file being backed up.

◆ Files

List<BackupFile> XLToolbox.Backup.Backups.Files
get

◆ IsEnabled

bool XLToolbox.Backup.Backups.IsEnabled
staticgetset

Event Documentation

◆ BackupFailed

EventHandler<Bovender.ExceptionHandler.ManageExceptionEventArgs> XLToolbox.Backup.Backups.BackupFailed
static

The documentation for this class was generated from the following file: