예제 #1
0
        private void tbUsername_TextChanged(object sender, EventArgs e)
        {
            credentials.Username = tbUsername.Text;
            CredentialsDialog credDlg = (CredentialsDialog)this.Parent;

            credDlg.OKBtn.Enabled = false;

            if (!string.IsNullOrEmpty(credentials.Username))
            {
                credDlg.OKBtn.Enabled = true;
            }
        }
예제 #2
0
        private void rbUseCurrentUserCreds_CheckedChanged(object sender, EventArgs e)
        {
            tbUsername.Enabled = false;
            tbUsername.Text    = "";
            tbPassword.Enabled = false;
            tbPassword.Text    = "";

            credentials.UseDefaultUserCreds = rbUseCurrentUserCreds.Checked;

            CredentialsDialog credDlg = (CredentialsDialog)this.Parent;

            credDlg.OKBtn.Enabled = true;
        }
예제 #3
0
        private void rbUseTheseCreds_CheckedChanged(object sender, EventArgs e)
        {
            groupBox.Enabled   = rbUseTheseCreds.Checked;
            tbUsername.Enabled = groupBox.Enabled;
            tbPassword.Enabled = groupBox.Enabled;

            CredentialsDialog credDlg = (CredentialsDialog)this.Parent;

            credDlg.OKBtn.Enabled = false;
            if (tbUsername.Enabled == true && !string.IsNullOrEmpty(credentials.Username))
            {
                credDlg.OKBtn.Enabled = true;
            }
        }
예제 #4
0
 public SelectDomainDialog(string domain, string username)
     : this()
 {
     if (bUseDefaultDomain)
     {
         rbDefaultDomain.Checked = true;
         tbDomain.Text           = "";
     }
     else
     {
         sUsername             = username;
         tbDomain.Text         = domain;
         rbOtherDomain.Checked = true;
     }
     credsDialog = new CredentialsDialog(username);
 }
예제 #5
0
 private void linkCreds_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     credsDialog = new CredentialsDialog(sUsername);
     credsDialog.ShowDialog(this);
 }