using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using System.Windows.Forms.Integration;
using MultiLanguageManger;
using ProductConfigurationController;

namespace QC.QMSCT;

public class ProductConfigControl : UserControl
{
	private const string newProdString = "\"Create New Product From Current Setting\"";

	private const string newProdCfgString = "\"Create New Configuration From Current Setting\"";

	private const string ADDINFONAME = "Name";

	private const string ADDINFOVALUE = "Value";

	private List<TechnologyInformationControl> uictrls = new List<TechnologyInformationControl>();

	public EventHandler OnChangeStationConfiguration;

	private ProductConfigManager productConfigManager;

	public EventHandler OnDiscardChanges;

	private IContainer components;

	private GroupBox groupBox_General;

	private ComboBox comboBox_Technology;

	private Label label_Technology;

	private ComboBox comboBox_Engine;

	private Label label_Engine;

	private ComboBox comboBox_ProductName;

	private Label label_ProductName;

	private GroupBox groupBox_TechnologyConfiguration;

	private ComboBox comboBox_XTTTimeoutOffset;

	private Label label_XTTTimeoutOffset;

	private ComboBox comboBox_XTTTimeout;

	private Label label_XTTTimeout;

	private Button button_BrowseXTT;

	private TextBox textBox_XTTPath;

	private Label label_XTTPath;

	private GroupBox groupBox_TechnologySpecificGV;

	private DataGridView datagridview_TechnologyGV;

	private GroupBox groupBox_TechnologyQuickEditor;

	private ElementHost elementHost;

	private ComboBox comboBox_ProductConfiguration;

	private Label label_ProductConfiguration;

	private Button button_Add;

	private Button button_Remove;

	private Button button_Modify;

	public string ProductConfigName => comboBox_ProductName.Text;

	public ProductConfigControl()
	{
		InitializeComponent();
		uictrls.Add(new MULTIDUT_SWDL());
		uictrls.Add(new MULTIDUT_RF());
		uictrls.Add(new MULTIDUT_MMI());
	}

	private void DisableTechnologyArea()
	{
		groupBox_TechnologyConfiguration.Enabled = false;
		groupBox_TechnologySpecificGV.Enabled = false;
		groupBox_TechnologyQuickEditor.Enabled = false;
	}

	private void DisableAllControl()
	{
		DisableTechnologyArea();
		groupBox_General.Enabled = false;
	}

	private void EnableTechnologyArea()
	{
		groupBox_TechnologyConfiguration.Enabled = true;
		groupBox_TechnologySpecificGV.Enabled = true;
		groupBox_TechnologyQuickEditor.Enabled = true;
	}

	private void EnableAllControl()
	{
		EnableTechnologyArea();
		groupBox_General.Enabled = true;
	}

	private void updateProductNameDropDown(object obj, EventArgs args)
	{
		DisableAllControl();
		comboBox_ProductName.Items.Clear();
		comboBox_ProductName.Items.Add("\"Create New Product From Current Setting\"");
		foreach (string product in productConfigManager.ProductList)
		{
			comboBox_ProductName.Items.Add(product);
		}
		comboBox_Technology.Items.Clear();
		foreach (string technology in productConfigManager.TechnologyList)
		{
			comboBox_Technology.Items.Add(technology);
		}
		EnableAllControl();
	}

	private void updateConfigurationDropDown(object obj, EventArgs args)
	{
		DisableAllControl();
		comboBox_ProductConfiguration.Items.Clear();
		comboBox_ProductConfiguration.Items.Add("\"Create New Configuration From Current Setting\"");
		foreach (string configuration in productConfigManager.ConfigurationList)
		{
			comboBox_ProductConfiguration.Items.Add(configuration);
		}
		EnableAllControl();
	}

	private void updateConfigurationUI(object obj, EventArgs args)
	{
		DisableAllControl();
		textBox_XTTPath.Text = productConfigManager.TestPlanFilePath;
		comboBox_XTTTimeout.Text = productConfigManager.TestTimeoutSeconds.ToString();
		comboBox_XTTTimeoutOffset.Text = productConfigManager.TestTimeoutSecondsOffset.ToString();
		UpdateTechnologyGV(productConfigManager.TechnologySpecificGV);
		comboBox_Engine.Text = productConfigManager.Engine;
		comboBox_Technology.Text = productConfigManager.Technology;
		if (OnChangeStationConfiguration != null)
		{
			OnChangeStationConfiguration(this, null);
		}
		EnableAllControl();
	}

