Exemplo n.º 1
0
 public FolderNavigator(
     string folderFrom,
     string folderTo,
     FileNameHandler fileNameHandler,
     IProgress progressIndicator)
 {
     _fileNameHandler               = fileNameHandler;
     _progressIndicator             = progressIndicator;
     progressIndicator.CancelEvent += ProgressIndicator_CancelEvent;
     if (folderFrom == null)
     {
         throw new ArgumentNullException(nameof(folderFrom));
     }
     if (folderTo == null)
     {
         throw new ArgumentNullException(nameof(folderTo));
     }
     _diFolderFrom = new DirectoryInfo(folderFrom);
     _diFolderTo   = new DirectoryInfo(folderTo);
     if (!_diFolderFrom.Exists)
     {
         throw new DirectoryNotFoundException(folderFrom);
     }
     //if (!_diFolderTo.Exists  ) throw new DirectoryNotFoundException(folderTo  );
     if (!FolderInScope(_diFolderFrom))
     {
         throw new InvalidOperationException("Please pick an upper bound folder alphabetically after the lower bound folder");
     }
 }
Exemplo n.º 2
0
        void ButtonRightRes_Click(object sender, RibbonControlEventArgs e)
        {
            var fileNameHandler = new FileNameHandler(new PersistedUserPreferences());

            Globals.ThisAddIn.ChangePicturesResolution(fileNameHandler.RightFileNameMaker, fileNameHandler.LargeFileNameMaker, true, true);
        }