/// <summary> /// Method, which find needed buttons ,and send message /// </summary> /// <param name="answerpsevdonim"></param> public void TextingAnswerMessageToMail(string answerpsevdonim) { Wait.Until(t => Driver.FindElements(By.XPath(Locator.AnswerButtonLocator)).Any()); IncomingButton = Driver.FindElement(By.XPath(Locator.AnswerButtonLocator)); IncomingButton.Click(); Wait.Until(t => Driver.FindElements(By.XPath(Locator.TextBoxLocator)).Any()); TextBoxLabel = Driver.FindElement(By.XPath(Locator.TextBoxLocator)); TextBoxLabel.SendKeys(answerpsevdonim); Wait.Until(t => Driver.FindElements(By.XPath(Locator.SendButtonLocator)).Any()); SendButton = Driver.FindElement(By.XPath(Locator.SendButtonLocator)); SendButton.Click(); }
bool IsValid() { bool isValid = true; if (string.IsNullOrEmpty(TextBoxLabel.Text.CleanText())) { isValid = false; SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Invalid Phasor Label", SystemMessage = "Please provide valid phasor Label.", UserMessageType = MessageType.Error }, ButtonType.OkOnly); sm.Closed += new EventHandler(delegate(object sender, EventArgs e) { TextBoxLabel.Focus(); }); #if !SILVERLIGHT sm.Owner = Window.GetWindow(this); #endif sm.ShowPopup(); return(isValid); } if (!TextBoxSourceIndex.Text.IsInteger()) { isValid = false; SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Invalid Phasor Source Index", SystemMessage = "Please provide valid integer value for Phasor Source Index.", UserMessageType = MessageType.Error }, ButtonType.OkOnly); sm.Closed += new EventHandler(delegate(object sender, EventArgs e) { TextBoxSourceIndex.Focus(); }); #if !SILVERLIGHT sm.Owner = Window.GetWindow(this); #endif sm.ShowPopup(); return(isValid); } return(isValid); }
bool IsValid() { bool isValid = true; if (string.IsNullOrEmpty(TextBoxLabel.Text.CleanText())) { isValid = false; SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Invalid Label", SystemMessage = "Please provide valid Label.", UserMessageType = MessageType.Error }, ButtonType.OkOnly); sm.Closed += new EventHandler(delegate(object sender, EventArgs e) { TextBoxLabel.Focus(); }); #if !SILVERLIGHT sm.Owner = Window.GetWindow(this); sm.WindowStartupLocation = WindowStartupLocation.CenterOwner; #endif sm.ShowPopup(); return(isValid); } if (!TextBoxLoadOrder.Text.IsInteger()) { isValid = false; SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Invalid Load Order", SystemMessage = "Please provide valid integer value for Load Order.", UserMessageType = MessageType.Error }, ButtonType.OkOnly); sm.Closed += new EventHandler(delegate(object sender, EventArgs e) { TextBoxLoadOrder.Text = "0"; TextBoxLoadOrder.Focus(); }); #if !SILVERLIGHT sm.Owner = Window.GetWindow(this); sm.WindowStartupLocation = WindowStartupLocation.CenterOwner; #endif sm.ShowPopup(); return(isValid); } if (!TextBoxScalingValue.Text.IsInteger()) { isValid = false; SystemMessages sm = new SystemMessages(new Message() { UserMessage = "Invalid Scaling Value", SystemMessage = "Please provide valid integer value for Scaling Value.", UserMessageType = MessageType.Error }, ButtonType.OkOnly); sm.Closed += new EventHandler(delegate(object sender, EventArgs e) { TextBoxScalingValue.Text = "0"; TextBoxScalingValue.Focus(); }); #if !SILVERLIGHT sm.Owner = Window.GetWindow(this); sm.WindowStartupLocation = WindowStartupLocation.CenterOwner; #endif sm.ShowPopup(); return(isValid); } return(isValid); }
private void DataGridList_SelectionChanged(object sender, SelectionChangedEventArgs e) { TextBoxLabel.ScrollToHome(); }