/// <summary> /// Handles the Load event of the frmEmail control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void frmEmail_Load(object sender, EventArgs e) { if (EmailConfig.All().Count() > 0) { EmailConfig emailConfig = EmailConfig.All().First(); txtSenderEmail.Text = emailConfig.SenderEmail; txtMailSubject.Text = emailConfig.MailSubject; txtSMTPServer.Text = emailConfig.SmtpServer; chkRequireAuthentication.Checked = (bool)emailConfig.Authentication; txtUserName.Text = emailConfig.UserName; txtPassword.Text = emailConfig.UserPassword; } }