public override void Draw(SpriteBatch sb) { if (MenuButton == null) { return; } int buttonLock = ButtonLock; // we only want to get this once bool foundHighlight = false; Vector2 mouse = new Vector2(Main.mouseX, Main.mouseY); Update(); int count = 0; MenuButton.whoAmi = count++; MenuButton.Update(); if (foundHighlight) { MenuButton.Draw(sb, false); } else { if (MenuButton.canMouseOver && !MenuButton.disabled && (buttonLock == -1 || buttonLock == MenuButton.whoAmi)) { foundHighlight = MenuButton.MouseOver(mouse); } if (MenuButton.whoAmi == buttonLock) { foundHighlight = true; } MenuButton.Draw(sb, foundHighlight); if (foundHighlight && Main.mouseLeft) { if (MenuButton.buttonLock) { ButtonLock = MenuButton.whoAmi; } if (Main.mouseLeftRelease) { MenuButton.framesHeld = 0; MenuButton.Click(); } else { MenuButton.framesHeld++; MenuButton.ClickHold(); } } } base.Draw(sb); }
public ContactPage CustomerSupport() { MenuButton.Click(); CustomerButton.Click(); log.Info("Go to CustomerSupportPage"); return(new ContactPage(driver)); }
public void CreateMenu(string title, Page page, bool canClose) { if (menuPages.Keys.Contains(title)) { (UIElement as WindowMain).PageFrame.Content = menuPages[title]; } else { (UIElement as WindowMain).PageFrame.Content = page; MenuButton button = new MenuButton(); button.CanClose = canClose; button.Text = title; button.ButtonStyle = MenuButtonStyle.DGrayBlue; button.Close((s, e) => { menuPages.Remove(title); menuButtons.Remove(title); (UIElement as WindowMain).MenuPanel.Children.Remove(button); if ((UIElement as WindowMain).MenuPanel.Children.Count == 1) { (UIElement as WindowMain).PageFrame.Content = (mainPage.UIElement as Page); } }); button.Click((s, e) => { (UIElement as WindowMain).PageFrame.Content = page; FocusButton(title); }); (UIElement as WindowMain).MenuPanel.Children.Add(button); menuPages.Add(title, page); menuButtons.Add(title, button); } //FocusButton(title); }
/// <summary> /// Opens the dropdown menu and waits for the animation. /// </summary> public void ClickMenuButton() { MenuButton.Click(); WebDriverWait wait = new WebDriverWait(_webDriver, TimeSpan.FromSeconds(10)); wait.Until(browser => ResumeButton.Displayed == true); }
public void CustomerClickMenuButton() { screenshot screens = new screenshot(); MenuButton.Click(); screens.Takescreenshot4("filename"); //CartImg.Click(); //Console.WriteLine("The item that the customer chose is " + ItemName.Text); }
public void GetMenu() { MenuButton.Click(); foreach (IWebElement item in driver.FindElements(By.CssSelector("li[id]>a.parent"))) { MenuComponent menu = new MenuComponent(); menu.MenuButton = item; menu.MenuLabel = item.FindElement(By.XPath("./span")).Text; Menus.Add(menu.MenuLabel, menu); } //MenuButton.Click(); }
public void ClickBatchRevertButton() { BatchRevertButton.Click(); }
public void ClickBatchIgnoreButton() { BatchIgnoreButton.Click(); }
public void ClickBatchModifyButton() { BatchModifyButton.Click(); }
public void ClickRankTypeConvertTargetButton() { RankTypeConvertTargetButton.Click(); }
public void ClickFuncModeConvertTargetButton() { FuncModeConvertTargetButton.Click(); }