From 7417e1706e01f11e40af1300b1afddbdf77988a5 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 27 Jun 2013 15:27:05 +1000 Subject: [PATCH] Fixed naming conventions and changed new classes to internal since we shouldn't expose these publicly (they are already legacy) --- src/umbraco.controls/DataAttributes.cs | 2 +- src/umbraco.controls/MenuButton.cs | 9 +++++---- src/umbraco.controls/MenuSplitButton.cs | 2 +- src/umbraco.controls/Properties/AssemblyInfo.cs | 3 ++- src/umbraco.controls/PropertyGroup.cs | 8 ++++---- src/umbraco.controls/ScrollingMenu.cs | 4 ++-- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/umbraco.controls/DataAttributes.cs b/src/umbraco.controls/DataAttributes.cs index e704844f28..f600c12de1 100644 --- a/src/umbraco.controls/DataAttributes.cs +++ b/src/umbraco.controls/DataAttributes.cs @@ -8,7 +8,7 @@ using System.Web.UI.WebControls; namespace umbraco.uicontrols { - public class DataAttributes : Dictionary + internal class DataAttributes : Dictionary { public DataAttributes() { diff --git a/src/umbraco.controls/MenuButton.cs b/src/umbraco.controls/MenuButton.cs index 72e08c91c3..33b33d2b3f 100644 --- a/src/umbraco.controls/MenuButton.cs +++ b/src/umbraco.controls/MenuButton.cs @@ -2,13 +2,14 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using Umbraco.Core.IO; namespace umbraco.uicontrols { - public class MenuButton : System.Web.UI.WebControls.LinkButton + internal class MenuButton : System.Web.UI.WebControls.LinkButton { public MenuButtonType ButtonType { get; set; } - public DataAttributes Data { get; private set; } + internal DataAttributes Data { get; private set; } public string Hotkey { get; set; } public string Icon { get; set; } @@ -25,7 +26,7 @@ namespace umbraco.uicontrols //setup a hotkey if present if (ButtonType == MenuButtonType.Primary && String.IsNullOrEmpty(Hotkey)) Data.Add("shortcut", "ctrl+" + this.Text.ToLower()[0]); - else if (!String.IsNullOrEmpty(Hotkey)) + else if (!string.IsNullOrEmpty(Hotkey)) Data.Add("shortcut", Hotkey); Data.AppendTo(this); @@ -42,7 +43,7 @@ namespace umbraco.uicontrols this.ToolTip = this.Text; if (i.Contains(".")) - this.Text = "" + this.ToolTip + " " + this.ToolTip; + this.Text = "" + this.ToolTip + " " + this.ToolTip; else this.Text = " " + this.ToolTip; } diff --git a/src/umbraco.controls/MenuSplitButton.cs b/src/umbraco.controls/MenuSplitButton.cs index 86d871cddf..64b553ee6b 100644 --- a/src/umbraco.controls/MenuSplitButton.cs +++ b/src/umbraco.controls/MenuSplitButton.cs @@ -7,7 +7,7 @@ using System.Web.UI.WebControls; namespace umbraco.uicontrols { - public class MenuSplitButton : Panel + internal class MenuSplitButton : Panel { public string Text { get; set; } diff --git a/src/umbraco.controls/Properties/AssemblyInfo.cs b/src/umbraco.controls/Properties/AssemblyInfo.cs index 30ddd358fd..b8ff4679ef 100644 --- a/src/umbraco.controls/Properties/AssemblyInfo.cs +++ b/src/umbraco.controls/Properties/AssemblyInfo.cs @@ -18,4 +18,5 @@ using System.Runtime.InteropServices; // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("1292737a-7e2d-464a-9850-9380792f668e")] -[assembly: InternalsVisibleTo("Umbraco.Web.UI")] \ No newline at end of file +[assembly: InternalsVisibleTo("Umbraco.Web.UI")] +[assembly: InternalsVisibleTo("umbraco")] \ No newline at end of file diff --git a/src/umbraco.controls/PropertyGroup.cs b/src/umbraco.controls/PropertyGroup.cs index 7220e78993..c1972e8fbd 100644 --- a/src/umbraco.controls/PropertyGroup.cs +++ b/src/umbraco.controls/PropertyGroup.cs @@ -34,17 +34,17 @@ namespace umbraco.uicontrols writer.WriteLine(""); } - public void addProperty(string Caption, Control C) + public void AddProperty(string caption, Control c) { PropertyPanel pp = new PropertyPanel(); - pp.Controls.Add(C); - pp.Text = Caption; + pp.Controls.Add(c); + pp.Text = caption; this.Controls.Add(pp); } - public void addProperty(Control ctrl) + public void AddProperty(Control ctrl) { PropertyPanel pp = new PropertyPanel(); diff --git a/src/umbraco.controls/ScrollingMenu.cs b/src/umbraco.controls/ScrollingMenu.cs index e5c21614ef..1dfb9ba452 100644 --- a/src/umbraco.controls/ScrollingMenu.cs +++ b/src/umbraco.controls/ScrollingMenu.cs @@ -36,14 +36,14 @@ namespace umbraco.uicontrols return icon; } - public MenuSplitButton NewSplitButton() + internal MenuSplitButton NewSplitButton() { var menu = new MenuSplitButton(); Icons.Add(menu); return menu; } - public MenuButton NewButton(int index = -1) + internal MenuButton NewButton(int index = -1) { MenuButton btn = new MenuButton();