private void BtnTemplateStartClick(object sender, System.EventArgs e)
 {
     var dlg = new FormulaParameterForm((BaseCodeTemplate) cbTemplates.SelectedItem);
     if (dlg.ShowDialog() != DialogResult.OK) return;
     var template = dlg.CodeTemplate;
     codeEditor.Text = template.MakeFormula();
 }
        private void BtnTemplateStartClick(object sender, System.EventArgs e)
        {
            var dlg = new FormulaParameterForm((BaseCodeTemplate)cbTemplates.SelectedItem);

            if (dlg.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            var template = dlg.CodeTemplate;

            codeEditor.Text = template.MakeFormula();
        }