public AddViewDialog(AspNetAppProject project) { this.project = project; Build(); provider = project.LanguageBinding.GetCodeDomProvider(); var viewEngines = GetProperViewEngines(); loadedTemplateList = new Dictionary <string, IList <string> > (); foreach (var engine in viewEngines) { viewEngineCombo.AppendText(engine); loadedTemplateList[engine] = project.GetCodeTemplates("AddView", engine); } viewEngineCombo.Active = 0; InitializeTemplateStore(loadedTemplateList); ContentPlaceHolders = new List <string> (); string siteMaster = project.VirtualToLocalPath("~/Views/Shared/Site.master", null); if (project.Files.GetFile(siteMaster) != null) { masterEntry.Text = "~/Views/Shared/Site.master"; } placeholderCombo.Model = primaryPlaceholderStore; UpdateTypePanelSensitivity(null, null); UpdateMasterPanelSensitivity(null, null); Validate(); }
public string GetUserControlTypeName(string virtualPath) { string typeName = null; if (project != null && doc != null) { string absolute = project.VirtualToLocalPath(virtualPath, doc.FileName); typeName = project.GetCodebehindTypeName(absolute); } return(typeName ?? "System.Web.UI.UserControl"); }