From 6bddec01d6aaad2679d701447b9c0eaa79d5a7ab Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 17 Dec 2019 12:01:43 -0600 Subject: [PATCH] cleanup --- BizHawk.Client.EmuHawk/MainForm.Designer.cs | 1 - BizHawk.Client.EmuHawk/MainForm.Events.cs | 10 +--------- BizHawk.Client.EmuHawk/tools/InputPrompt.cs | 15 ++++----------- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/BizHawk.Client.EmuHawk/MainForm.Designer.cs b/BizHawk.Client.EmuHawk/MainForm.Designer.cs index cf72722195..85cb5efd7f 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Designer.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Designer.cs @@ -542,7 +542,6 @@ this.MainformMenu.Text = "menuStrip1"; this.MainformMenu.MenuActivate += new System.EventHandler(this.MainformMenu_MenuActivate); this.MainformMenu.MenuDeactivate += new System.EventHandler(this.MainformMenu_MenuDeactivate); - this.MainformMenu.Leave += new System.EventHandler(this.MainformMenu_Leave); // // FileSubMenu // diff --git a/BizHawk.Client.EmuHawk/MainForm.Events.cs b/BizHawk.Client.EmuHawk/MainForm.Events.cs index eebccea12d..c7379ffe54 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -2930,11 +2930,7 @@ namespace BizHawk.Client.EmuHawk OpenRomContextMenuItem.Visible = Emulator.IsNull() || _inFullscreen; - bool showMenuVisible = _inFullscreen; - if (!MainMenuStrip.Visible) - { - showMenuVisible = true; // need to always be able to restore this as an emergency measure - } + bool showMenuVisible = _inFullscreen || !MainMenuStrip.Visible; // need to always be able to restore this as an emergency measure if (_argParser._chromeless) { @@ -3366,10 +3362,6 @@ namespace BizHawk.Client.EmuHawk base.OnClosed(e); } - private void MainformMenu_Leave(object sender, EventArgs e) - { - } - private void MainformMenu_MenuActivate(object sender, EventArgs e) { HandlePlatformMenus(); diff --git a/BizHawk.Client.EmuHawk/tools/InputPrompt.cs b/BizHawk.Client.EmuHawk/tools/InputPrompt.cs index 522c35486d..125b11a3a2 100644 --- a/BizHawk.Client.EmuHawk/tools/InputPrompt.cs +++ b/BizHawk.Client.EmuHawk/tools/InputPrompt.cs @@ -27,11 +27,7 @@ namespace BizHawk.Client.EmuHawk public string Message { - get - { - return PromptLabel.Text; - } - + get => PromptLabel.Text; set { PromptLabel.Text = value ?? ""; @@ -41,14 +37,11 @@ namespace BizHawk.Client.EmuHawk public string InitialValue { - get { return PromptBox.Text; } - set { PromptBox.Text = value ?? ""; } + get => PromptBox.Text; + set => PromptBox.Text = value ?? ""; } - public string PromptText - { - get { return PromptBox.Text ?? ""; } - } + public string PromptText => PromptBox.Text ?? ""; private void InputPrompt_Load(object sender, EventArgs e) {