public void AddTagsPerspective() { Perspectives.Add( new PerspectiveView( title: "Tags", sourceActions: ActionViews, filter: a => (a.Tags?.Length ?? 0) > 0, classifier: a => a.Tags)); }
private void AddFacettePerspective(string facetteName) { Perspectives.Add( new PerspectiveView( title: facetteName + "s", sourceActions: ActionViews, filter: a => a.HasFacette(facetteName), classifier: a => new[] { a.GetFacetteValue(facetteName) })); }
public void ShowPerspective(MainHead_Links menuHeader, Perspectives viewName) { if (driver.CurrentView != viewName.GetEnumDescription()) { if (!IsHomeTabShown) { tabHome.Click(); } MenuHeaderMouseOver(menuHeader).MenuItemClick(viewName); driver.SwitchToFrame(MainTabFrame); driver.CurrentView = viewName.GetEnumDescription(); } }
public void OnPerspectiveButtonPressed(Perspectives a_perspective) { OnPerspectiveSwitched.Invoke(a_perspective); }
public GameViewModel(Game game) : this() { GameID = game.GameID; GameName = game.GameName; URL = game.URL; CoverImageURL = game.CoverImageURL; StoryLine = game.StoreLine; Summary = game.Summary; FirstReleaseDate = game.FirstReleaseDate; Published = game.Published.HasValue ? game.Published.Value : false; foreach (var gameGenre in game.GameGenres) { Genres.Add( new GenreViewModel(gameGenre.Genre) ); } foreach (var gameTheme in game.GameThemes) { Themes.Add( new ThemeViewModel(gameTheme.Theme) ); } foreach (var gameMode in game.GameModes) { Modes.Add( new ModeViewModel(gameMode.Mode) ); } foreach (var gamePerspective in game.GamePerspectives) { Perspectives.Add( new PerspectiveViewModel(gamePerspective.Perspective) ); } foreach (var gameScreenshots in game.GameScreenshots) { Screenshots.Add( new ScreenshotViewModel(gameScreenshots.Screenshot) ); } foreach (var gamePlatform in game.GamePlatforms) { Platforms.Add( new PlatformViewModel( gamePlatform.Platform, gamePlatform.ReleaseDate.Value) ); foreach (var history in gamePlatform.VendorGameHistories) { PriceHistory.Add( new PriceHistoryViewModel(history) ); } } if (PriceHistory.Count() > 0) { TodaysPrices = PriceHistory?.Where(ph => ph.CreatedDate >= DateTime.Today).ToList(); Cheapest = TodaysPrices?.GroupBy(ph => ph.Price)?.OrderBy(ph => double.Parse(ph.Key))?.FirstOrDefault()?.Select(ph => ph).ToList(); CheapestPrice = Cheapest?.FirstOrDefault().Price; } foreach (var settings in game.GamePlatforms.Select(gp => gp.VendorGameSettings)) { foreach (var setting in settings) { Settings.Add(new VendorGameSettingViewModel(setting)); } } }
public void MenuItemClick(Perspectives viewName) { mainPage.GetElement() .ByText(viewName.GetEnumDescription()) .Click(); }
private WebElement menu(Perspectives menuItem) { return(mainPage.GetElement().ByText(menuItem.GetEnumDescription())); }
/// <summary> /// Data defines navigation to tab /// </summary> /// <param name="menuHeader">The main tab menu item to select a child menu item e.g. "Test Management".</param> /// <param name="viewName">The menu item to navigate to a selected View e.g. "Test Plan".</param> /// <param name="keyElement">The key determinant element should be found by this locator to be sure that an expected view is really opened.</param> public InitMainTabContext(MainHead_Links menuHeader, Perspectives viewName, By keyElement) { this.MenuHeader = menuHeader; this.ViewName = viewName; this.byKeyElement = keyElement; }