private void butAdd_Click(object sender, System.EventArgs e) { FormEmailTemplateEdit FormE = new FormEmailTemplateEdit(); FormE.IsNew = true; FormE.ETcur = new EmailTemplate(); FormE.ShowDialog(); if (FormE.DialogResult != DialogResult.OK) { return; } EmailTemplates.Refresh(); templatesChanged = true; FillList(); }
private void butDeleteTemplate_Click(object sender, System.EventArgs e) { if (listTemplates.SelectedIndex == -1) { MessageBox.Show(Lan.g(this, "Please select an item first.")); return; } if (MessageBox.Show(Lan.g(this, "Delete e-mail template?"), "", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } EmailTemplates.Delete(EmailTemplates.List[listTemplates.SelectedIndex]); EmailTemplates.Refresh(); templatesChanged = true; FillList(); }
private void listTemplates_DoubleClick(object sender, System.EventArgs e) { if (listTemplates.SelectedIndex == -1) { return; } FormEmailTemplateEdit FormE = new FormEmailTemplateEdit(); FormE.ETcur = EmailTemplates.List[listTemplates.SelectedIndex]; FormE.ShowDialog(); if (FormE.DialogResult != DialogResult.OK) { return; } EmailTemplates.Refresh(); templatesChanged = true; FillList(); }