private bool IsSingleConversionEnabled()
 {
     return((_isProcessing == false) &&
            !TexturePreview.IsEmpty &&
            !SourceDirectory.IsNullOrEmpty() &&
            !DestinationDirectory.IsNullOrEmpty());
 }
 private bool IsMultiConversionEnabled()
 {
     return((_isProcessing == false) &&
            !SourceDirectory.IsNullOrEmpty() &&
            !DestinationDirectory.IsNullOrEmpty() &&
            Textures.Any(node => node.IsPicked));
 }
        public TextureManagementWindowViewModel(
            DomainActionBuilder actionBuilder,
            IDirectoryPicker directoryPicker,
            IEventPublisher eventPublisher,
            IFilePicker filePicker,
            IFindTextureManagementSettingsQuery findTextureManagementSettingsQuery,
            IImageProvider emptyImageProvider,
            ITaskRunner dispatcher)
        {
            _actionBuilder   = actionBuilder;
            _directoryPicker = directoryPicker;
            _eventPublisher  = eventPublisher;
            _filePicker      = filePicker;
            _findTextureManagementSettingsQuery = findTextureManagementSettingsQuery;
            _eventPublisher.Register(this);

            StatusViewModel = new StatusViewModel(dispatcher);
            TexturePreview  = new TexturePreviewViewModel(_actionBuilder, _eventPublisher, this, emptyImageProvider);

            AbortCommand         = new ActionCommand(AbortConversion, IsAbortConversionEnabled);
            CheckAllCommand      = new ActionCommand(CheckAll, IsCheckAllEnabled);
            ConvertMultiCommand  = new ActionCommand(() => _queue.QueueTask(ConvertMultiAsync), IsMultiConversionEnabled);
            ConvertSingleCommand = new ActionCommand(() => _queue.QueueTask(ConvertSingleAsync), IsSingleConversionEnabled);
            MoveToDestinationDirectoryCommand = new ActionCommand(MoveToDestinationDirectory, () => !DestinationDirectory.IsNullOrEmpty());
            MoveToSourceDirectoryCommand      = new ActionCommand(MoveToSourceDirectory, () => !SourceDirectory.IsNullOrEmpty());
            MultiChangedCommand             = new ActionCommand(() => _queue.QueueTask(OnChangedAsync), () => true);
            PickDestinationDirectoryCommand = new ActionCommand(() => _queue.QueueTask(PickDestinationDirectoryAsync), () => true);
            PickSourceDirectoryCommand      = new ActionCommand(() => _queue.QueueTask(PickSourceDirectoryAsync), () => true);
            SingleChangedCommand            = new ActionCommand(() => _queue.QueueTask(OnSingleChangedAsync), () => true);
            UncheckAllCommand = new ActionCommand(UncheckAll, IsUncheckAllEnabled);
        }