	private void updateTechnologySupportedEngineList(object obj, EventArgs args)
	{
		comboBox_Engine.Items.Clear();
		foreach (string technologySupportedEngine in productConfigManager.TechnologySupportedEngineList)
		{
			comboBox_Engine.Items.Add(technologySupportedEngine);
		}
		if (productConfigManager.TechnologySupportedEngineList.Contains(productConfigManager.Engine))
		{
			updateEngine(obj, args);
		}
		else
		{
			productConfigManager.Engine = productConfigManager.TechnologySupportedEngineList.First();
		}
	}

	private void updateEngine(object obj, EventArgs args)
	{
		if (productConfigManager.Engine != null)
		{
			comboBox_Engine.Text = productConfigManager.Engine;
		}
	}

	private void UpdateTechnologyInformationUI(object pbj, EventArgs args)
	{
		foreach (TechnologyInformationControl uictrl in uictrls)
		{
			if (uictrl.TechnologyName == productConfigManager.Technology)
			{
				elementHost.Child = uictrl;
				if (uictrl.OnUpdateParameter == null)
				{
					uictrl.OnUpdateParameter = (UpdateParameter)Delegate.Combine(uictrl.OnUpdateParameter, new UpdateParameter(OnTechnologyGVChanged));
				}
				uictrl.updateParameter(productConfigManager.TechnologySpecificGV, productConfigManager.CustomConfiguration);
			}
		}
	}

	private void UpdateTechnologyGVTable(object pbj, EventArgs args)
	{
		UpdateTechnologyGV(productConfigManager.TechnologySpecificGV);
	}

	public bool CheckAndSaveProductConfigurationFromUI()
	{
		try
		{
			productConfigManager.Save();
			return true;
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
			return false;
		}
	}

