public SearchViewModel(Search search, SearchRepository repo, NotificationViewModel notif, ItemRepository itemRepo, LogsViewModel logs, Dispatcher dispatcher)
        {
            _search = search;
            URL = SearchURL;
            AutoStart = SearchAutoStart;
            Index = SearchIndex;

            _searchRepository = repo;

            _notifVM = notif;
            sList = new SearchEngine(itemRepo, _search, logs, dispatcher);

            _notifVM.RegisterSearchEvents(sList);
        }
        public AllSearchesViewModel(Dispatcher dispatcher, string dataFile, LogsViewModel logsVM, ItemRepository itemRepo)
        {
            _dispatcher = dispatcher;
            _searchRepo = new SearchRepository(dataFile);
            _itemRepo = itemRepo;
            _logs = logsVM;

            _notifVM = new NotificationViewModel(_dispatcher);

            base.DisplayName = "All Searches View Model";

            _searchRepo.SearchAdded += new EventHandler<ModelBaseAddedEventArgs>(OnSearchAddedToRepository);
            _searchRepo.SearchRemoved += new EventHandler<ModelBaseAddedEventArgs>(OnSearchRemovedFromRepository);

            CreateAllSearches();

            foreach (SearchViewModel search in Searches)
                if(search.AutoStart) Start(search);
        }
        public AllSearchesViewModel(Dispatcher dispatcher, string dataFile, LogsViewModel logsVM, ItemRepository itemRepo)
        {
            _dispatcher = dispatcher;
            _searchRepo = new SearchRepository(dataFile);
            _itemRepo   = itemRepo;
            _logs       = logsVM;

            _notifVM = new NotificationViewModel(_dispatcher);

            base.DisplayName = "All Searches View Model";

            _searchRepo.SearchAdded   += new EventHandler <ModelBaseAddedEventArgs>(OnSearchAddedToRepository);
            _searchRepo.SearchRemoved += new EventHandler <ModelBaseAddedEventArgs>(OnSearchRemovedFromRepository);

            CreateAllSearches();

            foreach (SearchViewModel search in Searches)
            {
                if (search.AutoStart)
                {
                    Start(search);
                }
            }
        }