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

namespace QC.QTMApplication.Dialogs;

public class TCSkipDetails : Form
{
	public bool SkipTCOnOpenIR;

	public bool SkipTCOnOpenSetupIssues;

	public bool SkipTCOnOpenAutomationIssues;

	public int NumberOfDaysToLookUpIssues;

	private IContainer components;

	private Label tcSkipLbl;

	private CheckBox skipOnOpenIR;

	private CheckBox skipOnOpenAutomationIssues;

	private CheckBox skipOnSetupIssue;

	private Button buttonOK;

	private NumericUpDown numberOfDaysToLookUpIssues;

	private Label labelNumberOfDaysToLookUpIssues;

	public TCSkipDetails(bool skipTCOnOpenIR, bool skipTCOnOpenSetupIssues, bool skipTCOnOpenAutomationIssues, int numberOfDaysToLookUpIssues)
	{
		Initialize();
		SkipTCOnOpenIR = skipTCOnOpenIR;
		SkipTCOnOpenSetupIssues = skipTCOnOpenSetupIssues;
		SkipTCOnOpenAutomationIssues = skipTCOnOpenAutomationIssues;
		NumberOfDaysToLookUpIssues = numberOfDaysToLookUpIssues;
	}

	public TCSkipDetails()
	{
		Initialize();
	}

	private void Initialize()
	{
		InitializeComponent();
		ToolTip toolTip = new ToolTip();
		toolTip.SetToolTip(skipOnOpenIR, "Selecting This Will Enable Skipping Test Cases If There are any IRs Open For a Given Test Case With Same Software Product as bieng executed for.");
		ToolTip toolTip2 = new ToolTip();
		toolTip2.SetToolTip(skipOnSetupIssue, "Selecting This Will Enable Skipping Test Cases If There are any Setup issues Open For a Given Test Case On The same Test Bed as bieng executed on.");
		ToolTip toolTip3 = new ToolTip();
		toolTip3.SetToolTip(skipOnOpenAutomationIssues, "Selecting This Will Enable Skipping Test Cases If There are any Automation Issues open For a Given Test Case against the same CST Core Version Bieng Executed against.");
		ToolTip toolTip4 = new ToolTip();
		toolTip4.SetToolTip(numberOfDaysToLookUpIssues, "This is the past number of days (Window) in which any open issues will be looked up against selected issue types.");
	}

	private void TCSkipDetails_Load(object sender, EventArgs e)
	{
		if (SkipTCOnOpenIR)
		{
			skipOnOpenIR.Checked = true;
		}
		if (SkipTCOnOpenSetupIssues)
		{
			skipOnSetupIssue.Checked = true;
		}
		if (SkipTCOnOpenAutomationIssues)
		{
			skipOnOpenAutomationIssues.Checked = true;
		}
		numberOfDaysToLookUpIssues.Value = NumberOfDaysToLookUpIssues;
	}

	private void skipOnOpenIR_CheckedChanged(object sender, EventArgs e)
	{
	}

	private void skipOnSetupIssue_CheckedChanged(object sender, EventArgs e)
	{
	}

	private void skipOnOpenAutomationIssues_CheckedChanged(object sender, EventArgs e)
	{
	}

	private void buttonOK_Click(object sender, EventArgs e)
	{
		SkipTCOnOpenIR = skipOnOpenIR.Checked;
		SkipTCOnOpenSetupIssues = skipOnSetupIssue.Checked;
		SkipTCOnOpenAutomationIssues = skipOnOpenAutomationIssues.Checked;
		NumberOfDaysToLookUpIssues = (int)numberOfDaysToLookUpIssues.Value;
		Close();
	}

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

