private void BtnSubmit_Click(object sender, RoutedEventArgs e) { if (UserSettings.AuthUser(ref userAuth, tbxLogin.Text, pbxPassword.Password, out message)) { MainWindow._MainMenu.Visibility = Visibility.Visible; MainWindow._MainFrame.Navigate(new PageWelcome(userAuth)); MainMenu.GetMenu(); } else { //MessageBox.Show(message); tbErrMes.Text = message; tbErrMes.Visibility = Visibility.Visible; } }