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); }
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); }
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); }
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); }
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; }
public List <IProjectCard> GetProjectsBySearchingString(string searchString) { SearchSection.SearchResultsByString(searchString); return(Projects); }
public LineSearchContentViewModel(INetworkService network, IMessenger messenger, SearchSection ownedBy, string title) { _networkService = network; _messenger = messenger; OwnedBy = ownedBy; Title = title; }