public BaseAppPage(string relativePath) : base(relativePath) { TopMenu = new TopMenu(); Driver.InitializeElements(TopMenu); FooterMenu = new FooterMenu(); Driver.InitializeElements(FooterMenu); }
public void Test_InvalidMapping( ) { var provider = GetProvider( ); var settings = new ReaderToEntityAdapterSettings( ); var notAMapping = new TopMenu( ); Assert.Throws <ArgumentException>(() => provider.GetAdapter(notAMapping.Id, settings)); }
public void OnClick() { if (!string.IsNullOrEmpty(Route)) { navigationManager.NavigateTo(Route); } TopMenu.ActivateItem(this); }
protected override void Init() { Size = new Vector2 { X = 840, Y = 630 }; base.Init(); var actions = new Action[] { () => Data.TryAdd(SectionName.Help, new IGMDataItem.HelpBox { Pos = new Rectangle(15, 69, 810, 78), Title = Icons.ID.HELP, Options = Box_Options.Middle }), () => { var keys = new FF8String[] { Strings.Name.Use, //todo add to Strings.Name Strings.Name.Rearrange, Strings.Name.Sort, Strings.Name.Battle }; var values = new FF8String[] { Strings.Description.Use, //todo add to Strings.Description Strings.Description.Rearrange, Strings.Description.Sort, Strings.Description.Battle }; if (keys.Distinct().Count() == keys.Length && keys.Length == values.Length) { Data.TryAdd(SectionName.TopMenu, TopMenu.Create((from i in Enumerable.Range(0, keys.Length) select i).ToDictionary(x => keys[x], x => values[x]))); } else { Data.TryAdd(SectionName.TopMenu, null); } }, () => Data.TryAdd(SectionName.Title, new IGMDataItem.Box { Data = Memory.Strings.Read(Strings.FileID.MenuGroup, 0, 2), Pos = new Rectangle(615, 0, 225, 66) }), () => Data.TryAdd(SectionName.UseItemGroup, IGMData.Group.Base.Create(Statuses.Create(), IGMData.Pool.Item.Create(), TargetPool.Create())) }; Memory.ProcessActions(actions); ChoiceChangeHandler = help.TextChangeEvent; ItemPool.ItemChangeHandler += help.TextChangeEvent; ModeChangeHandler += help.ModeChangeEvent; Func <bool> TopMenuInputs = null; if (Data[SectionName.TopMenu] != null) { TopMenuInputs = Data[SectionName.TopMenu].Inputs; } InputsDict = new Dictionary <Mode, Func <bool> >() { { Mode.TopMenu, TopMenuInputs }, { Mode.SelectItem, UseItemGroup.ITEM[1, 0].Inputs }, { Mode.UseItemOnTarget, UseItemGroup.ITEM[2, 0].Inputs } }; SetMode(Mode.SelectItem); }
public JsonResponse <IEnumerable <JS.Menu.Item> > UpdateSubItems(JS.Menu.SubItemsSaveRequest req) { return(JsonResponse.Catch(() => { var items = TopMenu.GetItemsForParent(null, req.MenuId).ToList(); UpdateItems(null, req.MenuId, items, req.Items.EmptyIfNull()); UnitOfWork.Commit(); return Load(req.MenuId); }, Log)); }
public void UstMenu() { //Üst Menü Listeleme var q = from a in dcx.Menus select a; TopMenu.DataSource = q; TopMenu.DataTextField = "Title"; TopMenu.DataValueField = "ID"; TopMenu.DataBind(); }
public void ExecuteTest_ChooseLocationSofia_UsingDoubleClick_CheckGroupsName() { topMenuInstance = mainPageInstance.MoveToTopMenu(); Acts.Click(topMenuInstance.LocationsItem); mainPageInstance.DoubleClick(mainPageInstance.ModalWindow.LocationWindow.CitySofia); string exeptualResultTitle = "Sf-089-MQC"; Console.WriteLine(mainPageInstance.LeftContainer.GroupsInLocation.GetGroupByName("Sf-089-MQC").Text); Assert.AreEqual(exeptualResultTitle, mainPageInstance.LeftContainer.GroupsInLocation.GetGroupByName("Sf-089-MQC").Text); }
public void OpenTopMenu(TopMenu element) { foreach (var top in topMenu) { if (element.Equals(top.Text)) { top.Click(); } } }
public void DateLoad() { SysMenuModel model = new SysMenuModel(); model.ParentID = "0"; List <SysMenuModel> MenuList = SMBll.GetMenuList(model); TopMenu.DataSource = MenuList; TopMenu.DataBind(); }
public void TestUserSearchForValidPost() { var topMenu = new TopMenu(driver); topMenu.SearchPost(Strings.SamplePost); var searchScreen = new SearchScreen(driver); searchScreen.ValidateResults(Strings.SamplePost); }
public void TestUserSearchForInvalidPost() { var topMenu = new TopMenu(driver); topMenu.SearchPost(Strings.InvalidPost); var searchScreen = new SearchScreen(driver); searchScreen.ValidateNothingFoundError(Strings.InvalidPost); }
public ActionResult Delete(int topMenuId) { TopMenu deletedTopMenu = menuRepository.DeleteTopMenu(topMenuId); if (deletedTopMenu != null) { TempData["message"] = MessageHelper.BuildMessage(EnumSevereLevel.Success, string.Format("{0} was deleted!", deletedTopMenu.TopMenuName)); } return(RedirectToAction("List")); }
public void DeActive() { isActive = false; isOpened = false; borderColor = "transparent"; TopMenu.DeActive(); OnOut(); StateHasChanged(); }
public void ExecuteTest_CheckButtonAbout(string expectedResult) { topMenuInstance = mainPageInstance.MoveToTopMenu(); Acts.Click(topMenuInstance.AboutItem); aboutInstance = new About(driver); List <String> actualResult = aboutInstance.GetButtonsName(wait); string lineActualResult = (string.Join(",", actualResult.ToArray())); Console.WriteLine(lineActualResult); Assert.AreEqual(expectedResult, lineActualResult); }
protected override void OnInitialized() { base.OnInitialized(); BackgroundColor = Options.BackgroundColor; textColor = Options.TextColor; if (Options.DefaultActiveIndex == Index) { TopMenu.ActivateItem(this); } }
public TopMenu DeleteTopMenu(int topMenuId) { TopMenu dbEntry = context.TopMenus.Find(topMenuId); if (dbEntry != null) { context.TopMenus.Remove(dbEntry); context.SaveChanges(); } return(dbEntry); }
public void ExecuteTest_ChooseLocationSofia_UsingDoubleClick_LocationPageOpened() { topMenuInstance = mainPageInstance.MoveToTopMenu(); Acts.Click(topMenuInstance.LocationsItem); mainPageInstance.DoubleClick(mainPageInstance.ModalWindow.LocationWindow.CitySofia); string exeptualResultTitle = "Sofia"; groupLocationInstance = new CenterContainer(driver); Console.WriteLine(groupLocationInstance.GroupLocation.Text); Assert.AreEqual(exeptualResultTitle, groupLocationInstance.GroupLocation.Text); }
public void ExecuteTest_LocationPageCloseWithoutChoosing() { topMenuInstance = mainPageInstance.MoveToTopMenu(); Acts.Click(topMenuInstance.LocationsItem); Acts.Click(mainPageInstance.ModalWindow.LocationWindow.CityLviv); Acts.Click(mainPageInstance.ModalWindow.LocationWindow.CancelButton); string exeptualResultTitle = "Dnipro"; groupLocationInstance = new CenterContainer(driver); Console.WriteLine(groupLocationInstance.GroupLocation.Text); Assert.AreEqual(exeptualResultTitle, groupLocationInstance.GroupLocation.Text); }
public void ExecuteTest_ChooseLocationChernivtsy_LocationPageOpened() { topMenuInstance = mainPageInstance.MoveToTopMenu(); Acts.Click(topMenuInstance.LocationsItem); Acts.Click(mainPageInstance.ModalWindow.LocationWindow.CityChernivtsy); Acts.Click(mainPageInstance.ModalWindow.LocationWindow.ConfurmButton); string exeptualResultTitle = "Chernivtsy"; groupLocationInstance = new CenterContainer(driver); Console.WriteLine(groupLocationInstance.GroupLocation.Text); Assert.AreEqual(exeptualResultTitle, groupLocationInstance.GroupLocation.Text); }
internal void ShowTopMenu(bool visible) { if (visible) { TopMenu.Show(); TopMenu.Instance.SetButtonInteractibilites(true); } else { TopMenu.Hide(); } }
public void ExecuteTest_CloseTopMenu() { TopMenu topMenuInstance = mainPageInstance.MoveToTopMenu(); wait.Until((d) => topMenuInstance.IsOpened()); Thread.Sleep(1000); Actions act = new Actions(driver); act.MoveByOffset(0, 200).Build().Perform(); Thread.Sleep(10000); Assert.IsFalse(topMenuInstance.IsOpened()); }
public void ExecuteTest_CancelLocationIvanoFrankivsk_UsingKeyBoard() { topMenuInstance = mainPageInstance.MoveToTopMenu(); Acts.Click(topMenuInstance.LocationsItem); Acts.Click(mainPageInstance.ModalWindow.LocationWindow.CityIvanoFrankivsk); Acts.PressKeyboardButton("{Esc}"); string exeptualResultTitle = "Lviv"; groupLocationInstance = new CenterContainer(driver); Console.WriteLine(groupLocationInstance.GroupLocation.Text); Assert.AreEqual(exeptualResultTitle, groupLocationInstance.GroupLocation.Text); }
public void TestTopMenuComponents() { var topMenu = new TopMenu(driver); topMenu.ClickTwitterIcon(); driver.Navigate(Strings.BaseURL); topMenu.ClickLinkedInIcon(); driver.Navigate(Strings.BaseURL); topMenu.ClickHomeLink(); topMenu.ClickAboutMeLink(); topMenu.SearchPost(Strings.SamplePost); }
public TopMenu UpdateModel(TopMenu entity) { entity.Name = this.Name; entity.OrderNumber = this.OrderNumber; entity.ParentId = this.ParentId; entity.UI_SREF = this.UI_SREF; entity.Icon = this.ICon; entity.Status = this.Status; entity.ModifyBy = CurrentUser.Instance.User.UserName; entity.ModifyDate = DateTime.Now; return(entity); }
static void Main(string[] args) { DataManager dm = new DataManager(); TopMenu tm = new TopMenu(); bool flagExit = false; do { tm.Display(); switch (tm.GetChoice()) { case 1: dm.DisplayTests(); break; case 2: dm.DoingTest(); //dzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz break; case 3: dm.CreateTest(); break; case 4: dm.EditTest(); //dzzzzzzzzzzzzzzzzzzzzzzzzzzzz break; case 5: dm.DeleteTest(); break; case 6: dm.ViewResults(); break; case 7: flagExit = true; break; default: break; } if (flagExit == true) { break; } }while (tm.AllowContinue()); Console.WriteLine("\nПрограмма завершена"); }
protected override void OnInitialized() { base.OnInitialized(); Func<string, bool> matchFunc = TopMenu.Match; if (matchFunc == null) { matchFunc = DefaultMenuMatcher; } if ((!string.IsNullOrWhiteSpace(Options.DefaultActiveIndex) && Options.DefaultActiveIndex == Index) || matchFunc(Route)) { TopMenu.ActivateItem(this); } }
void GEInvalidate() { while (GraphicsDrawing.Running) { //Refreshes graphics Canvas.Invalidate(); TopMenu.Invalidate(); //Reduces lag exponetially by synchronising events Application.DoEvents(); Thread.Sleep(1); } }
public void OnClick() { if (ParentMenu != null && TopMenu.Mode == MenuMode.Horizontal) { _ = ParentMenu.CloseAsync(); } if (!string.IsNullOrEmpty(Route)) { navigationManager.NavigateTo(Route); } TopMenu.ActivateItem(this); }
public int Insert(TopMenu entity) { try { db.TopMenus.Add(entity); db.SaveChanges(); } catch (Exception ex) { throw ex; } return(entity.ID); }
public void ExecuteTest_CheckListDevelopmentAndResearch(string expectedResult) { topMenuInstance = mainPageInstance.MoveToTopMenu(); Acts.Click(topMenuInstance.AboutItem); aboutInstance = new About(driver); Acts.Click(aboutInstance.DevelopmentResearch); List <string> actualResult = aboutInstance.GetTitleGroup(); Console.WriteLine(actualResult); string[] listExpRes = expectedResult.Split(','); List <string> expectedRes = new List <string>(listExpRes); CollectionAssert.AreEqual(expectedRes, actualResult); }