Guest User

Untitled

a guest
Nov 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. public void BtnSubmit_OnClick(object sender, RoutedEventArgs e)
  2. {
  3.  
  4.  
  5. if (TxtUsername.Text.Length<3 || TxtPassword.Text.Length<3)
  6. {
  7. MessageBox.Show("You need to fill both boxes!");
  8. }
  9.  
  10. else if (!TxtUsername.Text.Contains("@"))
  11. {
  12. MessageBox.Show("You need to add valiable e-mail adress");
  13. }
  14.  
  15. else
  16. {
  17.  
  18. LblLogin.Content = "Logging in..."; // changes label content
  19.  
  20. sendUsername(); // opens chromedriver and logs us into the website
  21.  
  22. ((MainWindow)Application.Current.MainWindow).tradeUrl = tradeUrl;
  23.  
  24. ((MainWindow) Application.Current.MainWindow).username = username;
  25.  
  26. ((MainWindow) Application.Current.MainWindow).login = TxtUsername.Text;
  27.  
  28. ((MainWindow)Application.Current.MainWindow).password = TxtPassword.Text;
  29. }
  30. }
Add Comment
Please, Sign In to add comment