private void cmbTemplate_SelectedIndexChanged(object sender, EventArgs e) { try { if (cmbTemplate.SelectedItem != null) { var item = (SupportedPluginComponent)cmbTemplate.SelectedItem; ActiveTemplate = (IGeneratorTemplate)item.Item; if (!ActiveTemplate.IsLoaded) { ActiveTemplate.Load(Project.Name); } cmbComponent.DataSource = PluginsManager.GetComponents(item); cmbComponent.DisplayMember = "Name"; cmbComponent.ValueMember = "Id"; lnkTemplateOptions.Visible = PluginsManager.CheckIfPluginHaveOptions(item); PluginsManager.UpdateProjectSettingsForPlugin(item, Project); } else { ActiveTemplate = null; cmbComponent.DataSource = null; lnkTemplateOptions.Visible = false; } EnableButtons(); } catch (Exception ex) { MessageBoxHelper.ProcessException(ex); } }