using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace QC.QTMApplication;

public class StopSignal : Form
{
	private Label lblMessage;

	private Timer dismissTimer = new Timer();

	private Container components;

	public StopSignal()
	{
		InitializeComponent();
		dismissTimer.Tick += dismissTimer_Tick;
	}

	private void dismissTimer_Tick(object sender, EventArgs e)
	{
		Close();
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		this.lblMessage = new System.Windows.Forms.Label();
		base.SuspendLayout();
		this.lblMessage.BackColor = System.Drawing.Color.Black;
		this.lblMessage.Dock = System.Windows.Forms.DockStyle.Fill;
		this.lblMessage.Font = new System.Drawing.Font("Copperplate Gothic Light", 39.75f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.lblMessage.ForeColor = System.Drawing.Color.Red;
		this.lblMessage.Location = new System.Drawing.Point(0, 0);
		this.lblMessage.Name = "lblMessage";
		this.lblMessage.Size = new System.Drawing.Size(583, 64);
		this.lblMessage.TabIndex = 0;
		this.lblMessage.Text = "Stop Requested";
		this.lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
		this.lblMessage.MouseLeave += new System.EventHandler(lblMessage_MouseLeave);
		this.lblMessage.MouseEnter += new System.EventHandler(lblMessage_MouseEnter);
		this.AutoScaleBaseSize = new System.Drawing.Size(25, 72);
		this.BackColor = System.Drawing.Color.Black;
		base.ClientSize = new System.Drawing.Size(583, 64);
		base.Controls.Add(this.lblMessage);
		this.Font = new System.Drawing.Font("Monotype Corsiva", 48f, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, 0);
		base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
		base.Name = "StopSignal";
		base.ShowInTaskbar = false;
		base.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
		this.Text = "StopSignal";
		base.TopMost = true;
		base.ResumeLayout(false);
		base.Shown += new System.EventHandler(StopSignal_Shown);
	}

	private void StopSignal_Shown(object sender, EventArgs e)
	{
		dismissTimer.Interval = 1000;
		dismissTimer.Start();
	}

	private void lblMessage_MouseEnter(object sender, EventArgs e)
	{
		lblMessage.ForeColor = Color.FromArgb(192, 255, 192);
	}

	private void lblMessage_MouseLeave(object sender, EventArgs e)
	{
		lblMessage.ForeColor = Color.Red;
	}
}
