DataHubServicesAddin.Dialogs.ConfigureLocatorForm.chkUseCurrentCredntials_CheckedChanged C# (CSharp) Method

chkUseCurrentCredntials_CheckedChanged() private method

Handles the CheckedChanged event of the chkUseCurrentCredntials control.
private chkUseCurrentCredntials_CheckedChanged ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
return void
        private void chkUseCurrentCredntials_CheckedChanged(object sender, EventArgs e)
        {
            try
            {
                bool usernamePasswordNeeded = !chkUseCurrentCredntials.Checked;

                txtUsername.Enabled = usernamePasswordNeeded;
                txtPassword.Enabled = usernamePasswordNeeded;
                InvalidateWebService();
                ConfigureUI();
            }
            catch (Exception)
            {

            }
        }