From 1e6c6f56ae2f4553d66bb3c6e777009e4c91b849 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Fri, 13 Dec 2019 22:37:50 -0500 Subject: [PATCH] FINALLY... implement option to toggle status bar visibility --- CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs | 4 ++++ .../UniversalEditor.UserInterface/IHostApplicationWindow.cs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs index b11b5b38..1b1055b9 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs @@ -482,6 +482,10 @@ namespace UniversalEditor.UserInterface { HostApplication.CurrentWindow.ShowStartPage(); }); + Application.AttachCommandEventHandler("ViewStatusBar", delegate (object sender, EventArgs e) + { + HostApplication.CurrentWindow.StatusBar.Visible = !HostApplication.CurrentWindow.StatusBar.Visible; + }); #endregion #region Tools diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/IHostApplicationWindow.cs b/CSharp/Libraries/UniversalEditor.UserInterface/IHostApplicationWindow.cs index 546d0741..327f628c 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/IHostApplicationWindow.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/IHostApplicationWindow.cs @@ -74,6 +74,8 @@ namespace UniversalEditor.UserInterface /// True if the window list should be shown; false if the window list should be hidden. /// True if the window list should be presented as a modal dialog; false if it should be presented as a popup (for example, during a window switch action). void SetWindowListVisible(bool visible, bool modal); + + StatusBar StatusBar { get; } } public class IHostApplicationWindowCollection : System.Collections.ObjectModel.Collection