Added configuration to enable or disable the Start Page

This commit is contained in:
Michael Becker 2014-07-18 22:51:52 -04:00
parent 4ddaeeca0b
commit 2e5353891a
2 changed files with 18 additions and 8 deletions

View File

@ -655,7 +655,6 @@ namespace UniversalEditor.UserInterface.WindowsForms
this.mnuViewStartPage.Name = "mnuViewStartPage";
this.mnuViewStartPage.Size = new System.Drawing.Size(156, 22);
this.mnuViewStartPage.Text = "Start Pa&ge";
this.mnuViewStartPage.Click += new System.EventHandler(this.mnuViewStartPage_Click);
//
// mnuViewFullScreen
//

View File

@ -75,8 +75,6 @@ namespace UniversalEditor.UserInterface.WindowsForms
tsmi.Click += tsmiBookmark_Click;
mnuBookmarks.DropDownItems.Insert(mnuBookmarks.DropDownItems.Count - 2, tsmi);
}
ShowStartPage();
}
private void InitializeCommandBars()
@ -1690,10 +1688,6 @@ namespace UniversalEditor.UserInterface.WindowsForms
cbc.ShowCustomizeDialog();
}
private void mnuViewStartPage_Click(object sender, EventArgs e)
{
ShowStartPage();
}
#endregion
#region Project
private void mnuProjectAddNewItem_Click(object sender, EventArgs e)
@ -1823,6 +1817,12 @@ namespace UniversalEditor.UserInterface.WindowsForms
public void ShowStartPage()
{
if (!Engine.CurrentEngine.ConfigurationManager.GetValue<bool>(new string[] { "Application", "StartPage", "Enabled" }, true))
{
// Only show the start page if it's enabled
return;
}
DockingWindow dwStartPage = dcc.Windows["pnlStartPage"];
if (dwStartPage == null)
{
@ -1851,6 +1851,10 @@ namespace UniversalEditor.UserInterface.WindowsForms
e.Handled = true;
e.SuppressKeyPress = true;
}
else if (e.KeyCode == Keys.Alt)
{
}
}
private void mnuWindowWindows_Click(object sender, EventArgs e)
@ -1885,7 +1889,14 @@ namespace UniversalEditor.UserInterface.WindowsForms
Glue.Common.Methods.InitializeCustomizableMenuItems(mbMenuBar);
ShowStartPage();
if (Engine.CurrentEngine.ConfigurationManager.GetValue<bool>(new string[] { "Application", "StartPage", "Enabled" }, true))
{
if (Engine.CurrentEngine.ConfigurationManager.GetValue<bool>(new string[] { "Application", "StartPage", "ShowOnStartup" }, true))
{
// Only show the start page if it's enabled
ShowStartPage();
}
}
}
protected override void OnActivated(EventArgs e)