private bool ValidarCredenciais() { if (string.IsNullOrEmpty(txtDominio.Text)) { ExibeMensagem("Informe o dominio", MessageBoxButtons.OK, MessageBoxIcon.Information); txtDominio.Focus(); return(false); } if (string.IsNullOrEmpty(txtLogin.Text)) { ExibeMensagem("Informe o Login", MessageBoxButtons.OK, MessageBoxIcon.Information); txtLogin.Focus(); return(false); } if (string.IsNullOrEmpty(txtSenha.Text)) { ExibeMensagem("Informe a senha", MessageBoxButtons.OK, MessageBoxIcon.Information); txtSenha.Focus(); return(false); } Credential = new CredentialDto { Domain = txtDominio.Text, Username = txtLogin.Text, Password = txtSenha.Text }; SalvarCredenciais(); return(true); }
public FrmCreateProcessRemote() { InitializeComponent(); workstations = new List <WorkstationDto>(); Credential = new CredentialDto(); sbError = new StringBuilder(); sbInformation = new StringBuilder(); string version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); Text += $" - Versão .:{version}"; GetCredencial(); }