private void Button_Click(object sender, RoutedEventArgs e) { string email = new TextRange(EmailBox.Document.ContentStart, EmailBox.Document.ContentEnd).Text; email = email.Replace(Environment.NewLine, ""); string password = PasswordBox.Password.ToString(); password = password.Replace(Environment.NewLine, ""); bool valido = login(email, password); if (valido) { if (currentUser.tipoConta == 2) { ChooseAccountType chooseaccountPage = new ChooseAccountType(); this.NavigationService.Navigate(chooseaccountPage); } else { HomePage_Client homeclientPage = new HomePage_Client(); this.NavigationService.Navigate(homeclientPage); } } else { MessageBox.Show("Email e/ou password são inválidos"); } }
private void ListViewItem_PreviewMouseLeftButtonDown_4(object sender, MouseButtonEventArgs e) { ChooseAccountType page = new ChooseAccountType(); this.NavigationService.Navigate(page); }