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

namespace QC.QMSCT;

public class FormShortcutOptions : Form
{
	private static FormShortcutOptions newFormShortcutOptions;

	private static ShortcutOptionResults results = ShortcutOptionResults.Cancel;

	private IContainer components;

	private Label label1;

	private Button buttonEngineeringMode;

	private Button buttonOK;

	private Button buttonCancel;

	public FormShortcutOptions()
	{
		InitializeComponent();
	}

	public static ShortcutOptionResults ShowBox()
	{
		newFormShortcutOptions = new FormShortcutOptions();
		newFormShortcutOptions.buttonCancel.Text = CommonResource.ButtonCancel;
		newFormShortcutOptions.buttonOK.Text = CommonResource.ButtonOK;
		newFormShortcutOptions.buttonEngineeringMode.Text = CommonResource.ButtonEngineeringMode;
		newFormShortcutOptions.Text = CommonResource.FormShortcutOptions;
		newFormShortcutOptions.label1.Text = CommonResource.LabelShortcut;
		newFormShortcutOptions.ShowDialog();
		return results;
	}

	private void buttonEngineeringMode_Click(object sender, EventArgs e)
	{
		results = ShortcutOptionResults.EngineeringMode;
		newFormShortcutOptions.Dispose();
	}

	private void buttonOK_Click(object sender, EventArgs e)
	{
		results = ShortcutOptionResults.OK;
		newFormShortcutOptions.Dispose();
	}

	private void buttonCancel_Click(object sender, EventArgs e)
	{
		results = ShortcutOptionResults.Cancel;
		newFormShortcutOptions.Dispose();
	}

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

	private void InitializeComponent()
	{
		this.label1 = new System.Windows.Forms.Label();
		this.buttonEngineeringMode = new System.Windows.Forms.Button();
		this.buttonOK = new System.Windows.Forms.Button();
		this.buttonCancel = new System.Windows.Forms.Button();
		base.SuspendLayout();
		this.label1.Location = new System.Drawing.Point(9, 9);
		this.label1.Name = "label1";
		this.label1.Size = new System.Drawing.Size(473, 43);
		this.label1.TabIndex = 0;
		this.label1.Text = "Your shortcut can be created to start QMSCT in Engineering Mode automatically. This is only recommended for advanced users. Press OK to create a normal shortcut.";
		this.buttonEngineeringMode.Location = new System.Drawing.Point(12, 55);
		this.buttonEngineeringMode.Name = "buttonEngineeringMode";
		this.buttonEngineeringMode.Size = new System.Drawing.Size(207, 23);
		this.buttonEngineeringMode.TabIndex = 1;
		this.buttonEngineeringMode.Text = "Create Engineering Mode Shortcut";
		this.buttonEngineeringMode.UseVisualStyleBackColor = true;
		this.buttonEngineeringMode.Click += new System.EventHandler(buttonEngineeringMode_Click);
		this.buttonOK.Location = new System.Drawing.Point(316, 55);
		this.buttonOK.Name = "buttonOK";
		this.buttonOK.Size = new System.Drawing.Size(80, 23);
		this.buttonOK.TabIndex = 2;
		this.buttonOK.Text = "OK";
		this.buttonOK.UseVisualStyleBackColor = true;
		this.buttonOK.Click += new System.EventHandler(buttonOK_Click);
		this.buttonCancel.Location = new System.Drawing.Point(402, 55);
		this.buttonCancel.Name = "buttonCancel";
		this.buttonCancel.Size = new System.Drawing.Size(80, 23);
		this.buttonCancel.TabIndex = 3;
		this.buttonCancel.Text = "Cancel";
		this.buttonCancel.UseVisualStyleBackColor = true;
		this.buttonCancel.Click += new System.EventHandler(buttonCancel_Click);
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(487, 90);
		base.ControlBox = false;
		base.Controls.Add(this.buttonCancel);
		base.Controls.Add(this.buttonOK);
		base.Controls.Add(this.buttonEngineeringMode);
		base.Controls.Add(this.label1);
		base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
		base.Name = "FormShortcutOptions";
		base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
		this.Text = "Shortcut Options";
		base.ResumeLayout(false);
	}
}
