Beispiel #1
0
 private void dlgChoose_MailRecipientsChosen(object sender, MailRecipientsChosenEventArgs e)
 {
     try
     {
         var d = sender as WndChooseMailContacts;
         if (d != null)
         {
             d.MailRecipientsChosen -= dlgChoose_MailRecipientsChosen;
         }
         var recips = string.Join("; ", e.Recipients.Select(r => r.Address).ToArray());
         if (txtSmtpRecipients.Text.Trim().EndsWith(";"))
         {
             txtSmtpRecipients.AppendText(recips);
         }
         else
         {
             if (txtSmtpRecipients.Text.Trim().Length > 0)
             {
                 txtSmtpRecipients.AppendText("; " + recips);
             }
             else
             {
                 txtSmtpRecipients.AppendText(recips);
             }
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }
 private void dlgChoose_MailRecipientsChosen(object sender, MailRecipientsChosenEventArgs e)
 {
     try
     {
         var d = sender as WndChooseMailContacts;
         if (d != null) d.MailRecipientsChosen -= dlgChoose_MailRecipientsChosen;
         var recips = string.Join("; ", e.Recipients.Select(r => r.Address).ToArray());
         if (txtSmtpRecipients.Text.Trim().EndsWith(";"))
             txtSmtpRecipients.AppendText(recips);
         else
         {
             if (txtSmtpRecipients.Text.Trim().Length > 0)
                 txtSmtpRecipients.AppendText("; " + recips);
             else
                 txtSmtpRecipients.AppendText(recips);
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }