Exemple #1
0
        private bool CheckIfThisLoginIsInDatabase()
        {
            RealmUserHandler handler = new RealmUserHandler();
            bool             exists  = !handler.CheckIfLoginIsAvailable(LoginTextBox.Text);

            if (!exists)
            {
                MessageBox.Show("Nie ma takiego Loginu", "Błąd", MessageBoxButton.OK, MessageBoxImage.Information);
                LoginTextBox.Text    = "";
                PasswordBox.Password = "";
            }
            return(exists);
        }
Exemple #2
0
        private bool CheckLoginIndivituality()
        {
            bool             output;
            RealmUserHandler handler = new RealmUserHandler();

            output = handler.CheckIfLoginIsAvailable(LoginTextBox.Text);

            if (!output)
            {
                MessageBox.Show("Niestety, podany przez Ciebie login już istnieje.\nPodaj inny login.", "Błąd", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                LoginTextBox.Text = "";
            }
            return(output);
        }