private void OpenMap() { var window = System.Windows.Application.Current.Windows.OfType <LocationWindow>().SingleOrDefault(); if (window == null) { window = new LocationWindow(); window.Show(); } window.Activate(); }
public void TestLocationList(string exeptedResult, string city) { topMenuInstance = mainPageInstance.MoveToTopMenu(); Acts.Click(topMenuInstance.LocationsItem); locationWindowInstance = new LocationWindow(driver); string[] parts = city.Split(','); List <string> listOfCity = new List <string>(parts); IList <IWebElement> nonActiveCity = locationWindowInstance.GetLocationNonActiveWebElements(); locationWindowInstance.ClickNonActiveButtonNames(nonActiveCity, listOfCity); Acts.Click(locationWindowInstance.ConfurmButton); CenterContainer groupLocationInstance = mainPageInstance.MoveToCenterContainer(); groupLocationInstance = new CenterContainer(driver); wait.Until(groupLocationInstance.IsHintVisible()); Console.WriteLine(groupLocationInstance.LocationHint.Text); string exeptedResultTitle = exeptedResult; Assert.AreEqual(exeptedResultTitle, groupLocationInstance.LocationHint.Text); }
public void Init() { GameSession = new GameSession(); InputManager = new InputManager(); Parameters = new Parameters(); Parameters.WidthOrHeightChanged += UpdateSize; MessageWindow = new MessageWindow(Parameters.MessageX, Parameters.MessageY, Parameters.MessageWidth, Parameters.MessageHeight, ConWindow.BorderType.Double); BindingsWindow = new BindingsWindow(Parameters.BindingsX, Parameters.BindingsY, Parameters.BindingsWidth, Parameters.BindingsHeight, ConWindow.BorderType.Double); StatsWindow = new StatsWindow(Parameters.StatsX, Parameters.StatsY, Parameters.StatsWidth, Parameters.StatsHeight, ConWindow.BorderType.Double); LocationWindow = new LocationWindow(Parameters.LocationX, Parameters.LocationY, Parameters.LocationWidth, Parameters.LocationHeight, ConWindow.BorderType.Single); TravelWindow = new TravelWindow(Parameters.TravelX, Parameters.TravelY, Parameters.TravelWidth, Parameters.TravelHeight, ConWindow.BorderType.Double); InventoryWindow = new InventoryWindow(Parameters.InventoryX, Parameters.InventoryY, Parameters.InventoryWidth, Parameters.InventoryHeight, ConWindow.BorderType.Double); // dev DeveloperWindow = new DeveloperWindow(Parameters.DeveloperX, Parameters.DeveloperY, Parameters.DeveloperWidth, Parameters.DeveloperHeight, ConWindow.BorderType.Double, Parameters.DeveloperHeight - 2, "DEV CONSOLE", true, false); DeveloperWindow.Add("Developer window successfuly initialized."); CurrentlyFocused = FocusableWindows.MainWindow; }