From 318d91d5b8ec912b6174b7fa1d65f8fd7cf71eea Mon Sep 17 00:00:00 2001 From: alcexhim Date: Fri, 19 Dec 2014 16:13:18 -0500 Subject: [PATCH 1/2] Added WindowLayouts to Content --- ...lEditor.Content.PlatformIndependent.csproj | 2 + .../WindowLayouts/Default.xml | 24 +++++++++++ .../WindowLayouts/VisualStudio2013.xml | 41 +++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 CSharp/Content/UniversalEditor.Content.PlatformIndependent/WindowLayouts/Default.xml create mode 100644 CSharp/Content/UniversalEditor.Content.PlatformIndependent/WindowLayouts/VisualStudio2013.xml diff --git a/CSharp/Content/UniversalEditor.Content.PlatformIndependent/UniversalEditor.Content.PlatformIndependent.csproj b/CSharp/Content/UniversalEditor.Content.PlatformIndependent/UniversalEditor.Content.PlatformIndependent.csproj index fb0875f0..52eb0038 100644 --- a/CSharp/Content/UniversalEditor.Content.PlatformIndependent/UniversalEditor.Content.PlatformIndependent.csproj +++ b/CSharp/Content/UniversalEditor.Content.PlatformIndependent/UniversalEditor.Content.PlatformIndependent.csproj @@ -557,6 +557,8 @@ + + diff --git a/CSharp/Content/UniversalEditor.Content.PlatformIndependent/WindowLayouts/Default.xml b/CSharp/Content/UniversalEditor.Content.PlatformIndependent/WindowLayouts/Default.xml new file mode 100644 index 00000000..24aacae1 --- /dev/null +++ b/CSharp/Content/UniversalEditor.Content.PlatformIndependent/WindowLayouts/Default.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CSharp/Content/UniversalEditor.Content.PlatformIndependent/WindowLayouts/VisualStudio2013.xml b/CSharp/Content/UniversalEditor.Content.PlatformIndependent/WindowLayouts/VisualStudio2013.xml new file mode 100644 index 00000000..286591b7 --- /dev/null +++ b/CSharp/Content/UniversalEditor.Content.PlatformIndependent/WindowLayouts/VisualStudio2013.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From db98a533e5ae804cece75d379c9e48811f2ef493 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Fri, 19 Dec 2014 16:15:05 -0500 Subject: [PATCH 2/2] Partially implement dynamic loading of View->Toolbar->... commands --- .../UniversalEditor.UserInterface/Engine.cs | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs index 04e64378..4c957a86 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs @@ -180,7 +180,6 @@ namespace UniversalEditor.UserInterface LastWindow.FullScreen = !LastWindow.FullScreen; cmd.Checked = LastWindow.FullScreen; }); - #region Perspective AttachCommandEventHandler("ViewPerspective1", delegate(object sender, EventArgs e) { @@ -249,6 +248,31 @@ namespace UniversalEditor.UserInterface ShowAboutDialog(); }); #endregion + + + #region Dynamic Commands + #region View + #region Panels + for (int i = mvarCommandBars.Count - 1; i >= 0; i--) + { + Command cmdViewToolbarsToolbar = new Command(); + cmdViewToolbarsToolbar.ID = "ViewToolbars" + i.ToString(); + cmdViewToolbarsToolbar.Title = mvarCommandBars[i].Title; + cmdViewToolbarsToolbar.Executed += cmdViewToolbarsToolbar_Executed; + mvarCommands.Add(cmdViewToolbarsToolbar); + mvarCommands["ViewToolbars"].Items.Insert(0, new CommandReferenceCommandItem(cmdViewToolbarsToolbar.ID)); + } + #endregion + #region Panels + Command cmdViewPanels1 = new Command(); + cmdViewPanels1.ID = "ViewPanels1"; + mvarCommands.Add(cmdViewPanels1); + mvarCommands["ViewPanels"].Items.Add(new CommandReferenceCommandItem("ViewPanels1")); + #endregion + #endregion + #endregion + + #region Language Strings #region Help Command helpAboutPlatform = mvarCommands["HelpAboutPlatform"]; if (helpAboutPlatform != null) @@ -274,6 +298,13 @@ namespace UniversalEditor.UserInterface } } #endregion + #endregion + } + + void cmdViewToolbarsToolbar_Executed(object sender, EventArgs e) + { + Command cmd = (sender as Command); + } private IHostApplicationWindowCollection mvarWindows = new IHostApplicationWindowCollection();