	private void InitializeComponent()
	{
		this.tcSkipLbl = new System.Windows.Forms.Label();
		this.skipOnOpenIR = new System.Windows.Forms.CheckBox();
		this.skipOnOpenAutomationIssues = new System.Windows.Forms.CheckBox();
		this.skipOnSetupIssue = new System.Windows.Forms.CheckBox();
		this.buttonOK = new System.Windows.Forms.Button();
		this.numberOfDaysToLookUpIssues = new System.Windows.Forms.NumericUpDown();
		this.labelNumberOfDaysToLookUpIssues = new System.Windows.Forms.Label();
		((System.ComponentModel.ISupportInitialize)this.numberOfDaysToLookUpIssues).BeginInit();
		base.SuspendLayout();
		this.tcSkipLbl.AutoSize = true;
		this.tcSkipLbl.Location = new System.Drawing.Point(10, 9);
		this.tcSkipLbl.Name = "tcSkipLbl";
		this.tcSkipLbl.Size = new System.Drawing.Size(365, 13);
		this.tcSkipLbl.TabIndex = 0;
		this.tcSkipLbl.Text = "Select Issue Types To Enable Skipping Test Cases, Based on Open Issues.";
		this.skipOnOpenIR.AutoSize = true;
		this.skipOnOpenIR.Location = new System.Drawing.Point(13, 34);
		this.skipOnOpenIR.Name = "skipOnOpenIR";
		this.skipOnOpenIR.Size = new System.Drawing.Size(224, 17);
		this.skipOnOpenIR.TabIndex = 1;
		this.skipOnOpenIR.Text = "Skip TC On Open IR ( Like : \"IR-XXXXX\")";
		this.skipOnOpenIR.UseVisualStyleBackColor = true;
		this.skipOnOpenIR.CheckedChanged += new System.EventHandler(skipOnOpenIR_CheckedChanged);
		this.skipOnOpenAutomationIssues.AutoSize = true;
		this.skipOnOpenAutomationIssues.Location = new System.Drawing.Point(12, 80);
		this.skipOnOpenAutomationIssues.Name = "skipOnOpenAutomationIssues";
		this.skipOnOpenAutomationIssues.Size = new System.Drawing.Size(354, 17);
		this.skipOnOpenAutomationIssues.TabIndex = 2;
		this.skipOnOpenAutomationIssues.Text = "Skip TC On Open Automation issue ( Like : \"CSTQSPRHLP-XXXXX\")";
		this.skipOnOpenAutomationIssues.UseVisualStyleBackColor = true;
		this.skipOnOpenAutomationIssues.CheckedChanged += new System.EventHandler(skipOnOpenAutomationIssues_CheckedChanged);
		this.skipOnSetupIssue.AutoSize = true;
		this.skipOnSetupIssue.Location = new System.Drawing.Point(13, 57);
		this.skipOnSetupIssue.Name = "skipOnSetupIssue";
		this.skipOnSetupIssue.Size = new System.Drawing.Size(315, 17);
		this.skipOnSetupIssue.TabIndex = 3;
		this.skipOnSetupIssue.Text = "Skip TC On Open Setup Issue ( Like : \"CSTSETUP-XXXXX\")";
		this.skipOnSetupIssue.UseVisualStyleBackColor = true;
		this.skipOnSetupIssue.CheckedChanged += new System.EventHandler(skipOnSetupIssue_CheckedChanged);
		this.buttonOK.Location = new System.Drawing.Point(153, 146);
		this.buttonOK.MaximumSize = new System.Drawing.Size(75, 23);
		this.buttonOK.MinimumSize = new System.Drawing.Size(75, 23);
		this.buttonOK.Name = "buttonOK";
		this.buttonOK.Size = new System.Drawing.Size(75, 23);
		this.buttonOK.TabIndex = 4;
		this.buttonOK.Text = "Ok";
		this.buttonOK.UseVisualStyleBackColor = true;
		this.buttonOK.Click += new System.EventHandler(buttonOK_Click);
		this.numberOfDaysToLookUpIssues.Location = new System.Drawing.Point(13, 103);
		this.numberOfDaysToLookUpIssues.Name = "numberOfDaysToLookUpIssues";
		this.numberOfDaysToLookUpIssues.Size = new System.Drawing.Size(120, 20);
		this.numberOfDaysToLookUpIssues.TabIndex = 5;
		this.labelNumberOfDaysToLookUpIssues.AutoSize = true;
		this.labelNumberOfDaysToLookUpIssues.Location = new System.Drawing.Point(134, 105);
		this.labelNumberOfDaysToLookUpIssues.Name = "labelNumberOfDaysToLookUpIssues";
		this.labelNumberOfDaysToLookUpIssues.Size = new System.Drawing.Size(249, 13);
		this.labelNumberOfDaysToLookUpIssues.TabIndex = 6;
		this.labelNumberOfDaysToLookUpIssues.Text = "( Number Of Past Days To LookUp Issues Against )";
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(385, 176);
		base.Controls.Add(this.labelNumberOfDaysToLookUpIssues);
		base.Controls.Add(this.numberOfDaysToLookUpIssues);
		base.Controls.Add(this.buttonOK);
		base.Controls.Add(this.skipOnSetupIssue);
		base.Controls.Add(this.skipOnOpenAutomationIssues);
		base.Controls.Add(this.skipOnOpenIR);
		base.Controls.Add(this.tcSkipLbl);
		base.MaximizeBox = false;
		this.MaximumSize = new System.Drawing.Size(401, 214);
		base.MinimizeBox = false;
		this.MinimumSize = new System.Drawing.Size(401, 214);
		base.Name = "TCSkipDetails";
		base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
		this.Text = "TC Skip Detail Configuration";
		base.Load += new System.EventHandler(TCSkipDetails_Load);
		((System.ComponentModel.ISupportInitialize)this.numberOfDaysToLookUpIssues).EndInit();
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
