void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.DlgSmtp = ((PNotes.NET.WndSmtp)(target)); #line 19 "..\..\WndSmtp.xaml" this.DlgSmtp.Loaded += new System.Windows.RoutedEventHandler(this.DlgSmtp_Loaded); #line default #line hidden return; case 2: this.lblSmtpHost = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.txtSmtpHost = ((System.Windows.Controls.TextBox)(target)); #line 23 "..\..\WndSmtp.xaml" this.txtSmtpHost.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtSmtpHost_TextChanged); #line default #line hidden return; case 4: this.lblSmtpAddress = ((System.Windows.Controls.TextBlock)(target)); return; case 5: this.txtSmtpAddress = ((System.Windows.Controls.TextBox)(target)); #line 25 "..\..\WndSmtp.xaml" this.txtSmtpAddress.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtSmtpAddress_TextChanged); #line default #line hidden return; case 6: this.lblSmtpDisplayName = ((System.Windows.Controls.TextBlock)(target)); return; case 7: this.txtSmtpDisplayName = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.lblSmtpPort = ((System.Windows.Controls.TextBlock)(target)); return; case 9: this.txtSmtpPort = ((System.Windows.Controls.TextBox)(target)); #line 29 "..\..\WndSmtp.xaml" this.txtSmtpPort.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtSmtpPort_TextChanged); #line default #line hidden #line 29 "..\..\WndSmtp.xaml" this.txtSmtpPort.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.txtSmtpPort_PreviewKeyDown); #line default #line hidden return; case 10: this.lblSmtpPassword = ((System.Windows.Controls.TextBlock)(target)); return; case 11: this.txtSmtpPassword = ((System.Windows.Controls.PasswordBox)(target)); #line 37 "..\..\WndSmtp.xaml" this.txtSmtpPassword.PasswordChanged += new System.Windows.RoutedEventHandler(this.txtSmtpPassword_PasswordChanged); #line default #line hidden return; case 12: this.txtKey = ((System.Windows.Controls.TextBox)(target)); return; case 13: this.chkSmtpShowPassword = ((System.Windows.Controls.CheckBox)(target)); #line 39 "..\..\WndSmtp.xaml" this.chkSmtpShowPassword.Checked += new System.Windows.RoutedEventHandler(this.chkSmtpShowPassword_Checked); #line default #line hidden #line 39 "..\..\WndSmtp.xaml" this.chkSmtpShowPassword.Unchecked += new System.Windows.RoutedEventHandler(this.chkSmtpShowPassword_Checked); #line default #line hidden return; case 14: this.cmdOK = ((System.Windows.Controls.Button)(target)); #line 45 "..\..\WndSmtp.xaml" this.cmdOK.Click += new System.Windows.RoutedEventHandler(this.cmdOK_Click); #line default #line hidden return; case 15: this.cmdCancel = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
private void cmdAddSmtp_Click(object sender, RoutedEventArgs e) { try { var smtpDlg = new WndSmtp(null) { Owner = this }; smtpDlg.SmtpChanged += smtpDlg_SmtpChanged; var showDialog = smtpDlg.ShowDialog(); if (showDialog == null || !showDialog.Value) smtpDlg.SmtpChanged -= smtpDlg_SmtpChanged; } catch (Exception ex) { PNStatic.LogException(ex); } }
private void editSmtp() { try { var smtp = getSelectedSmtp(); if (smtp == null) return; var smtpDlg = new WndSmtp(smtp) { Owner = this }; smtpDlg.SmtpChanged += smtpDlg_SmtpChanged; var showDialog = smtpDlg.ShowDialog(); if (showDialog == null || !showDialog.Value) smtpDlg.SmtpChanged -= smtpDlg_SmtpChanged; } catch (Exception ex) { PNStatic.LogException(ex); } }