Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void BtnSubmit_OnClick(object sender, RoutedEventArgs e)
- {
- if (TxtUsername.Text.Length<3 || TxtPassword.Text.Length<3)
- {
- MessageBox.Show("You need to fill both boxes!");
- }
- else if (!TxtUsername.Text.Contains("@"))
- {
- MessageBox.Show("You need to add valiable e-mail adress");
- }
- else
- {
- LblLogin.Content = "Logging in..."; // changes label content
- sendUsername(); // opens chromedriver and logs us into the website
- ((MainWindow)Application.Current.MainWindow).tradeUrl = tradeUrl;
- ((MainWindow) Application.Current.MainWindow).username = username;
- ((MainWindow) Application.Current.MainWindow).login = TxtUsername.Text;
- ((MainWindow)Application.Current.MainWindow).password = TxtPassword.Text;
- }
- }
Add Comment
Please, Sign In to add comment