private void Register_Click(object sender, RoutedEventArgs e) { Tuple <bool, string> response = SingleHttpClientInstance.Register(email.Text, password.Password, passwordConfirm.Password); if (response.Item1) { error_msg.Visibility = Visibility.Visible; error_msg.Text = response.Item2; } else { error_msg.Visibility = Visibility.Hidden; new login().Show(); Close(); } }
private void Login_btn_Click(object sender, RoutedEventArgs e) { Tuple <bool, string> result = SingleHttpClientInstance.Login(email.Text, password.Password); if (result.Item1) { error_msg.Visibility = Visibility.Visible; error_msg.Text = result.Item2; } else { error_msg.Visibility = Visibility.Hidden; Application.Current.Properties["token"] = result.Item2; new Tetris.MainWindow().Show(); Close(); } }