diff --git a/TBF/Rig/ControlBoard/Legacy/ControlBoardDev.cs b/TBF/Rig/ControlBoard/Legacy/ControlBoardDev.cs index 2add56c51..ddeffc9fb 100644 --- a/TBF/Rig/ControlBoard/Legacy/ControlBoardDev.cs +++ b/TBF/Rig/ControlBoard/Legacy/ControlBoardDev.cs @@ -404,7 +404,7 @@ namespace TBF.Rig.ControlBoard.Legacy } /// Initialize this device - public void Initialize() + public override void Initialize() { //int divertersCount = Rig.Uni.Diverter.Diverter.DivertersCount; @@ -474,7 +474,7 @@ namespace TBF.Rig.ControlBoard.Legacy } else if (!emergencyStop && previousEmergencyStop) { - UiBridge.Bridge.OnEmergencyStopChanged(this, UiBridge.EmergencyStopEventArgs.State.CloseForm); + //UiBridge.Bridge.OnEmergencyStopChanged(this, UiBridge.EmergencyStopEventArgs.State.CloseForm); } @@ -560,7 +560,7 @@ namespace TBF.Rig.ControlBoard.Legacy /// void ShowEmergencyStopForm() { - (new TBF.UI.Shared.EmergencyStopForm()).Show(); + //(new TBF.UI.Shared.EmergencyStopForm()).Show(); } diff --git a/TBF/TBF.csproj b/TBF/TBF.csproj index f4a2c2676..329e98217 100644 --- a/TBF/TBF.csproj +++ b/TBF/TBF.csproj @@ -2364,12 +2364,6 @@ ClosingTbfForm.cs - - Form - - - EmergencyStopForm.cs - Form @@ -3211,9 +3205,6 @@ ClosingTbfForm.cs - - EmergencyStopForm.cs - ErrorDlg.cs diff --git a/TBF/UI/Shared/EmergencyStopForm.cs b/TBF/UI/Shared/EmergencyStopForm.cs deleted file mode 100644 index ad5c2d2bb..000000000 --- a/TBF/UI/Shared/EmergencyStopForm.cs +++ /dev/null @@ -1,60 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Senus Slovensko a.s. -/// -using System; -using System.Drawing; -using System.Windows.Forms; -using TBF.Resources; - -namespace TBF.UI.Shared -{ - public partial class EmergencyStopForm : Form - { - bool closingForm = false; - - /// - /// Parameterless constructor (does the localization) - /// - public EmergencyStopForm() - { - Visible = true; - InitializeComponent(); - - emergencyStopMsgLabel.Text = Strings.Emergency_STOP; - emergencyStopMsgLabel.Enabled = true; - emergencyStopMsgLabel.Visible = true; - - UiBridge.Bridge.EmergencyStopChangedHandler += delegate(object sender, UiBridge.EmergencyStopEventArgs args) - { - if (closingForm) return; - - if (InvokeRequired) - { - Invoke(new EventHandler(OnEmergencyStopStateChanged), sender, args); - } - else OnEmergencyStopStateChanged(sender, args); - }; - } - - void OnEmergencyStopStateChanged(Object sender, UiBridge.EmergencyStopEventArgs args) - { - if (args.EmergencyStopState == UiBridge.EmergencyStopEventArgs.State.CloseForm) - { - closingForm = true; - Close(); - } - //else if (args.EmergencyStopState == UiBridge.EmergencyStopEventArgs.State.Active) - //{ - // Visible = true; - // emergencyStopMsgLabel.Enabled = true; - // emergencyStopMsgLabel.Visible = true; - //} - //else if (args.EmergencyStopState == UiBridge.EmergencyStopEventArgs.State.Inactive) - //{ - // Visible = false; - // emergencyStopMsgLabel.Enabled = false; - // emergencyStopMsgLabel.Visible = false; - //} - } - } -} diff --git a/TBF/UI/Shared/EmergencyStopForm.designer.cs b/TBF/UI/Shared/EmergencyStopForm.designer.cs deleted file mode 100644 index b522ed36d..000000000 --- a/TBF/UI/Shared/EmergencyStopForm.designer.cs +++ /dev/null @@ -1,73 +0,0 @@ -/// -/// Copyright (c) 2013-2015 Senus Slovensko a.s. -/// -namespace TBF.UI.Shared -{ - partial class EmergencyStopForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.emergencyStopMsgLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // emergencyStopMsgLabel - // - this.emergencyStopMsgLabel.AutoSize = true; - this.emergencyStopMsgLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.emergencyStopMsgLabel.ForeColor = System.Drawing.Color.Yellow; - this.emergencyStopMsgLabel.Location = new System.Drawing.Point(67, 86); - this.emergencyStopMsgLabel.Name = "emergencyStopMsgLabel"; - this.emergencyStopMsgLabel.Size = new System.Drawing.Size(287, 37); - this.emergencyStopMsgLabel.TabIndex = 1; - this.emergencyStopMsgLabel.Text = "Emergency STOP"; - // - // EmergencyStopForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSize = true; - this.BackColor = System.Drawing.Color.Red; - this.ClientSize = new System.Drawing.Size(412, 212); - this.Controls.Add(this.emergencyStopMsgLabel); - this.ForeColor = System.Drawing.Color.Transparent; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "EmergencyStopForm"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Emergency STOP"; - this.TopMost = true; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label emergencyStopMsgLabel; - } -} \ No newline at end of file diff --git a/TBF/UI/Shared/EmergencyStopForm.resx b/TBF/UI/Shared/EmergencyStopForm.resx deleted file mode 100644 index 1af7de150..000000000 --- a/TBF/UI/Shared/EmergencyStopForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/TBF/UiBridge/Bridge.cs b/TBF/UiBridge/Bridge.cs index 8f0082b67..c4dbfe964 100644 --- a/TBF/UiBridge/Bridge.cs +++ b/TBF/UiBridge/Bridge.cs @@ -201,18 +201,6 @@ namespace TBF.UiBridge public static event EventHandler StateChangedHandler; - /// - /// Called from the state machine when 'Activity' information changes. - /// - public static void OnEmergencyStopChanged(object sender, EmergencyStopEventArgs.State state) - { - if (EmergencyStopChangedHandler == null) return; - try { EmergencyStopChangedHandler(sender, new EmergencyStopEventArgs(state)); } - catch (Exception e) { log.Error("EmergencyStopHandler(...) failed", e); } - } - public static event EventHandler EmergencyStopChangedHandler; - - /// /// Called from the state machine when an operation forces a modeless dialog close. ///