	public void InitializePage(ProductConfigManager productconfigmanager)
	{
		try
		{
			productConfigManager = productconfigmanager;
			ProductConfigManager obj = productConfigManager;
			obj.OnLoad = (EventHandler)Delegate.Combine(obj.OnLoad, new EventHandler(updateProductNameDropDown));
			ProductConfigManager obj2 = productConfigManager;
			obj2.OnChangeProductList = (EventHandler)Delegate.Combine(obj2.OnChangeProductList, new EventHandler(updateProductNameDropDown));
			ProductConfigManager obj3 = productConfigManager;
			obj3.OnChangeSelectedProduct = (EventHandler)Delegate.Combine(obj3.OnChangeSelectedProduct, new EventHandler(updateConfigurationDropDown));
			ProductConfigManager obj4 = productConfigManager;
			obj4.OnChangeConfigurationList = (EventHandler)Delegate.Combine(obj4.OnChangeConfigurationList, new EventHandler(updateConfigurationDropDown));
			ProductConfigManager obj5 = productConfigManager;
			obj5.OnChangeSelectedConfiguration = (EventHandler)Delegate.Combine(obj5.OnChangeSelectedConfiguration, new EventHandler(updateConfigurationUI));
			ProductConfigManager obj6 = productConfigManager;
			obj6.OnChangeSelectedConfiguration = (EventHandler)Delegate.Combine(obj6.OnChangeSelectedConfiguration, new EventHandler(UpdateTechnologyInformationUI));
			ProductConfigManager obj7 = productConfigManager;
			obj7.OnChangeEngine = (EventHandler)Delegate.Combine(obj7.OnChangeEngine, new EventHandler(updateEngine));
			ProductConfigManager obj8 = productConfigManager;
			obj8.OnChangeTechnology = (EventHandler)Delegate.Combine(obj8.OnChangeTechnology, new EventHandler(updateTechnologySupportedEngineList));
			ProductConfigManager obj9 = productConfigManager;
			obj9.OnChangeTechnology = (EventHandler)Delegate.Combine(obj9.OnChangeTechnology, new EventHandler(UpdateTechnologyInformationUI));
			ProductConfigManager obj10 = productConfigManager;
			obj10.OnChangeTechnologySpecificGV = (EventHandler)Delegate.Combine(obj10.OnChangeTechnologySpecificGV, new EventHandler(UpdateTechnologyInformationUI));
			ProductConfigManager obj11 = productConfigManager;
			obj11.OnChangeTechnologySpecificGV = (EventHandler)Delegate.Combine(obj11.OnChangeTechnologySpecificGV, new EventHandler(UpdateTechnologyGVTable));
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	private DataTable ConvertToDataTable(Dictionary<string, string> technologyGV)
	{
		DataTable dataTable = new DataTable();
		dataTable.Columns.Add(new DataColumn("Name", typeof(string)));
		dataTable.Columns.Add(new DataColumn("Value", typeof(string)));
		if (technologyGV != null)
		{
			foreach (string key in technologyGV.Keys)
			{
				DataRow dataRow = dataTable.NewRow();
				dataRow["Name"] = key;
				dataRow["Value"] = technologyGV[key];
				dataTable.Rows.Add(dataRow);
			}
		}
		return dataTable;
	}

	private void OnTechnologyGVChanged(Dictionary<string, string> techGV, string custConf)
	{
		productConfigManager.TechnologySpecificGV = techGV;
		productConfigManager.CustomConfiguration = custConf;
	}

	private void UpdateTechnologyGV(Dictionary<string, string> technologyGV)
	{
		datagridview_TechnologyGV.DataSource = ConvertToDataTable(technologyGV);
	}

	public void ChangeProduct(string product)
	{
		if (comboBox_ProductName.Items.Contains(product))
		{
			comboBox_ProductName.Text = product;
			return;
		}
		MessageBox.Show(string.Format(CommonResource.BoxMsgProductIsNotExist, product));
		comboBox_ProductName.SelectedIndex = 1;
	}

	public void NewProduct()
	{
		try
		{
			InputForm inputForm = new InputForm();
			if (inputForm.ShowUserInput(CommonResource.lblInputProductFile) == DialogResult.OK)
			{
				productConfigManager.CreateNewFromSelectedProduct(inputForm.InputText);
				comboBox_ProductName.Text = inputForm.InputText;
			}
		}
		catch (Exception ex)
		{
			MessageBox.Show(CommonResource.BoxMsgFailToSaveNewProduct + ex.Message);
			DiscardChanges();
		}
	}

	public void ChangeProductConfiguration(string configuration)
	{
		if (comboBox_ProductConfiguration.Items.Contains(configuration))
		{
			comboBox_ProductConfiguration.Text = configuration;
			return;
		}
		MessageBox.Show("Configuration " + configuration + " is not exist");
		comboBox_ProductConfiguration.SelectedIndex = 1;
	}

	private void NewProductConfiguration()
	{
		try
		{
			InputForm inputForm = new InputForm();
			if (inputForm.ShowUserInput(CommonResource.lblInputProductFile) == DialogResult.OK)
			{
				productConfigManager.CreateNewFromSelectedConfiguration(inputForm.InputText);
				comboBox_ProductConfiguration.Text = inputForm.InputText;
			}
		}
		catch (Exception ex)
		{
			MessageBox.Show(CommonResource.BoxMsgFailToSaveNewProduct + ex.Message);
			DiscardChanges();
		}
	}

	public void DiscardChanges()
	{
		productConfigManager.DiscardChanges();
		if (OnDiscardChanges != null)
		{
			OnDiscardChanges(this, null);
		}
	}

	public bool HasUIbeenModified()
	{
		return productConfigManager.IsChanged();
	}

	public void UpdateLanguage()
	{
	}

	private void comboBox_ProductName_SelectedIndexChanged(object sender, EventArgs e)
	{
		try
		{
			if (comboBox_ProductName.SelectedItem.ToString() == "\"Create New Product From Current Setting\"")
			{
				NewProduct();
			}
			else
			{
				productConfigManager.SelectedProduct = comboBox_ProductName.Text;
			}
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	private void comboBox_ProductConfiguration_SelectedIndexChanged(object sender, EventArgs e)
	{
		try
		{
			if (comboBox_ProductConfiguration.SelectedItem.ToString() == "\"Create New Configuration From Current Setting\"")
			{
				NewProductConfiguration();
			}
			else
			{
				productConfigManager.SelectedConfiguration = comboBox_ProductConfiguration.Text;
			}
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	private void comboBox_Engine_SelectedIndexChanged(object sender, EventArgs e)
	{
		productConfigManager.Engine = comboBox_Engine.Text;
	}

	private void comboBox_Technology_SelectedIndexChanged(object sender, EventArgs e)
	{
		productConfigManager.Technology = comboBox_Technology.Text;
	}

	private void textBox_XTTPath_TextChanged(object sender, EventArgs e)
	{
		productConfigManager.TestPlanFilePath = textBox_XTTPath.Text;
	}

	public bool AreThereDuplicateGlobalVariables(string gvname, bool newGVStuff)
	{
		if (datagridview_TechnologyGV.Rows.Count == 0)
		{
			return false;
		}
		for (int i = 0; i < datagridview_TechnologyGV.Rows.Count; i++)
		{
			if ((newGVStuff || i != datagridview_TechnologyGV.CurrentRow.Index) && datagridview_TechnologyGV.Rows[i].Cells["Name"].Value.ToString().Equals(gvname, StringComparison.OrdinalIgnoreCase))
			{
				return true;
			}
		}
		return false;
	}

	private bool IsValidGVName(string gvname)
	{
		List<string> fields = CONSTGV.GetFields();
		if (gvname == "" || fields.Contains(gvname, StringComparer.OrdinalIgnoreCase))
		{
			string text = "\r\n";
			foreach (string item in fields)
			{
				text += "\r\n\t";
				text += item;
			}
			MessageBox.Show(CommonResource.BoxMsgGVNameInvalid + text);
			return false;
		}
		if (AreThereDuplicateGlobalVariables(gvname, newGVStuff: true))
		{
			MessageBox.Show(CommonResource.BoxMsgDuplicateGV);
			return false;
		}
		return true;
	}

	private void ModifyGV(string gvName = null)
	{
		Dictionary<string, string> technologySpecificGV = productConfigManager.TechnologySpecificGV;
		string text = "";
		InputForm inputForm = new InputForm();
		if (gvName == null || !technologySpecificGV.ContainsKey(gvName))
		{
			inputForm.ValidFunction = IsValidGVName;
			inputForm.InputText = "";
			if (inputForm.ShowUserInput(CommonResource.lblInputGVName) == DialogResult.OK)
			{
				gvName = inputForm.InputText;
				inputForm.ValidFunction = null;
				inputForm.InputText = "";
				if (inputForm.ShowUserInput(CommonResource.lblInputGVValue) == DialogResult.OK)
				{
					text = inputForm.InputText;
					technologySpecificGV.Add(gvName, text);
				}
			}
		}
		else
		{
			inputForm.ValidFunction = null;
			inputForm.InputText = technologySpecificGV[gvName];
			if (inputForm.ShowUserInput(CommonResource.lblInputGVValue) == DialogResult.OK)
			{
				text = inputForm.InputText;
				technologySpecificGV[gvName] = text;
			}
		}
		productConfigManager.TechnologySpecificGV = technologySpecificGV;
	}

	private void button_Modify_Click(object sender, EventArgs e)
	{
		ModifyGV(datagridview_TechnologyGV.CurrentRow.Cells["Name"].Value.ToString());
	}

	private void button_Add_Click(object sender, EventArgs e)
	{
		ModifyGV();
	}

	private void button_Remove_Click(object sender, EventArgs e)
	{
		Dictionary<string, string> technologySpecificGV = productConfigManager.TechnologySpecificGV;
		string key = datagridview_TechnologyGV.CurrentRow.Cells["Name"].Value.ToString();
		if (technologySpecificGV.ContainsKey(key))
		{
			technologySpecificGV.Remove(key);
		}
		productConfigManager.TechnologySpecificGV = technologySpecificGV;
	}

	private void datagridview_TechnologyGV_SelectionChanged(object sender, EventArgs e)
	{
		if (datagridview_TechnologyGV.SelectedRows.Count <= 0)
		{
			button_Remove.Enabled = false;
			button_Modify.Enabled = false;
		}
		else
		{
			button_Remove.Enabled = true;
			button_Modify.Enabled = true;
		}
	}

	private void button_BrowseXTT_Click(object sender, EventArgs e)
	{
		string filter = "Test Plan File (*.xtt)|*.xtt|All Files (*.*)|*.*";
		string file = FileFolderBrowser.GetFile(filter, "C:\\Qualcomm");
		if (file != "")
		{
			textBox_XTTPath.Text = file;
		}
	}

	private void comboBox_XTTTimeout_Validated(object sender, EventArgs e)
	{
		try
		{
			productConfigManager.TestTimeoutSeconds = Convert.ToInt16(comboBox_XTTTimeout.Text);
		}
		catch
		{
		}
		comboBox_XTTTimeout.Text = productConfigManager.TestTimeoutSeconds.ToString();
	}

	private void comboBox_XTTTimeoutOffset_Validated(object sender, EventArgs e)
	{
		try
		{
			productConfigManager.TestTimeoutSecondsOffset = Convert.ToInt16(comboBox_XTTTimeoutOffset.Text);
		}
		catch
		{
		}
		comboBox_XTTTimeoutOffset.Text = productConfigManager.TestTimeoutSecondsOffset.ToString();
	}

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

	private void InitializeComponent()
	{
		this.groupBox_General = new System.Windows.Forms.GroupBox();
		this.comboBox_ProductConfiguration = new System.Windows.Forms.ComboBox();
		this.label_ProductConfiguration = new System.Windows.Forms.Label();
		this.comboBox_ProductName = new System.Windows.Forms.ComboBox();
		this.label_ProductName = new System.Windows.Forms.Label();
		this.comboBox_Engine = new System.Windows.Forms.ComboBox();
		this.label_Engine = new System.Windows.Forms.Label();
		this.comboBox_Technology = new System.Windows.Forms.ComboBox();
		this.label_Technology = new System.Windows.Forms.Label();
		this.groupBox_TechnologyConfiguration = new System.Windows.Forms.GroupBox();
		this.comboBox_XTTTimeoutOffset = new System.Windows.Forms.ComboBox();
		this.label_XTTTimeoutOffset = new System.Windows.Forms.Label();
		this.comboBox_XTTTimeout = new System.Windows.Forms.ComboBox();
		this.label_XTTTimeout = new System.Windows.Forms.Label();
		this.button_BrowseXTT = new System.Windows.Forms.Button();
		this.textBox_XTTPath = new System.Windows.Forms.TextBox();
		this.label_XTTPath = new System.Windows.Forms.Label();
		this.groupBox_TechnologySpecificGV = new System.Windows.Forms.GroupBox();
		this.button_Add = new System.Windows.Forms.Button();
		this.button_Remove = new System.Windows.Forms.Button();
		this.button_Modify = new System.Windows.Forms.Button();
		this.datagridview_TechnologyGV = new System.Windows.Forms.DataGridView();
		this.groupBox_TechnologyQuickEditor = new System.Windows.Forms.GroupBox();
		this.elementHost = new System.Windows.Forms.Integration.ElementHost();
		this.groupBox_General.SuspendLayout();
		this.groupBox_TechnologyConfiguration.SuspendLayout();
		this.groupBox_TechnologySpecificGV.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.datagridview_TechnologyGV).BeginInit();
		this.groupBox_TechnologyQuickEditor.SuspendLayout();
		base.SuspendLayout();
		this.groupBox_General.Controls.Add(this.comboBox_ProductConfiguration);
		this.groupBox_General.Controls.Add(this.label_ProductConfiguration);
		this.groupBox_General.Controls.Add(this.comboBox_ProductName);
		this.groupBox_General.Controls.Add(this.label_ProductName);
		this.groupBox_General.Location = new System.Drawing.Point(17, 7);
		this.groupBox_General.Name = "groupBox_General";
		this.groupBox_General.Size = new System.Drawing.Size(922, 65);
		this.groupBox_General.TabIndex = 0;
		this.groupBox_General.TabStop = false;
		this.groupBox_General.Text = "General";
		this.comboBox_ProductConfiguration.ForeColor = System.Drawing.SystemColors.Highlight;
		this.comboBox_ProductConfiguration.FormattingEnabled = true;
		this.comboBox_ProductConfiguration.Location = new System.Drawing.Point(644, 34);
		this.comboBox_ProductConfiguration.Name = "comboBox_ProductConfiguration";
		this.comboBox_ProductConfiguration.Size = new System.Drawing.Size(226, 21);
		this.comboBox_ProductConfiguration.TabIndex = 11;
		this.comboBox_ProductConfiguration.SelectedIndexChanged += new System.EventHandler(comboBox_ProductConfiguration_SelectedIndexChanged);
		this.label_ProductConfiguration.AutoSize = true;
		this.label_ProductConfiguration.Location = new System.Drawing.Point(569, 37);
		this.label_ProductConfiguration.Name = "label_ProductConfiguration";
		this.label_ProductConfiguration.Size = new System.Drawing.Size(69, 13);
		this.label_ProductConfiguration.TabIndex = 10;
		this.label_ProductConfiguration.Text = "Configuration";
		this.comboBox_ProductName.ForeColor = System.Drawing.SystemColors.Highlight;
		this.comboBox_ProductName.FormattingEnabled = true;
		this.comboBox_ProductName.Location = new System.Drawing.Point(133, 34);
		this.comboBox_ProductName.Name = "comboBox_ProductName";
		this.comboBox_ProductName.Size = new System.Drawing.Size(226, 21);
		this.comboBox_ProductName.TabIndex = 1;
		this.comboBox_ProductName.SelectedIndexChanged += new System.EventHandler(comboBox_ProductName_SelectedIndexChanged);
		this.label_ProductName.AutoSize = true;
		this.label_ProductName.Location = new System.Drawing.Point(52, 37);
		this.label_ProductName.Name = "label_ProductName";
		this.label_ProductName.Size = new System.Drawing.Size(75, 13);
		this.label_ProductName.TabIndex = 0;
		this.label_ProductName.Text = "Product Name";
		this.comboBox_Engine.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.comboBox_Engine.FormattingEnabled = true;
		this.comboBox_Engine.Location = new System.Drawing.Point(520, 60);
		this.comboBox_Engine.Name = "comboBox_Engine";
		this.comboBox_Engine.Size = new System.Drawing.Size(127, 21);
		this.comboBox_Engine.TabIndex = 3;
		this.comboBox_Engine.SelectedIndexChanged += new System.EventHandler(comboBox_Engine_SelectedIndexChanged);
		this.label_Engine.AutoSize = true;
		this.label_Engine.Location = new System.Drawing.Point(474, 63);
		this.label_Engine.Name = "label_Engine";
		this.label_Engine.Size = new System.Drawing.Size(40, 13);
		this.label_Engine.TabIndex = 2;
		this.label_Engine.Text = "Engine";
		this.comboBox_Technology.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.comboBox_Technology.FormattingEnabled = true;
		this.comboBox_Technology.Location = new System.Drawing.Point(722, 60);
		this.comboBox_Technology.Name = "comboBox_Technology";
		this.comboBox_Technology.Size = new System.Drawing.Size(148, 21);
		this.comboBox_Technology.TabIndex = 5;
		this.comboBox_Technology.SelectedIndexChanged += new System.EventHandler(comboBox_Technology_SelectedIndexChanged);
		this.label_Technology.AutoSize = true;
		this.label_Technology.Location = new System.Drawing.Point(653, 63);
		this.label_Technology.Name = "label_Technology";
		this.label_Technology.Size = new System.Drawing.Size(63, 13);
		this.label_Technology.TabIndex = 4;
		this.label_Technology.Text = "Technology";
		this.groupBox_TechnologyConfiguration.Controls.Add(this.comboBox_XTTTimeoutOffset);
		this.groupBox_TechnologyConfiguration.Controls.Add(this.label_XTTTimeoutOffset);
		this.groupBox_TechnologyConfiguration.Controls.Add(this.label_Engine);
		this.groupBox_TechnologyConfiguration.Controls.Add(this.comboBox_Engine);
		this.groupBox_TechnologyConfiguration.Controls.Add(this.comboBox_Technology);
		this.groupBox_TechnologyConfiguration.Controls.Add(this.label_Technology);
		this.groupBox_TechnologyConfiguration.Controls.Add(this.comboBox_XTTTimeout);
		this.groupBox_TechnologyConfiguration.Controls.Add(this.label_XTTTimeout);
		this.groupBox_TechnologyConfiguration.Controls.Add(this.button_BrowseXTT);
		this.groupBox_TechnologyConfiguration.Controls.Add(this.textBox_XTTPath);
		this.groupBox_TechnologyConfiguration.Controls.Add(this.label_XTTPath);
		this.groupBox_TechnologyConfiguration.Location = new System.Drawing.Point(17, 78);
		this.groupBox_TechnologyConfiguration.Name = "groupBox_TechnologyConfiguration";
		this.groupBox_TechnologyConfiguration.Size = new System.Drawing.Size(922, 87);
		this.groupBox_TechnologyConfiguration.TabIndex = 1;
		this.groupBox_TechnologyConfiguration.TabStop = false;
		this.groupBox_TechnologyConfiguration.Text = "Technology Common Configuration";
		this.comboBox_XTTTimeoutOffset.FormattingEnabled = true;
		this.comboBox_XTTTimeoutOffset.Items.AddRange(new object[4] { "5", "10", "15", "20" });
		this.comboBox_XTTTimeoutOffset.Location = new System.Drawing.Point(341, 60);
		this.comboBox_XTTTimeoutOffset.Name = "comboBox_XTTTimeoutOffset";
		this.comboBox_XTTTimeoutOffset.Size = new System.Drawing.Size(79, 21);
		this.comboBox_XTTTimeoutOffset.TabIndex = 7;
		this.comboBox_XTTTimeoutOffset.Validated += new System.EventHandler(comboBox_XTTTimeoutOffset_Validated);
		this.label_XTTTimeoutOffset.AutoSize = true;
		this.label_XTTTimeoutOffset.Location = new System.Drawing.Point(235, 63);
		this.label_XTTTimeoutOffset.Name = "label_XTTTimeoutOffset";
		this.label_XTTTimeoutOffset.Size = new System.Drawing.Size(100, 13);
		this.label_XTTTimeoutOffset.TabIndex = 6;
		this.label_XTTTimeoutOffset.Text = "XTT Timeout Offset";
		this.comboBox_XTTTimeout.FormattingEnabled = true;
		this.comboBox_XTTTimeout.Items.AddRange(new object[10] { "60", "90", "120", "150", "240", "300", "600", "1200", "2400", "4800" });
		this.comboBox_XTTTimeout.Location = new System.Drawing.Point(133, 60);
		this.comboBox_XTTTimeout.Name = "comboBox_XTTTimeout";
		this.comboBox_XTTTimeout.Size = new System.Drawing.Size(79, 21);
		this.comboBox_XTTTimeout.TabIndex = 5;
		this.comboBox_XTTTimeout.Validated += new System.EventHandler(comboBox_XTTTimeout_Validated);
		this.label_XTTTimeout.AutoSize = true;
		this.label_XTTTimeout.Location = new System.Drawing.Point(34, 63);
		this.label_XTTTimeout.Name = "label_XTTTimeout";
		this.label_XTTTimeout.Size = new System.Drawing.Size(93, 13);
		this.label_XTTTimeout.TabIndex = 4;
		this.label_XTTTimeout.Text = "Test Plan Timeout";
		this.button_BrowseXTT.Location = new System.Drawing.Point(762, 19);
		this.button_BrowseXTT.Name = "button_BrowseXTT";
		this.button_BrowseXTT.Size = new System.Drawing.Size(108, 30);
		this.button_BrowseXTT.TabIndex = 2;
		this.button_BrowseXTT.Text = "Browse...";
		this.button_BrowseXTT.UseVisualStyleBackColor = true;
		this.button_BrowseXTT.Click += new System.EventHandler(button_BrowseXTT_Click);
		this.textBox_XTTPath.ForeColor = System.Drawing.SystemColors.InactiveCaptionText;
		this.textBox_XTTPath.Location = new System.Drawing.Point(130, 25);
		this.textBox_XTTPath.Name = "textBox_XTTPath";
		this.textBox_XTTPath.ReadOnly = true;
		this.textBox_XTTPath.Size = new System.Drawing.Size(586, 20);
		this.textBox_XTTPath.TabIndex = 1;
		this.textBox_XTTPath.TextChanged += new System.EventHandler(textBox_XTTPath_TextChanged);
		this.label_XTTPath.AutoSize = true;
		this.label_XTTPath.Location = new System.Drawing.Point(44, 28);
		this.label_XTTPath.Name = "label_XTTPath";
		this.label_XTTPath.Size = new System.Drawing.Size(80, 13);
		this.label_XTTPath.TabIndex = 0;
		this.label_XTTPath.Text = "Test Plan Path:";
		this.groupBox_TechnologySpecificGV.Controls.Add(this.button_Add);
		this.groupBox_TechnologySpecificGV.Controls.Add(this.button_Remove);
		this.groupBox_TechnologySpecificGV.Controls.Add(this.button_Modify);
		this.groupBox_TechnologySpecificGV.Controls.Add(this.datagridview_TechnologyGV);
		this.groupBox_TechnologySpecificGV.Location = new System.Drawing.Point(17, 171);
		this.groupBox_TechnologySpecificGV.Name = "groupBox_TechnologySpecificGV";
		this.groupBox_TechnologySpecificGV.Size = new System.Drawing.Size(411, 387);
		this.groupBox_TechnologySpecificGV.TabIndex = 2;
		this.groupBox_TechnologySpecificGV.TabStop = false;
		this.groupBox_TechnologySpecificGV.Text = "Technology Specific Global Variable";
		this.button_Add.Location = new System.Drawing.Point(151, 350);
		this.button_Add.Name = "button_Add";
		this.button_Add.Size = new System.Drawing.Size(108, 30);
		this.button_Add.TabIndex = 5;
		this.button_Add.Text = "Add";
		this.button_Add.UseVisualStyleBackColor = true;
		this.button_Add.Click += new System.EventHandler(button_Add_Click);
		this.button_Remove.Location = new System.Drawing.Point(291, 350);
		this.button_Remove.Name = "button_Remove";
		this.button_Remove.Size = new System.Drawing.Size(108, 30);
		this.button_Remove.TabIndex = 4;
		this.button_Remove.Text = "Remove";
		this.button_Remove.UseVisualStyleBackColor = true;
		this.button_Remove.Click += new System.EventHandler(button_Remove_Click);
		this.button_Modify.Location = new System.Drawing.Point(11, 350);
		this.button_Modify.Name = "button_Modify";
		this.button_Modify.Size = new System.Drawing.Size(108, 30);
		this.button_Modify.TabIndex = 3;
		this.button_Modify.Text = "Modify";
		this.button_Modify.UseVisualStyleBackColor = true;
		this.button_Modify.Click += new System.EventHandler(button_Modify_Click);
		this.datagridview_TechnologyGV.AllowUserToAddRows = false;
		this.datagridview_TechnologyGV.AllowUserToResizeColumns = false;
		this.datagridview_TechnologyGV.AllowUserToResizeRows = false;
		this.datagridview_TechnologyGV.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
		this.datagridview_TechnologyGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		this.datagridview_TechnologyGV.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
		this.datagridview_TechnologyGV.Location = new System.Drawing.Point(11, 26);
		this.datagridview_TechnologyGV.MultiSelect = false;
		this.datagridview_TechnologyGV.Name = "datagridview_TechnologyGV";
		this.datagridview_TechnologyGV.ReadOnly = true;
		this.datagridview_TechnologyGV.RowHeadersVisible = false;
		this.datagridview_TechnologyGV.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
		this.datagridview_TechnologyGV.Size = new System.Drawing.Size(389, 308);
		this.datagridview_TechnologyGV.TabIndex = 0;
		this.datagridview_TechnologyGV.SelectionChanged += new System.EventHandler(datagridview_TechnologyGV_SelectionChanged);
		this.groupBox_TechnologyQuickEditor.Controls.Add(this.elementHost);
		this.groupBox_TechnologyQuickEditor.Location = new System.Drawing.Point(434, 171);
		this.groupBox_TechnologyQuickEditor.Name = "groupBox_TechnologyQuickEditor";
		this.groupBox_TechnologyQuickEditor.Size = new System.Drawing.Size(504, 386);
		this.groupBox_TechnologyQuickEditor.TabIndex = 3;
		this.groupBox_TechnologyQuickEditor.TabStop = false;
		this.groupBox_TechnologyQuickEditor.Text = "Technology Specific Configuration Quick Editor";
		this.elementHost.Location = new System.Drawing.Point(6, 26);
		this.elementHost.Name = "elementHost";
		this.elementHost.Size = new System.Drawing.Size(492, 354);
		this.elementHost.TabIndex = 0;
		this.elementHost.Child = null;
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.Controls.Add(this.groupBox_TechnologyQuickEditor);
		base.Controls.Add(this.groupBox_TechnologySpecificGV);
		base.Controls.Add(this.groupBox_TechnologyConfiguration);
		base.Controls.Add(this.groupBox_General);
		base.Name = "ProductConfigControl";
		base.Size = new System.Drawing.Size(956, 565);
		this.groupBox_General.ResumeLayout(false);
		this.groupBox_General.PerformLayout();
		this.groupBox_TechnologyConfiguration.ResumeLayout(false);
		this.groupBox_TechnologyConfiguration.PerformLayout();
		this.groupBox_TechnologySpecificGV.ResumeLayout(false);
		((System.ComponentModel.ISupportInitialize)this.datagridview_TechnologyGV).EndInit();
		this.groupBox_TechnologyQuickEditor.ResumeLayout(false);
		base.ResumeLayout(false);
	}
}
