示例#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)));
        }