private void Click_Login(object sender, RoutedEventArgs e) { if (userRestClient.Login(usernameTextbox.Text, passwordTextbox.Password.ToString())) { mainVM.CurrentControl = new Chat(mainVM, userRestClient); mainVM.HideButtons(); } else { errorLabel.Content = "Credentials are invalid!"; } }
private void Click_Login(object sender, RoutedEventArgs e) { UserRestClient userRestClient = new UserRestClient(-1); //usernameTextbox.Text //passwordTextbox.Password.ToString() if (userRestClient.Login("admin", "admin")) { mainVM.CurrentControl = new Editor(userRestClient.CurrentUser); } else { errorLabel.Content = "Credentials are invalid!"; } }