コード例 #1
0
        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);
        }
コード例 #2
0
        // We will also need some sort of VM for the results
        public SearchWorker(Search search, 
                            ItemRepository itemRepo,
                            Dispatcher dispatcher,
                            LogsViewModel logs)
        {
            _search = search;
            _itemRepo = itemRepo;
            _dispatcher = dispatcher;
            _logs = logs;

            sTimer = new System.Timers.Timer(60000); // 60s?
            sTimer.Elapsed += new System.Timers.ElapsedEventHandler(sTimer_Elapsed);

            sTimer.Start();
        }
コード例 #3
0
        public SearchEngine(ItemRepository repo, Search search, LogsViewModel logs, Dispatcher dispatcher)
        {
            SearchItemL = new ObservableCollection<ItemPriceList>();
            LocalSearchItemL = new List<ItemPriceList>();

            _logs = logs;

            timer = new Timer(60000);
            timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);

            OldText = "";

            _dispatcher = dispatcher;
            _search = search;
            _itemRepo = repo;
        }