public SearchNavigationViewModel(
            IEventAggregator eventAggregator
            , IMessageDialogService messageDialogService
            , ICategoryNavigationViewModel categoryNavigationViewModel
            , ITagNavigationViewModel tagNavigationViewModel
            , IArchiveEntityRepository repository
            )
        {
            _serchResultId        = 0;
            _eventAggregator      = eventAggregator;
            _messageDialogService = messageDialogService;
            _repository           = repository;

            _tagNavigationViewModel      = tagNavigationViewModel;
            _categoryNavigationViewModel = categoryNavigationViewModel;

            var SearchWidgets = new Dictionary <string, SearchWidget <SearchWidgetItem> >()
            {
                { nameof(SearchByStringWidget), (new SearchByStringWidget()) }
                , { nameof(SearchByCategoryWidget), (new SearchByCategoryWidget()) }
                , { nameof(SearchByFileSizeWiget), (new SearchByFileSizeWiget()) }
                , { nameof(SearchByTagWidget), (new SearchByTagWidget()) }
                , { nameof(SearchByGradeWidget), (new SearchByGradeWidget()) }
            };

            SearchCondition = new SearchCondition(SearchWidgets);

            AddSearchByStringConditionCommand   = new DelegateCommand <string>(OnAddSearchByStringConditionExecute, OnAddSearchByStringConditionCanExecute);
            AddSearchByCategoryConditionCommand = new DelegateCommand <int?>(OnAddSearchByCategoryConditionExecute, OnAddSearchByCategoryConditionCanExecute);
            AddSearchByGradeConditionCommand    = new DelegateCommand <Tuple <double?, double?> >(OnAddSearchByGradeConditionExecute, OnAddSearchByGradeConditionCanExecute);

            AddSearchByFileSizeConditionCommand = new DelegateCommand <Tuple <int?, int?> >(OnAddSearchByFileSizeConditionExecute, OnAddSearchByFileSizeConditionCanExecute);
            AddSearchByTagConditionCommand      = new DelegateCommand <int?>(OnAddSearchByTagConditionExecute, OnAddSearchByTagConditionCanExecute);
            GoSearchCommand = new DelegateCommand(OnSearchExecute, OnSearchCanExecute);

            ClearConditionCommand = new DelegateCommand(OnClearConditionExecute, OnClearConditionCanExecute);
            _viewItems            = (CollectionView)CollectionViewSource.GetDefaultView(SearchCondition.Items);

            PropertyGroupDescription groupDescription = new PropertyGroupDescription("GroupTitle");

            _viewItems.GroupDescriptions.Add(groupDescription);
        }
        public FilesOnDriveViewModel(
            IEventAggregator eventAggregator
            , IMessageDialogService messageDialogService
            , IArchiveEntityRepository repository
            , ICategoryNavigationViewModel categoryNavigationViewModel
            , ICategoryRepository categoryRepository
            , ITagRepository tagRepository
            , IAppLogger appLogger
            ) : base(eventAggregator, messageDialogService, appLogger)
        {
            _categoryRepository          = categoryRepository;
            _categoryNavigationViewModel = categoryNavigationViewModel;
            _tagRepository        = tagRepository;
            _repository           = repository;
            _eventAggregator      = eventAggregator;
            _messageDialogService = messageDialogService;
            _eventAggregator.GetEvent <SelectedItemChangedEvent>().Subscribe(OnSelectedItemChanged);

            Tags       = new ObservableCollection <TagWrapper>();
            Categories = new ObservableCollection <CategoryWrapper>();
            Images     = new ObservableCollection <ImageWrapper>();

            CategoryNavigationViewModel.Load();

            #region Commands
            AddTagCommand = new DelegateCommand <string>(OnAddTagExecute, OnAddTagCanExecute);

            MultyAddTagCommand = new DelegateCommand <string>(OnAddMultyTagExecute, OnAddMultyTagCanExecute);

            AddCategoryCommand                = new DelegateCommand <int?>(OnAddCategoryExecute, OnAddCategoryCanExecute);
            AddNewCategoryCommand             = new DelegateCommand <int?>(OnAddNewCategoryExecute, OnAddNewCategoryCanExecute);
            OpenFileDialogCommand             = new DelegateCommand(OnOpenFileDialogExecute, OnOpenFileDialogCanExecute);
            DeleteTagCommand                  = new DelegateCommand <string>(OnDeleteTagExecute, OnDeleteTagCanExecute);
            DeleteImageCommand                = new DelegateCommand <int?>(OnDeleteImageExecute, OnDeleteImageCanExecute);
            DeleteCategoryToEntityCommand     = new DelegateCommand <int?>(OnDeleteCategoryToEntityExecute, OnDeleteCategoryToEntityCanExecute);
            CloseSearchDetailViewModelCommand = new DelegateCommand(OnCloseSearchDetailViewExecute);
            EditDescriptionCommand            = new DelegateCommand(OnEditDescriptionViewExecute);
            MultyAddCategoryCommand           = new DelegateCommand <int?>(OnMultyAddCategoryExecute, OnMultyAddCategoryCanExecute);

            #endregion
        }
        public SearchResultViewModel(IEventAggregator eventAggregator
                                     , IMessageDialogService messageDialogService
                                     , IArchiveEntityRepository repository
                                     )
        {
            _repository = repository;

            _eventAggregator                     = eventAggregator;
            _messageDialogService                = messageDialogService;
            SearchResult                         = new SearchResult(new List <ArchiveEntityDto>());
            CloseSearchDetailViewModelCommand    = new DelegateCommand(OnCloseDetailViewExecute);
            OpenSearchResultArchiveEntityCommand = new DelegateCommand <int?>(OnOpenSearchResultArchiveEntityExecute);
            OpenSearchResultDriveCommand         = new DelegateCommand <int?>(OnOpenSearchResultDriveExecute);

            FirstPageCommand = new Prism.Commands.DelegateCommand(FirstPageCommandExecute);
            PrevPageCommand  = new Prism.Commands.DelegateCommand(PrevPageCommandExecute);
            NextPageCommand  = new Prism.Commands.DelegateCommand(NextPageCommandExecute);
            LastPageCommand  = new Prism.Commands.DelegateCommand(LastPageCommandExecute);

            _currentPage = 1;


            // SearchResult.MyProperty = 0;
        }