コード例 #1
0
        private void toolStripButtonAuthType_Click(object sender, EventArgs e)
        {
            frmAuthentication frmAuth = new frmAuthentication();

            if (frmAuth.ShowDialog() == DialogResult.OK)
            {
                this.netCred.UserName = frmAuth.textBoxUsername.Text;
                this.netCred.Password = frmAuth.textBoxPassword.Text;
                if (!(frmAuth.textBoxDomain.Text == string.Empty))
                {
                    this.netCred.Domain = frmAuth.textBoxDomain.Text;
                }
            }
        }
コード例 #2
0
 private void toolStripButtonAuthType_Click(object sender, EventArgs e)
 {
     frmAuthentication frmAuth = new frmAuthentication();
     if (frmAuth.ShowDialog() == DialogResult.OK)
     {
         this.netCred.UserName = frmAuth.textBoxUsername.Text;
         this.netCred.Password = frmAuth.textBoxPassword.Text;
         if (!(frmAuth.textBoxDomain.Text == string.Empty))
             this.netCred.Domain = frmAuth.textBoxDomain.Text;
     }
 }