private void ThisAddIn_Startup(object sender, System.EventArgs e) { // Load preferences. preferences = new MalwareForwarderPreferences(); // Load this once, it is used many times. currentUser = this.Application.ActiveExplorer().Session.CurrentUser; }
public ConfigDialogControl() { // Create a working copy of the preferences. workingPreferences = new MalwareForwarderPreferences(Globals.ThisAddIn.preferences); // Specify the DataContext. this.DataContext = workingPreferences; InitializeComponent(); }
// Copy Constructor. public MalwareForwarderPreferences(MalwareForwarderPreferences p) { DefaultSubjectMalware = p.DefaultSubjectMalware; DefaultSubjectSpam = p.DefaultSubjectSpam; ForwardingEmailAddressMalware = p.ForwardingEmailAddressMalware; ForwardingEmailAddressSpam = p.ForwardingEmailAddressSpam; ShowMalwareButton = p.ShowMalwareButton; ShowSpamButton = p.ShowSpamButton; DeleteSubmittedItems = p.DeleteSubmittedItems; SaveSubmittedInSent = p.SaveSubmittedInSent; }