예제 #1
0
        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();
        }
예제 #2
0
 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();
 }
예제 #3
0
        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();
        }