From f64e0c7eb764a930cf1c19807c2f02a86cf4140b Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Wed, 10 Apr 2013 02:17:02 +0600 Subject: [PATCH] updates #U4-2070 for autodoc.aspx --- .../umbraco/developer/autoDoc.aspx.cs | 41 ++++++------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs index 352b4c7ca6..3484a4504e 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs @@ -9,6 +9,7 @@ using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Linq; +using umbraco.BusinessLogic; namespace umbraco.developer { @@ -17,56 +18,40 @@ namespace umbraco.developer /// public partial class autoDoc : BasePages.UmbracoEnsuredPage { - - protected void Page_Load(object sender, System.EventArgs e) + public autoDoc() + { + CurrentApp = DefaultApps.developer.ToString(); + } + + protected void Page_Load(object sender, EventArgs e) { // Put user code to initialize the page here - foreach(cms.businesslogic.web.DocumentType dt in cms.businesslogic.web.DocumentType.GetAllAsList()) + foreach(var dt in cms.businesslogic.web.DocumentType.GetAllAsList()) { LabelDoc.Text += "

" + dt.Text + "

Id: " + dt.Id.ToString() + ", Alias: " + dt.Alias + ")

"; if (dt.PropertyTypes.Count > 0) LabelDoc.Text += "

Property Types:

"; - foreach (cms.businesslogic.propertytype.PropertyType pt in dt.PropertyTypes) + foreach (var pt in dt.PropertyTypes) LabelDoc.Text += "

" + pt.Id.ToString() + ", " + pt.Alias + ", " + pt.Name + "

"; if (dt.getVirtualTabs.Length > 0) LabelDoc.Text += "

Tabs:

"; - foreach (cms.businesslogic.ContentType.TabI t in dt.getVirtualTabs.ToList()) + foreach (var t in dt.getVirtualTabs.ToList()) LabelDoc.Text += "

" + t.Id.ToString() + ", " + t.Caption + "

"; if (dt.AllowedChildContentTypeIDs.Length > 0) LabelDoc.Text += "

Allowed children:

"; - foreach (int child in dt.AllowedChildContentTypeIDs.ToList()) + foreach (var child in dt.AllowedChildContentTypeIDs.ToList()) { - cms.businesslogic.ContentType _child = new cms.businesslogic.ContentType(child); + var contentType = new cms.businesslogic.ContentType(child); LabelDoc.Text += - "

" + _child.Id.ToString() + ", " + _child.Text + "

"; + "

" + contentType.Id.ToString() + ", " + contentType.Text + "

"; } LabelDoc.Text += "
"; - } } - #region Web Form Designer generated code - override protected void OnInit(EventArgs e) - { - // - // CODEGEN: This call is required by the ASP.NET Web Form Designer. - // - InitializeComponent(); - base.OnInit(e); - } - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - - } - #endregion } }