using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using MultiLanguageManger;

namespace QC.QMSCT;

public class QMSCTConfiguration : UserControl
{
	private enum LanguageSetting
	{
		LANG_ENG,
		LANG_CHN
	}

	public delegate void QmsctConfigurationNumberOfPanelsChanged(int numberOfPanels);

	public delegate void QmsctConfigurationNumberOfColumnsChanged(int numberOfColumns);

	public delegate void QmsctConfigurationLanguageChanged(string Language);

	public delegate void QmsctResetStationYieldClick();

	public delegate void QmsctLoadStationConfiguration(string filename);

	private QMSCTUserMode qmsctMode;

	private List<string> logFilter = new List<string>();

	private string configRootFolder = "";

	private int numberOfPanels = 4;

	private int numberOfColumns = 4;

	private bool getSNFromEngine;

	private bool showDebugMessagesFromEngine;

	private bool saveMessagesToFile;

	private bool showSameColor;

	private string appLanguage;

	private string fileName;

	private IContainer components;

	private Label label_NumOfUnits;

	private ComboBox comboBox_NumOfUnits;

	private CheckBox checkBox_SameColor;

	private ComboBox comboBox_Language;

	private Label label_Language;

	private CheckBox checkBox_DisplayDebugMessages;

	private Label label_StationName;

	private Button button_resetStationYield;

	public TextBox textBox_StationName;

	private Button stationName_Browsebutton;

	private CheckBox checkBox_GetSNFromEngine;

	private ComboBox comboBox_MsgType;

	private Button btnAddFilter;

	private Button btnRemoveFilter;

	private ComboBox comboBox_NumOfColumns;

	private Label label_PerRow;

	private Label label_Totally;

	private ListBox lstMsgFilters;

	private Label label_Filter;

	private GroupBox groupBox_Filter;

	private CheckBox checkBox_SaveMessages;

	public QMSCTUserMode QMSCTMode
	{
		get
		{
			return qmsctMode;
		}
		set
		{
			qmsctMode = value;
		}
	}

	public int NumberOfPanels => numberOfPanels;

	public int NumberOfColumns => numberOfColumns;

	public bool GetSNFromEngine => getSNFromEngine;

	public bool ShowDebugMessagesFromEngine => showDebugMessagesFromEngine;

	public bool SaveMessagesToFile => saveMessagesToFile;

	public bool ShowSameColor => showSameColor;

	public string FileName => fileName;

	public string AppLanguage => appLanguage;

	public List<string> LogFilter => logFilter;

	public event QmsctConfigurationNumberOfPanelsChanged OnQmsctConfigurationNumberOfPanelsChanged;

	public event QmsctConfigurationNumberOfColumnsChanged OnQmsctConfigurationNumberOfColumnsChanged;

	public event QmsctConfigurationLanguageChanged OnQmsctConfigurationLanguageChanged;

	public event QmsctResetStationYieldClick OnQmsctResetStationYieldClick;

	public event QmsctLoadStationConfiguration OnQmsctLoadStationConfiguration;

	public QMSCTConfiguration()
	{
		InitializeComponent();
	}

	public void InitializePage()
	{
		comboBox_Language.Items.Clear();
		comboBox_Language.Items.Add(CommonResource.DropBox_LangEN);
		comboBox_Language.Items.Add(CommonResource.DropBox_LangCH);
		comboBox_NumOfUnits.Items.Clear();
		for (int i = 1; i <= 16; i++)
		{
			comboBox_NumOfUnits.Items.Add(i.ToString());
		}
		comboBox_NumOfColumns.Items.Clear();
		for (int j = 1; j <= 8; j++)
		{
			comboBox_NumOfColumns.Items.Add(j.ToString());
		}
	}

