// icon view event handlers void SelectedIndexChange(object sender, EventArgs e) { if (templateView.CurrentlySelected != null) { ProjectTemplate ptemplate = (ProjectTemplate)templateView.CurrentlySelected; lbl_template_descr.Text = StringParserService.Parse(ptemplate.Description); labelTemplateTitle.Markup = "<b>" + GLib.Markup.EscapeText(ptemplate.Name) + "</b>"; if (ptemplate.SolutionDescriptor.EntryDescriptors.Length == 0) { txt_subdirectory.Sensitive = false; chk_combine_directory.Sensitive = false; lbl_subdirectory.Sensitive = false; btn_new.Label = Gtk.Stock.Ok; } else { txt_subdirectory.Sensitive = true; chk_combine_directory.Sensitive = true; lbl_subdirectory.Sensitive = true; txt_subdirectory.Text = txt_name.Text; ProjectCreateInformation cinfo = CreateProjectCreateInformation(); if (ptemplate.HasItemFeatures(parentFolder, cinfo)) { btn_new.Label = Gtk.Stock.GoForward; } else { btn_new.Label = Gtk.Stock.Ok; } } } else { lbl_template_descr.Text = String.Empty; labelTemplateTitle.Text = ""; } PathChanged(null, null); }
// icon view event handlers void SelectedIndexChange(object sender, EventArgs e) { try { btn_new.Sensitive = true; txt_name.Sensitive = true; txt_subdirectory.Sensitive = true; chk_combine_directory.Sensitive = true; entry_location.Sensitive = true; if (templateView.CurrentlySelected != null) { ProjectTemplate ptemplate = (ProjectTemplate)templateView.CurrentlySelected; lbl_template_descr.Text = StringParserService.Parse(ptemplate.Description); labelTemplateTitle.Markup = "<b>" + GLib.Markup.EscapeText(ptemplate.Name) + "</b>"; if (ptemplate.SolutionDescriptor.EntryDescriptors.Length == 0) { txt_subdirectory.Sensitive = false; chk_combine_directory.Sensitive = false; lbl_subdirectory.Sensitive = false; btn_new.Label = Gtk.Stock.Ok; } else { lbl_subdirectory.Sensitive = true; txt_subdirectory.Text = txt_name.Text; ProjectCreateInformation cinfo = CreateProjectCreateInformation(); if (ptemplate.HasItemFeatures(parentFolder, cinfo)) { btn_new.Label = Gtk.Stock.GoForward; } else { btn_new.Label = Gtk.Stock.Ok; } } } else { lbl_template_descr.Text = String.Empty; labelTemplateTitle.Text = ""; } PathChanged(null, null); btn_new.GrabDefault(); } catch (Exception ex) { txt_name.Sensitive = false; btn_new.Sensitive = false; txt_subdirectory.Sensitive = false; chk_combine_directory.Sensitive = false; entry_location.Sensitive = false; while (ex is TargetInvocationException) { ex = ((TargetInvocationException)ex).InnerException; } if (ex is UserException) { var user = (UserException)ex; MessageService.ShowError(user.Message, user.Details); } else { MessageService.ShowException(ex); }; } }