Пример #1
0
        private bool LogIn()
        {
            LogInForm loginForm = new LogInForm();

            if (loginForm.ShowDialog() != DialogResult.OK)
            {
                return(false);
            }

            _username = loginForm.UsernameBox.Text;
            _password = loginForm.PasswordBox.Text;

            SaveSettings();

            return(!(string.IsNullOrEmpty(_username) || string.IsNullOrEmpty(_password)));
        }
Пример #2
0
        private bool LogIn()
        {
            LogInForm loginForm = new LogInForm();
            if (loginForm.ShowDialog() != DialogResult.OK) return false;

            _username = loginForm.UsernameBox.Text;
            _password = loginForm.PasswordBox.Text;

            SaveSettings();

            return (!(string.IsNullOrEmpty(_username) || string.IsNullOrEmpty(_password)));
        }