/// <summary>
        /// Constructor for the view model.
        /// </summary>
        public BackupInfoViewModel()
        {
            // Set a ref to self for static member usage.
            _ActiveViewModel = this;

            // For testing purposes.
            //_BackupInfo = new ObservableCollection<BackupItem>();

            // Actiovate the
            TaskManager.InitScheduler();

            // Prep the backupinfo for consumption.
            InitBackupInfo();
            // Prep the list of backup periods for consumption.
            InitBackupPeriodList();
            // Reactivate any previously active jobs from the serialized data.
            QueueAllJobs();
            // Check and toggle startup settings.
            ProgramOptionsManager.ToggleRunOnStartup(IsRunOnStartupEnabled);

            // Prep the commands for use.
            DeleteItemCmd               = new DeleteBackupItemCommand(this);
            AddItemCmd                  = new AddBackupItemCommand(this);
            SelectOriginFileDialogCmd   = new SelectOriginFileDialogCommand(this);
            SelectOriginFolderDialogCmd = new SelectOriginFolderDialogCommand(this);
            SelectBackupFolderDialogCmd = new SelectBackupFolderDialogCommand(this);
            SaveConfigCmd               = new SaveConfigCommand();
            LoadConfigCmd               = new LoadConfigCommand(this);
            ResetConfigCmd              = new ResetConfigCommand(this);
            ToggleRunOnStartupCmd       = new ToggleRunOnStartupCommand(this);

            // For testing purposes.
            //TestTasks();
        }
 public void Execute(object parameter)
 {
     // Call the static method to toggle addition or deletion of tash scheduler job.
     ProgramOptionsManager.ToggleRunOnStartup(_ViewModel.IsRunOnStartupEnabled);
 }