示例#1
0
        private void UpdateBackupsList()
        {
            backupSearchResults.Clear();

            TMSBackup.ReadInBackupsList(); // This probably should not be here
            foreach (TMSBackup b in TMSBackup.backupPoints)
            {
                if ((b.backupDate.Date <= BackupsEndDate.SelectedDate) && (b.backupDate.Date >= BackupsStartDate.SelectedDate))
                {
                    backupSearchResults.Add(b);
                }
            }

            BackupsList.Items.Refresh();
        }
示例#2
0
        private void RestoreSelected_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (BackupsList.SelectedItem != null)
                {
                    TMSBackup.RecoverRestorePoint((TMSBackup)BackupsList.SelectedItem);
                }
            }
            catch (Exception ex)
            {
                TMSLogger.LogIt(" | " + "AdminPage.xaml.cs" + " | " + "AdminPage" + " | " + "RestoreSelected_Click" + " | " + ex.GetType().ToString() + " | " + ex.Message + " | ");
            }

            UpdateBackupsList();
        }
示例#3
0
 private void TMSStartup()
 {
     TMSLogger.SetDefaultLogFilePath(); // Initialize logger location when app opens
     TMSBackup.SetDefaultBackupFilePath();
     //TMSLogger.LogStatusEvent += LogStatusEventHandler;
 }
示例#4
0
 private void ChangeDir_Click(object sender, RoutedEventArgs e)
 {
     TMSBackup.ChangeBackupPath();
     //change the directory of the backup files
     UpdateBackupsList();
 }
示例#5
0
 private void CreateRestore_Click(object sender, RoutedEventArgs e)
 {
     TMSBackup.CreateRestorePoint();
     // Create a new restore point
     UpdateBackupsList();
 }