public DisplayItemControlViewModel(IDialogService dialogService, IBackupService backupService, SourceFolder sourceFolder, string destPath)
        {
            _DialogService  = dialogService;
            _BackupService  = backupService;
            SourceFolder    = sourceFolder;
            DestinationPath = destPath;

            BackupStatus = new BackupStatus(_DialogService);
            BackupStatus.ItemsRemainingCounter = SourceFolder.FolderInfo.ItemsCount;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Remove folder from <see cref="SourceFolders"/>
        /// </summary>
        /// <param name="folder"></param>
        /// TODO: Use dictionary instead?
        public void RemoveFolder(string folder)
        {
            // Find the item by the name of the folder
            SourceFolder item = SourceFolders.Where(sf => sf.FolderInfo.FullPath == folder).FirstOrDefault();


            // Check if the item was found
            if (item != null)
            {
                // Remove the item from the list
                SourceFolders.Remove(item);
            }
        }