LogIn() public méthode

public LogIn ( string account, string password ) : bool
account string
password string
Résultat bool
Exemple #1
0
        private void Login(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(_emailBox.Text))
            {
                Settings.Default.WebUserId   = _emailBox.Text;
                Settings.Default.WebPassword = _passwordBox.Text;                 // Review: password is saved in clear text. Is this a security risk? How could we prevent it?
                Settings.Default.Save();
            }
            if (_doingSignup)
            {
                DoSignUp();
                return;
            }
            bool logIn;

            try
            {
                logIn = _client.LogIn(_emailBox.Text, _passwordBox.Text);
            }
            catch (Exception)
            {
                MessageBox.Show(this, LocalizationManager.GetString("PublishTab.Upload.Login.LoginConnectFailed", "Bloom could not connect to the server to verify your login. Please check your network connection."),
                                LocalizationManager.GetString("PublishTab.Upload.Login.LoginFailed", "Login failed"),
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
                return;
            }
            if (logIn)
            {
                DialogResult = DialogResult.OK;
                Close();
            }
            else
            {
                MessageBox.Show(this, LocalizationManager.GetString("PublishTab.Upload.Login.PasswordMismatch", "Password and user ID did not match"),
                                LocalizationManager.GetString("PublishTab.Upload.Login.LoginFailed", "Login failed"),
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
            }
        }
Exemple #2
0
        private void Login(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(_emailBox.Text))
            {
                Settings.Default.WebUserId   = _emailBox.Text;
                Settings.Default.WebPassword = _passwordBox.Text;                 // Review: password is saved in clear text. Is this a security risk? How could we prevent it?
                Settings.Default.Save();
            }
            if (_doingSignup)
            {
                DoSignUp();
                return;
            }
            bool logIn;

            try
            {
                logIn = _client.LogIn(_emailBox.Text, _passwordBox.Text);
            }
            catch (Exception exc)
            {
                LogAndInformButDontReportFailureToConnectToServer(exc);
                return;
            }
            if (logIn)
            {
                DialogResult = DialogResult.OK;
                Close();
            }
            else
            {
                MessageBox.Show(this, LocalizationManager.GetString("PublishTab.Upload.Login.PasswordMismatch", "Password and user ID did not match"),
                                LoginFailureString,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
            }
        }
Exemple #3
0
 public bool LogIn(string account, string password)
 {
     return(_parseClient.LogIn(account, password));
 }