CopyOperation() { emailNotifications = new EmailErrorNotification(); targets = new TargetCollection(); emailNotifications.AddRecipient("*****@*****.**"); }
btnRemoveRecipient_Click( object sender, RoutedEventArgs e) { EmailErrorNotification een = configuration.CopyGroupInstance.CopyOperation.EmailErrorNotification; een.RemoveRecipient((string)lbRecipients.SelectedItem); lbRecipients.Items.RemoveAt(lbRecipients.SelectedIndex); btnRemoveRecipient.IsEnabled = false; }
btnAddRecipient_Click( object sender, RoutedEventArgs e) { EmailErrorNotification een = configuration.CopyGroupInstance.CopyOperation.EmailErrorNotification; if (tbRecipientAddress.Text.Length == 0) { return; } een.AddRecipient(tbRecipientAddress.Text); lbRecipients.Items.Add(tbRecipientAddress.Text); tbRecipientAddress.Text = ""; }
SynchronizeEmailNotifications() { EmailErrorNotification een = configuration.CopyGroupInstance.CopyOperation.EmailErrorNotification; SenderConfiguration sc = een.SenderConfiguration; tbSendingFrom.Text = sc.ReplyToAddress; tbSmtpServer.Text = sc.ServerAddress; tbSmtpPort.Text = sc.ServerPort; tbSmtpUsername.Text = sc.Credential.Username; tbSmtpPassword.Text = sc.Credential.Password; chbUseSsl.IsChecked = sc.UsingSsl; foreach (String m in een.Recipients) { lbRecipients.Items.Add(m); } }