diff --git a/TBF/UI/MainWnd.cs b/TBF/UI/MainWnd.cs index 5e948709e..db40fffff 100644 --- a/TBF/UI/MainWnd.cs +++ b/TBF/UI/MainWnd.cs @@ -32,11 +32,6 @@ namespace TBF.UI public bool IsShutdownDisabled; public bool IsShutdownPCAfterClosingTbf; - /// - /// This dialog is shown when emergency stop is activated - /// - Shared.EmergencyStopForm emergencyStopModelessDlg; - /// /// This dialog is shown when TBF program is shutting down /// @@ -240,8 +235,7 @@ namespace TBF.UI string message = Rig.StateMachine.InitializeDevices(); form.CloseForm(null, new EventArgs()); formThread.Join(); - -#if !DEBUG && !MUNICH +#if !DEBUG if (message != null) { MessageBox.Show(Strings.The_following_components_are_in_simulation_mode_ + Environment.NewLine + message, @@ -251,9 +245,6 @@ namespace TBF.UI } #endif - //emergencyStopModelessDlg = new Shared.EmergencyStopForm(); - //emergencyStopModelessDlg.Show(); - Bridge.ButtonsEtcHandler += delegate(object sndr, ButtonsEtcEventArgs args) { if (InvokeRequired) { Invoke(new EventHandler(OnButtonsEtc), sndr, args); } @@ -849,21 +840,12 @@ namespace TBF.UI return false; } - /// Save emergency stop form state - bool oriEmgStopState = false; - if (emergencyStopModelessDlg != null) - { - oriEmgStopState = emergencyStopModelessDlg.Visible; - emergencyStopModelessDlg.Visible = false; - } - if ((messageLabel.ForeColor != Color.Red) && IsShutdownDisabled) { /// /// It is not possible to shutdown (most likely a cycle is not completed) --> Display a message and prevent shutdown now /// MessageBox.Show(Strings.Finish_the_session_please, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - if (emergencyStopModelessDlg != null) emergencyStopModelessDlg.Visible = oriEmgStopState; return false; } @@ -899,8 +881,7 @@ namespace TBF.UI } else { - /// User aborted the shutdown --> Restore emergency stop form state and prevent shutdown now - if (emergencyStopModelessDlg != null) emergencyStopModelessDlg.Visible = oriEmgStopState; + /// User aborted the shutdown return false; } }