	public void LoadConfig(string configrootfolder, StationConfiguration qmsctstationsetup)
	{
		configRootFolder = configrootfolder;
		fileName = qmsctstationsetup.Filename;
		numberOfPanels = qmsctstationsetup.NumberOfPanels;
		numberOfColumns = qmsctstationsetup.NumberOfColumns;
		getSNFromEngine = qmsctstationsetup.GetSNFromEngine;
		showDebugMessagesFromEngine = qmsctstationsetup.ShowDebugMessagesFromEngine;
		saveMessagesToFile = qmsctstationsetup.SaveMessagesToFile;
		showSameColor = qmsctstationsetup.ShowSameColor;
		appLanguage = qmsctstationsetup.AppLanguage;
		try
		{
			if (qmsctstationsetup == null || qmsctstationsetup.MessageFilter == null)
			{
				logFilter.Clear();
			}
			else if (qmsctstationsetup.LogCategories != null)
			{
				logFilter.Clear();
				string[] logCategories = qmsctstationsetup.LogCategories;
				foreach (string item in logCategories)
				{
					if (!logFilter.Contains(item))
					{
						logFilter.Add(item);
					}
				}
			}
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
		UpdateGui();
	}

	public void UpdateGui()
	{
		try
		{
			textBox_StationName.Text = fileName;
			if (comboBox_NumOfUnits.Items.Count >= numberOfPanels)
			{
				comboBox_NumOfUnits.SelectedIndex = numberOfPanels - 1;
			}
			else
			{
				MessageBox.Show(numberOfPanels + " " + CommonResource.BoxMsgPanelNumOverrange);
				comboBox_NumOfUnits.SelectedIndex = comboBox_NumOfUnits.Items.Count - 1;
			}
			if (comboBox_NumOfColumns.Items.Count >= numberOfColumns)
			{
				comboBox_NumOfColumns.SelectedIndex = numberOfColumns - 1;
			}
			else
			{
				MessageBox.Show(numberOfColumns + " " + CommonResource.BoxMsgPanelNumOverrange);
				comboBox_NumOfColumns.SelectedIndex = comboBox_NumOfColumns.Items.Count - 1;
			}
			checkBox_SameColor.Checked = showSameColor;
			checkBox_DisplayDebugMessages.Checked = showDebugMessagesFromEngine;
			checkBox_SaveMessages.Checked = saveMessagesToFile;
			checkBox_GetSNFromEngine.Checked = getSNFromEngine;
			UpdateMsgFilterList(logFilter);
			UpdateLanguageComboBox();
			checkBox_SaveMessages.Enabled = checkBox_DisplayDebugMessages.Checked;
			UpdateMessageFilterGroup();
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	public bool HasGUIBeenModified()
	{
		if (!(textBox_StationName.Text != fileName) && NumOfUnitsSelected() == numberOfPanels && NumOfColumnsSelected() == numberOfColumns && checkBox_DisplayDebugMessages.Checked == showDebugMessagesFromEngine && checkBox_SaveMessages.Checked == saveMessagesToFile && appLanguage.ToUpper().Equals(GetLanguageSetting()) && checkBox_SameColor.Checked == showSameColor && checkBox_GetSNFromEngine.Checked == getSNFromEngine)
		{
			return HasLogFilterBeenModified();
		}
		return true;
	}

	public bool HasLogFilterBeenModified()
	{
		try
		{
			List<string> list = ConvertToFilterList();
			if (logFilter.Count != list.Count)
			{
				return true;
			}
			foreach (string item in list)
			{
				if (!logFilter.Contains(item))
				{
					return true;
				}
			}
			return false;
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
			return false;
		}
	}

	public int NumOfUnitsSelected()
	{
		return comboBox_NumOfUnits.SelectedIndex + 1;
	}

	public int NumOfColumnsSelected()
	{
		return comboBox_NumOfColumns.SelectedIndex + 1;
	}

	public void UpdateAndSave()
	{
		try
		{
			fileName = textBox_StationName.Text;
			numberOfPanels = NumOfUnitsSelected();
			numberOfColumns = NumOfColumnsSelected();
			showDebugMessagesFromEngine = checkBox_DisplayDebugMessages.Checked;
			saveMessagesToFile = checkBox_SaveMessages.Checked;
			appLanguage = GetLanguageSetting();
			showSameColor = checkBox_SameColor.Checked;
			getSNFromEngine = checkBox_GetSNFromEngine.Checked;
			logFilter = ConvertToFilterList();
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	private void qmsctConfig_Gui_Change(object sender, EventArgs e)
	{
		if (((Control)sender).Name.CompareTo("comboBox_NumOfUnits") == 0 && this.OnQmsctConfigurationNumberOfPanelsChanged != null)
		{
			this.OnQmsctConfigurationNumberOfPanelsChanged(NumOfUnitsSelected());
		}
		if (((Control)sender).Name.CompareTo("comboBox_NumOfColumns") == 0 && this.OnQmsctConfigurationNumberOfColumnsChanged != null)
		{
			this.OnQmsctConfigurationNumberOfColumnsChanged(NumOfColumnsSelected());
		}
		if (((Control)sender).Name.CompareTo("comboBox_Language") == 0 && this.OnQmsctConfigurationLanguageChanged != null)
		{
			this.OnQmsctConfigurationLanguageChanged(GetLanguageSetting());
		}
	}

	private void UpdateLanguageComboBox()
	{
		if (appLanguage != null)
		{
			switch (appLanguage.ToUpper())
			{
			case "ENGLISH":
				comboBox_Language.SelectedIndex = 0;
				break;
			case "CHINESE":
				comboBox_Language.SelectedIndex = 1;
				break;
			}
		}
	}

	public string GetLanguageSetting()
	{
		return (LanguageSetting)comboBox_Language.SelectedIndex switch
		{
			LanguageSetting.LANG_ENG => "ENGLISH", 
			LanguageSetting.LANG_CHN => "CHINESE", 
			_ => "ENGLISH", 
		};
	}

	public void UpdateLanguage()
	{
		checkBox_DisplayDebugMessages.Text = CommonResource.CheckBox_DisplayDebugMessages;
		checkBox_SaveMessages.Text = CommonResource.CheckBox_SaveMessagesToFile;
		label_NumOfUnits.Text = CommonResource.Label_NumOfUnits;
		label_Totally.Text = CommonResource.Label_PanelsTotally;
		label_PerRow.Text = CommonResource.Label_PanelsPerRow;
		checkBox_SameColor.Text = CommonResource.CheckBox_SameColor;
		label_Language.Text = CommonResource.Label_Language;
		checkBox_GetSNFromEngine.Text = CommonResource.CheckBox_GetSNFromEngine;
		button_resetStationYield.Text = CommonResource.Button_ResetStationYield;
		stationName_Browsebutton.Text = CommonResource.Button_Browse;
		btnAddFilter.Text = CommonResource.Button_AddFilter;
		btnRemoveFilter.Text = CommonResource.Button_RemoveFilter;
		label_Filter.Text = CommonResource.Label_Filter;
		groupBox_Filter.Text = CommonResource.GroupBox_Filter;
	}

	public void UpdateMessageFilterGroup()
	{
		groupBox_Filter.Enabled = checkBox_DisplayDebugMessages.Checked;
	}

	public List<string> ConvertToFilterList()
	{
		List<string> list = new List<string>();
		try
		{
			for (int i = 0; i < lstMsgFilters.Items.Count; i++)
			{
				list.Add(lstMsgFilters.Items[i].ToString());
			}
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
		return list;
	}

	public void UpdateMsgFilterList(List<string> msgFilters)
	{
		lstMsgFilters.Items.Clear();
		foreach (string msgFilter in msgFilters)
		{
			lstMsgFilters.Items.Add(msgFilter.ToUpper());
		}
		UpdateMsgFilterButton();
	}

	public void AddMsgFilter(string msgFilter)
	{
		if (!lstMsgFilters.Items.Contains(msgFilter.ToUpper()))
		{
			lstMsgFilters.Items.Add(msgFilter.ToUpper());
		}
		UpdateMsgFilterButton();
	}

	public void RemoveSelectedMsgFilter()
	{
		lstMsgFilters.Items.RemoveAt(lstMsgFilters.SelectedIndex);
		UpdateMsgFilterButton();
	}

	public void UpdateMsgFilterButton()
	{
		if (lstMsgFilters.SelectedIndex < 0)
		{
			btnRemoveFilter.Enabled = false;
		}
		else
		{
			btnRemoveFilter.Enabled = true;
		}
		if (string.IsNullOrEmpty(comboBox_MsgType.Text))
		{
			btnAddFilter.Enabled = false;
		}
		else
		{
			btnAddFilter.Enabled = true;
		}
	}

	private void btnAddFilter_Click(object sender, EventArgs e)
	{
		try
		{
			AddMsgFilter(comboBox_MsgType.Text);
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	private void btnRemoveFilter_Click(object sender, EventArgs e)
	{
		try
		{
			RemoveSelectedMsgFilter();
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	private void lstMsgFilters_SelectedIndexChanged(object sender, EventArgs e)
	{
		UpdateMsgFilterButton();
	}

	private void comboBox_MsgType_KeyPress(object sender, KeyPressEventArgs e)
	{
	}

	private void comboBox_MsgType_TextChanged(object sender, EventArgs e)
	{
		UpdateMsgFilterButton();
	}

	private void comboBox_MsgType_SelectedIndexChanged(object sender, EventArgs e)
	{
		UpdateMsgFilterButton();
	}

	private void stationName_Browsebutton_Click(object sender, EventArgs e)
	{
		string filter = "Station Config Files (*.scfg)|*.scfg";
		string initialDir = configRootFolder;
		string file = FileFolderBrowser.GetFile(filter, initialDir);
		if (!File.Exists(file))
		{
			return;
		}
		if (Path.GetDirectoryName(file) == configRootFolder)
		{
			textBox_StationName.Text = file;
			if (this.OnQmsctLoadStationConfiguration != null)
			{
				this.OnQmsctLoadStationConfiguration(file);
			}
		}
		else
		{
			MessageBox.Show(CommonResource.BoxMsgRequireRootFolder + configRootFolder);
		}
	}

	private void button_resetStationYield_Click(object sender, EventArgs e)
	{
		this.OnQmsctResetStationYieldClick();
	}

	private void checkBox_ShowDebugMessage_Change(object sender, EventArgs e)
	{
		checkBox_SaveMessages.Enabled = checkBox_DisplayDebugMessages.Checked;
		UpdateMessageFilterGroup();
	}

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

	private void InitializeComponent()
	{
		this.label_NumOfUnits = new System.Windows.Forms.Label();
		this.comboBox_NumOfUnits = new System.Windows.Forms.ComboBox();
		this.button_resetStationYield = new System.Windows.Forms.Button();
		this.label_StationName = new System.Windows.Forms.Label();
		this.comboBox_Language = new System.Windows.Forms.ComboBox();
		this.label_Language = new System.Windows.Forms.Label();
		this.checkBox_SameColor = new System.Windows.Forms.CheckBox();
		this.checkBox_DisplayDebugMessages = new System.Windows.Forms.CheckBox();
		this.textBox_StationName = new System.Windows.Forms.TextBox();
		this.stationName_Browsebutton = new System.Windows.Forms.Button();
		this.checkBox_GetSNFromEngine = new System.Windows.Forms.CheckBox();
		this.comboBox_MsgType = new System.Windows.Forms.ComboBox();
		this.btnAddFilter = new System.Windows.Forms.Button();
		this.btnRemoveFilter = new System.Windows.Forms.Button();
		this.comboBox_NumOfColumns = new System.Windows.Forms.ComboBox();
		this.label_PerRow = new System.Windows.Forms.Label();
		this.label_Totally = new System.Windows.Forms.Label();
		this.lstMsgFilters = new System.Windows.Forms.ListBox();
		this.label_Filter = new System.Windows.Forms.Label();
		this.groupBox_Filter = new System.Windows.Forms.GroupBox();
		this.checkBox_SaveMessages = new System.Windows.Forms.CheckBox();
		this.groupBox_Filter.SuspendLayout();
		base.SuspendLayout();
		this.label_NumOfUnits.Location = new System.Drawing.Point(156, 96);
		this.label_NumOfUnits.Name = "label_NumOfUnits";
		this.label_NumOfUnits.Size = new System.Drawing.Size(91, 13);
		this.label_NumOfUnits.TabIndex = 0;
		this.label_NumOfUnits.Text = "Number of Panels";
		this.label_NumOfUnits.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.comboBox_NumOfUnits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.comboBox_NumOfUnits.FormattingEnabled = true;
		this.comboBox_NumOfUnits.Items.AddRange(new object[16]
		{
			"1", "2", "3", "4", "5", "6", "7", "8", "9", "10",
			"11", "12", "13", "14", "15", "16"
		});
		this.comboBox_NumOfUnits.Location = new System.Drawing.Point(253, 80);
		this.comboBox_NumOfUnits.Name = "comboBox_NumOfUnits";
		this.comboBox_NumOfUnits.Size = new System.Drawing.Size(53, 21);
		this.comboBox_NumOfUnits.TabIndex = 9;
		this.comboBox_NumOfUnits.SelectedValueChanged += new System.EventHandler(qmsctConfig_Gui_Change);
		this.button_resetStationYield.Location = new System.Drawing.Point(15, 77);
		this.button_resetStationYield.Name = "button_resetStationYield";
		this.button_resetStationYield.Size = new System.Drawing.Size(135, 51);
		this.button_resetStationYield.TabIndex = 46;
		this.button_resetStationYield.Text = "Reset Station Yield";
		this.button_resetStationYield.UseVisualStyleBackColor = true;
		this.button_resetStationYield.Click += new System.EventHandler(button_resetStationYield_Click);
		this.label_StationName.AutoSize = true;
		this.label_StationName.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
		this.label_StationName.Location = new System.Drawing.Point(12, 13);
		this.label_StationName.Name = "label_StationName";
		this.label_StationName.Size = new System.Drawing.Size(74, 13);
		this.label_StationName.TabIndex = 45;
		this.label_StationName.Text = "Station Name:";
		this.comboBox_Language.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.comboBox_Language.FormattingEnabled = true;
		this.comboBox_Language.Location = new System.Drawing.Point(496, 29);
		this.comboBox_Language.Name = "comboBox_Language";
		this.comboBox_Language.Size = new System.Drawing.Size(100, 21);
		this.comboBox_Language.TabIndex = 41;
		this.comboBox_Language.SelectedValueChanged += new System.EventHandler(qmsctConfig_Gui_Change);
		this.label_Language.Location = new System.Drawing.Point(435, 28);
		this.label_Language.Name = "label_Language";
		this.label_Language.Size = new System.Drawing.Size(55, 18);
		this.label_Language.TabIndex = 42;
		this.label_Language.Text = "Language";
		this.label_Language.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.checkBox_SameColor.AutoSize = true;
		this.checkBox_SameColor.Location = new System.Drawing.Point(425, 84);
		this.checkBox_SameColor.Name = "checkBox_SameColor";
		this.checkBox_SameColor.Size = new System.Drawing.Size(80, 17);
		this.checkBox_SameColor.TabIndex = 40;
		this.checkBox_SameColor.Text = "Same Color";
		this.checkBox_SameColor.UseVisualStyleBackColor = true;
		this.checkBox_SameColor.CheckedChanged += new System.EventHandler(qmsctConfig_Gui_Change);
		this.checkBox_DisplayDebugMessages.AutoSize = true;
		this.checkBox_DisplayDebugMessages.Location = new System.Drawing.Point(614, 3);
		this.checkBox_DisplayDebugMessages.Name = "checkBox_DisplayDebugMessages";
		this.checkBox_DisplayDebugMessages.Size = new System.Drawing.Size(111, 17);
		this.checkBox_DisplayDebugMessages.TabIndex = 32;
		this.checkBox_DisplayDebugMessages.Text = "Display Messages";
		this.checkBox_DisplayDebugMessages.UseVisualStyleBackColor = true;
		this.checkBox_DisplayDebugMessages.CheckedChanged += new System.EventHandler(checkBox_ShowDebugMessage_Change);
		this.textBox_StationName.Location = new System.Drawing.Point(15, 29);
		this.textBox_StationName.Name = "textBox_StationName";
		this.textBox_StationName.ReadOnly = true;
		this.textBox_StationName.Size = new System.Drawing.Size(333, 20);
		this.textBox_StationName.TabIndex = 47;
		this.stationName_Browsebutton.Location = new System.Drawing.Point(354, 26);
		this.stationName_Browsebutton.Name = "stationName_Browsebutton";
		this.stationName_Browsebutton.Size = new System.Drawing.Size(75, 23);
		this.stationName_Browsebutton.TabIndex = 48;
		this.stationName_Browsebutton.Text = "Browse";
		this.stationName_Browsebutton.UseVisualStyleBackColor = true;
		this.stationName_Browsebutton.Click += new System.EventHandler(stationName_Browsebutton_Click);
		this.checkBox_GetSNFromEngine.AutoSize = true;
		this.checkBox_GetSNFromEngine.Location = new System.Drawing.Point(425, 109);
		this.checkBox_GetSNFromEngine.Name = "checkBox_GetSNFromEngine";
		this.checkBox_GetSNFromEngine.Size = new System.Drawing.Size(168, 17);
		this.checkBox_GetSNFromEngine.TabIndex = 49;
		this.checkBox_GetSNFromEngine.Text = "Get SN From Unit Programmer";
		this.checkBox_GetSNFromEngine.UseVisualStyleBackColor = true;
		this.checkBox_GetSNFromEngine.CheckedChanged += new System.EventHandler(qmsctConfig_Gui_Change);
		this.comboBox_MsgType.FormattingEnabled = true;
		this.comboBox_MsgType.Items.AddRange(new object[7] { "HTML window", "TPL3 Tabs", "Debug", "Log", "Error", "Temp", "CallBack" });
		this.comboBox_MsgType.Location = new System.Drawing.Point(174, 19);
		this.comboBox_MsgType.Name = "comboBox_MsgType";
		this.comboBox_MsgType.RightToLeft = System.Windows.Forms.RightToLeft.No;
		this.comboBox_MsgType.Size = new System.Drawing.Size(146, 21);
		this.comboBox_MsgType.TabIndex = 51;
		this.comboBox_MsgType.SelectedIndexChanged += new System.EventHandler(comboBox_MsgType_SelectedIndexChanged);
		this.comboBox_MsgType.TextChanged += new System.EventHandler(comboBox_MsgType_TextChanged);
		this.btnAddFilter.Location = new System.Drawing.Point(174, 46);
		this.btnAddFilter.Name = "btnAddFilter";
		this.btnAddFilter.RightToLeft = System.Windows.Forms.RightToLeft.No;
		this.btnAddFilter.Size = new System.Drawing.Size(64, 23);
		this.btnAddFilter.TabIndex = 53;
		this.btnAddFilter.Text = "Add";
		this.btnAddFilter.UseVisualStyleBackColor = true;
		this.btnAddFilter.Click += new System.EventHandler(btnAddFilter_Click);
		this.btnRemoveFilter.Enabled = false;
		this.btnRemoveFilter.Location = new System.Drawing.Point(256, 46);
		this.btnRemoveFilter.Name = "btnRemoveFilter";
		this.btnRemoveFilter.RightToLeft = System.Windows.Forms.RightToLeft.No;
		this.btnRemoveFilter.Size = new System.Drawing.Size(64, 23);
		this.btnRemoveFilter.TabIndex = 54;
		this.btnRemoveFilter.Text = "Remove";
		this.btnRemoveFilter.UseVisualStyleBackColor = true;
		this.btnRemoveFilter.Click += new System.EventHandler(btnRemoveFilter_Click);
		this.comboBox_NumOfColumns.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.comboBox_NumOfColumns.FormattingEnabled = true;
		this.comboBox_NumOfColumns.Items.AddRange(new object[16]
		{
			"1", "2", "3", "4", "5", "6", "7", "8", "9", "10",
			"11", "12", "13", "14", "15", "16"
		});
		this.comboBox_NumOfColumns.Location = new System.Drawing.Point(253, 107);
		this.comboBox_NumOfColumns.Name = "comboBox_NumOfColumns";
		this.comboBox_NumOfColumns.Size = new System.Drawing.Size(53, 21);
		this.comboBox_NumOfColumns.TabIndex = 56;
		this.label_PerRow.AutoSize = true;
		this.label_PerRow.Location = new System.Drawing.Point(314, 113);
		this.label_PerRow.Name = "label_PerRow";
		this.label_PerRow.Size = new System.Drawing.Size(66, 13);
		this.label_PerRow.TabIndex = 57;
		this.label_PerRow.Text = "Panels/Row";
		this.label_PerRow.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
		this.label_Totally.AutoSize = true;
		this.label_Totally.Location = new System.Drawing.Point(314, 84);
		this.label_Totally.Name = "label_Totally";
		this.label_Totally.Size = new System.Drawing.Size(73, 13);
		this.label_Totally.TabIndex = 58;
		this.label_Totally.Text = "Panels Totally";
		this.label_Totally.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
		this.lstMsgFilters.FormattingEnabled = true;
		this.lstMsgFilters.Location = new System.Drawing.Point(11, 18);
		this.lstMsgFilters.Name = "lstMsgFilters";
		this.lstMsgFilters.RightToLeft = System.Windows.Forms.RightToLeft.No;
		this.lstMsgFilters.Size = new System.Drawing.Size(146, 95);
		this.lstMsgFilters.TabIndex = 59;
		this.lstMsgFilters.SelectedIndexChanged += new System.EventHandler(lstMsgFilters_SelectedIndexChanged);
		this.label_Filter.Location = new System.Drawing.Point(174, 79);
		this.label_Filter.Name = "label_Filter";
		this.label_Filter.RightToLeft = System.Windows.Forms.RightToLeft.No;
		this.label_Filter.Size = new System.Drawing.Size(146, 34);
		this.label_Filter.TabIndex = 60;
		this.label_Filter.Text = "Message Type in Filter List is not Shown";
		this.label_Filter.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
		this.groupBox_Filter.Controls.Add(this.lstMsgFilters);
		this.groupBox_Filter.Controls.Add(this.label_Filter);
		this.groupBox_Filter.Controls.Add(this.comboBox_MsgType);
		this.groupBox_Filter.Controls.Add(this.btnAddFilter);
		this.groupBox_Filter.Controls.Add(this.btnRemoveFilter);
		this.groupBox_Filter.Location = new System.Drawing.Point(614, 25);
		this.groupBox_Filter.Name = "groupBox_Filter";
		this.groupBox_Filter.RightToLeft = System.Windows.Forms.RightToLeft.No;
		this.groupBox_Filter.Size = new System.Drawing.Size(331, 120);
		this.groupBox_Filter.TabIndex = 61;
		this.groupBox_Filter.TabStop = false;
		this.groupBox_Filter.Text = "Message Filter Setup";
		this.checkBox_SaveMessages.AutoSize = true;
		this.checkBox_SaveMessages.Location = new System.Drawing.Point(788, 3);
		this.checkBox_SaveMessages.Name = "checkBox_SaveMessages";
		this.checkBox_SaveMessages.Size = new System.Drawing.Size(133, 17);
		this.checkBox_SaveMessages.TabIndex = 62;
		this.checkBox_SaveMessages.Text = "Save Messages to File";
		this.checkBox_SaveMessages.UseVisualStyleBackColor = true;
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.Controls.Add(this.checkBox_SaveMessages);
		base.Controls.Add(this.checkBox_DisplayDebugMessages);
		base.Controls.Add(this.groupBox_Filter);
		base.Controls.Add(this.label_Totally);
		base.Controls.Add(this.label_PerRow);
		base.Controls.Add(this.comboBox_NumOfColumns);
		base.Controls.Add(this.checkBox_GetSNFromEngine);
		base.Controls.Add(this.stationName_Browsebutton);
		base.Controls.Add(this.textBox_StationName);
		base.Controls.Add(this.label_StationName);
		base.Controls.Add(this.button_resetStationYield);
		base.Controls.Add(this.label_NumOfUnits);
		base.Controls.Add(this.comboBox_NumOfUnits);
		base.Controls.Add(this.label_Language);
		base.Controls.Add(this.checkBox_SameColor);
		base.Controls.Add(this.comboBox_Language);
		base.Name = "QMSCTConfiguration";
		base.Size = new System.Drawing.Size(958, 162);
		this.groupBox_Filter.ResumeLayout(false);
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
