Exemplo n.º 1
0
 protected EShopPage(Driver driver)
 {
     Driver          = driver;
     SearchSection   = new SearchSection(driver);
     MainMenuSection = new MainMenuSection(driver);
     CartInfoSection = new CartInfoSection(driver);
 }
        public StopSearchContentViewModel(IMessenger messenger, INetworkService network, IGeolocationService geolocation,
                                          SearchSection ownedBy, string title)
        {
            _messenger      = messenger;
            _networkService = network;
            _geolocation    = geolocation;
            OwnedBy         = ownedBy;
            Title           = title;

            _messenger.Register <MessageTypes.ViewStopDetails>(this, SwitchToDetailedView);
        }
Exemplo n.º 3
0
        internal static List <SearchProviderBase> InitFromConfig()
        {
            List <SearchProviderBase> searchProviders = new List <SearchProviderBase>();
            SearchSection             sectionSection  = SearchSection.GetConfigurationSection();

            foreach (ProviderSettings ps in sectionSection.Providers)
            {
                SearchProviderBase _provider = ProvidersHelper.InstantiateProvider(ps, Type.GetType(ps.Type)) as SearchProviderBase;
                searchProviders.Add(_provider);
            }
            return(searchProviders);
        }
Exemplo n.º 4
0
        public bool matchOnTitle(ImportEntry _singleEntry, bool _checkAll)
        {
            bool anyMatched = false;

            var entries =
                from entry in m_importFile.Entries
                where ((_checkAll || !entry.Matched) && !String.IsNullOrEmpty(entry.Title)) && (_singleEntry == null || entry == _singleEntry)
                select entry;

            string baseMessage = "Find matches based on title.... ";

            progressMessage(baseMessage, true);
            foreach (ImportEntry entry in entries)
            {
                progressMessage(entry.Title, false);
                entry.resetMatches(false);
                foreach (MainSection mainSection in m_mainSections)
                {
                    SearchSection  searchSection  = mainSection.TitleSearchSection();
                    LibrarySection librarySection = (searchSection != null) ? searchSection.createFromSearch(entry.Title) : null;
                    if (librarySection != null)
                    {
                        librarySection.IsMusic = mainSection.IsMusic;
                        var tracks =
                            from track in PMSServer.getSectionElements(librarySection, false)
                            select track;

                        foreach (XElement trackElement in tracks)
                        {
                            if (entry.AddMatch(new MatchEntry(mainSection, trackElement)))
                            {
                                anyMatched = true;
                            }
                        }
                    }
                }
                entry.CheckBestMatch();
            }
            progressMessage("", true);
            return(anyMatched);
        }
Exemplo n.º 5
0
        private async void SearchBtn_Tapped(object sender, EventArgs e)
        {
            //Task<bool> moveAnimationTask;
            Task <bool> scaleAnimationTask;

            if (SearchSection.HeightRequest != 0)
            {
                //moveAnimationTask = SearchSection.TranslateTo(0, -600, 200);
                scaleAnimationTask          = SearchSection.FadeTo(0, 100);
                SearchSection.HeightRequest = 0;
            }
            else
            {
                //moveAnimationTask = SearchSection.TranslateTo(0, 0, 200);
                scaleAnimationTask          = SearchSection.FadeTo(1, 100);
                SearchSection.HeightRequest = -1;
            }

            // wait for the 2 animations to finish...
            await Task.WhenAll(/*moveAnimationTask, */ scaleAnimationTask);
        }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            SearchSection Config = (SearchSection)ConfigurationManager.GetSection("searches");
            string        action = Console.ReadLine();

            if (action != String.Empty)
            {
                Analyzer analyzer = new StandardAnalyzer();

                IndexSearcher searcher = new IndexSearcher(Config.Searches["product"].IndexDirectory);

                MultiFieldQueryParser parserName = new MultiFieldQueryParser(new string[] { "productname", "keywords", "description" }, analyzer);

                Query queryName     = parserName.Parse("三星");
                Query queryCategory = new WildcardQuery(new Term("catepath", "*82*"));

                //Query queryCategory = parserCategory.Parse("82");

                BooleanQuery bQuery = new BooleanQuery();
                bQuery.Add(queryName, BooleanClause.Occur.MUST);
                bQuery.Add(queryCategory, BooleanClause.Occur.MUST);

                Hits hits = searcher.Search(bQuery);

                for (int i = 0; i < hits.Length(); i++)
                {
                    Document d = hits.Doc(i);
                    Console.WriteLine(d.Get("productname"));
                }
            }
            else
            {
                DataProcessor.Process("product");
                Console.Read();
            }
        }
 public SearchSectionChangedEventArgs(SearchSection oldSection, SearchSection newSection)
 {
     OldSection = oldSection;
     NewSection = newSection;
 }
Exemplo n.º 8
0
 public List <IProjectCard> GetProjectsBySearchingString(string searchString)
 {
     SearchSection.SearchResultsByString(searchString);
     return(Projects);
 }
Exemplo n.º 9
0
 public LineSearchContentViewModel(INetworkService network, IMessenger messenger, SearchSection ownedBy, string title)
 {
     _networkService = network;
     _messenger      = messenger;
     OwnedBy         = ownedBy;
     Title           = title;
 }