using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Serialization;

namespace QDART_MFG_CfgEditor;

public class WCNPanel : UserControl
{
	public delegate void TargetFileChangedEventHandler(string targetfile);

	public const string BT = "BT";

	public const string WLAN = "WLAN";

	public const string GPIB = "GPIB";

	public const string IP = "IP";

	public const string USB = "USB";

	public const string STRNULL = "NULL";

	public const string WCN_WORK_DIR = "C:\\Qualcomm\\WCN\\ProdTests\\ConfigFiles\\";

	public const int GetNameWLAN = 1;

	public const int GetNameBt = 2;

	public const int GetIHW = 3;

	public const int GetBid = 4;

	public const int GetPad = 5;

	public const int GetSad = 6;

	public const int GetWaveBT = 7;

	public const int SetLE1a = 101;

	public const int SetDH1 = 102;

	public const int SetDH5 = 103;

	public const int Set2DH5 = 104;

	public const int Set3DH5 = 105;

	public const int SetListMode = 106;

	private int max_dut;

	private int cur_dut;

	private bool bLoadDefault;

	private WCNResult result = new WCNResult();

	private string target_file;

	private Dictionary<string, string> source_filemap = new Dictionary<string, string>();

	private Dictionary<string, string> other_filemap = new Dictionary<string, string>();

	private Dictionary<string, string> scpiOptCfgInfo = new Dictionary<string, string>();

	private Dictionary<string, Dictionary<string, List<string>>> btInstlist = new Dictionary<string, Dictionary<string, List<string>>>();

	private Dictionary<string, Dictionary<string, List<string>>> wlanInstlist = new Dictionary<string, Dictionary<string, List<string>>>();

	private Dictionary<string, string> btOptionlist = new Dictionary<string, string>();

	private Dictionary<string, string> wlanOptionlist = new Dictionary<string, string>();

	private root rt = new root();

	private root rtwlan = new root();

	private root rtbt = new root();

	private Instrument bt = new Instrument();

	private Instrument wlan = new Instrument();

	private BluetoothConfigFile btExt = new BluetoothConfigFile();

	private string pre_wlInst;

	private string pre_btInst;

	private string RefLevelHeadspace;

	private string TriggerLevelMax;

	private string p80PowerOffset;

	private IContainer components;

	public TextBox tbbtadr;

	public Label lbbtadr;

	public TextBox tbbtpath;

	public Button btnBtPath;

	public Label lbLptBT;

	public TextBox tbwlwv;

	public Button btnwlwv;

	public Label lbWaveBT;

	private FolderBrowserDialog folderBrowserDialog2;

	private CheckBox cb_same_remote;

	private CheckBox cb_wl;

	private CheckBox cb_bt;

	public Label lbNameBT;

	public TextBox tbbtwv;

	public Button btnbtwv;

	public Label lbWaveWlan;

	public ComboBox cbwlpad;

	private TextBox tbwlip;

	public Label lbNameWlan;

	public Label lbRemoteWlan;

	public Label lbwlpad;

	public Label lbwlip;

	private TextBox tbwlvs;

	public Label lbwlvs;

	public TextBox tbwlpath;

	public Button btnWlanPath;

	public Label lbLptWlan;

	private Panel p6;

	private Panel p7;

	private ToolTip toolTip1;

	private Panel plwl;

	private Panel plbt;

	private Panel p4;

	public ComboBoxEx cb_bt_name;

	public ComboBoxEx cb_wl_name;

	private ComboBoxEx cb_wl_remote;

	private FolderBrowserDialog folderBrowserDialog1;

	private OpenFileDialog openFileDialog1;

	private Panel p2;

	private Panel p3;

	private Label label1;

	private ComboBoxEx cb_wl_ihw;

	private Panel p8;

	private Label label3;

	private Label label4;

	private Panel p1;

	private Panel plSameRemote;

	public Label lbwlsad;

	public Label lbwlbid;

	public ComboBox cbwlsad;

	public ComboBox cbwlbid;

	private ComboBox cbwlrfpt;

	private Label lbwlrfpt;

	private TextBox tbwlpt;

	private Label lbwlpt;

	private Panel p5;

	private ComboBox cbbtrfpt;

	private Label lbbtrfpt;

	private TextBox tbbtpt;

	private Label lbbtpt;

	private Label lbbtihw;

	private ComboBoxEx cb_bt_ihw;

	private ComboBoxEx cb_bt_remote;

	private TextBox tbbtvs;

	public Label lbbtsad;

	private TextBox tbbtip;

	public Label lbbtpad;

	public Label lbbtvs;

	public Label lbbtip;

	public Label lbbtbid;

	public Label lbbtrt;

	public ComboBox cbbtsad;

	public ComboBox cbbtbid;

	public ComboBox cbbtpad;

	private Panel p9;

	private Panel plwlrt;

	private Panel plbtrt;

	private Label label2;

	private ComboBoxEx cmbWlanInst;

	private Panel plChain;

	private Label label5;

	private ComboBoxEx cmbWlanChainMap;

	private Panel panel4;

	private TextBox tbVsgDut4;

	private TextBox textBox10;

	private TextBox tbVsaDut4;

	private Panel panel3;

	private TextBox tbVsgDut3;

	private TextBox tbVsaDut3;

	private TextBox textBox7;

	private Panel panel2;

	private TextBox tbVsgDut2;

	private TextBox tbVsaDut2;

	private TextBox textBox4;

	private Panel panel1;

	private TextBox tbVsgDut1;

	private TextBox tbVsaDut1;

	private TextBox textBox1;

	private Label label8;

	private Label label7;

	private Label label6;

	private Panel panel8;

	private TextBox tbVsgDut8;

	private TextBox textBox15;

	private TextBox tbVsaDut8;

	private Panel panel7;

	private TextBox tbVsgDut7;

	private TextBox tbVsaDut7;

	private TextBox textBox13;

	private Panel panel6;

	private TextBox tbVsgDut6;

	private TextBox tbVsaDut6;

	private TextBox textBox9;

	private Panel panel5;

	private TextBox tbVsgDut5;

	private TextBox tbVsaDut5;

	private TextBox textBox5;

	public string TargetFile
	{
		get
		{
			return target_file;
		}
		set
		{
			target_file = value;
		}
	}

	public string PreInstWlan
	{
		get
		{
			return pre_wlInst;
		}
		set
		{
			pre_wlInst = value;
		}
	}

	public string PreInstBt
	{
		get
		{
			return pre_btInst;
		}
		set
		{
			pre_btInst = value;
		}
	}

	public event TargetFileChangedEventHandler TargetFileChanged;

	public WCNPanel(RootConfig cfg, int currentDUT)
	{
		InitializeComponent();
		InitVar(cfg, currentDUT);
		InitControls();
		InitPropertys();
	}

	private void InitVar(RootConfig cfg, int currentDUT)
	{
		max_dut = 1;
		bool.TryParse(cfg.BlankWhenNull, out bLoadDefault);
		int.TryParse(cfg.DUTs, out max_dut);
		cur_dut = currentDUT;
		btInstlist.Clear();
		wlanInstlist.Clear();
		source_filemap.Clear();
		other_filemap.Clear();
		scpiOptCfgInfo.Clear();
		result.WlanSelected = true;
		result.BtSelected = true;
		RootConfigAllInstList[] instList = cfg.All[0].InstList;
		foreach (RootConfigAllInstList rootConfigAllInstList in instList)
		{
			switch (rootConfigAllInstList.Name)
			{
			case "BTInst":
			{
				InfoItem[] infoItem3 = rootConfigAllInstList.InfoItem;
				foreach (InfoItem infoItem4 in infoItem3)
				{
					btInstlist.Add(infoItem4.Name, GetInstIhwRemoteMap(infoItem4.Value));
				}
				break;
			}
			case "WLANInst":
			{
				InfoItem[] infoItem = rootConfigAllInstList.InfoItem;
				foreach (InfoItem infoItem2 in infoItem)
				{
					wlanInstlist.Add(infoItem2.Name, GetInstIhwRemoteMap(infoItem2.Value));
				}
				break;
			}
			}
		}
		string text = "";
		RootConfigAllPanel[] panel = cfg.All[0].Panel;
		foreach (RootConfigAllPanel rootConfigAllPanel in panel)
		{
			if (!(cfg.Station == rootConfigAllPanel.Name))
			{
				continue;
			}
			RootConfigAllPanelFile[] file = rootConfigAllPanel.File;
			foreach (RootConfigAllPanelFile rootConfigAllPanelFile in file)
			{
				switch (rootConfigAllPanelFile.Type)
				{
				case "Target":
					text = Common.GetPath(rootConfigAllPanelFile.Value);
					break;
				case "Source":
					source_filemap.Add(rootConfigAllPanelFile.Name, Common.GetPath(rootConfigAllPanelFile.Value));
					break;
				case "Other":
					other_filemap.Add(rootConfigAllPanelFile.Name, Common.GetPath(rootConfigAllPanelFile.Value));
					break;
				case "SCPI_Option_Config_Info":
					scpiOptCfgInfo.Add(rootConfigAllPanelFile.Name, rootConfigAllPanelFile.Value);
					break;
				}
			}
			RefLevelHeadspace = scpiOptCfgInfo["RefLevelHeadspace"];
			TriggerLevelMax = scpiOptCfgInfo["TriggerLevelMax"];
			p80PowerOffset = scpiOptCfgInfo["80p80PowerOffset"];
		}
		string text2 = "";
		text2 = ((cur_dut != 0) ? (Path.GetDirectoryName(text) + "\\DUT_" + cur_dut + "\\" + Path.GetFileName(text)) : text);
		TargetFile = text2;
		InitLoad();
	}

	private void InitPropertys()
	{
		InitProperty("WLAN");
		InitProperty("BT");
	}

	private void InitLoad()
	{
		PreLoad();
		if (LoadTargetFile(TargetFile, "WLAN"))
		{
			LoadTargetFile(TargetFile, "BT");
		}
	}

	private void PreLoad()
	{
		try
		{
			foreach (KeyValuePair<string, string> item in other_filemap)
			{
				if (!File.Exists(Path.Combine("C:\\Qualcomm\\WCN\\ProdTests\\ConfigFiles\\", item.Key)) && File.Exists(item.Value))
				{
					File.Copy(item.Value, Path.Combine("C:\\Qualcomm\\WCN\\ProdTests\\ConfigFiles\\", item.Key));
				}
			}
		}
		catch
		{
		}
	}

	private void InitControls()
	{
		cbbtpad.Items.Clear();
		cbwlpad.Items.Clear();
		cbwlsad.Items.Clear();
		cbbtsad.Items.Clear();
		cbwlbid.Items.Clear();
		cbbtbid.Items.Clear();
		cbwlrfpt.Items.Clear();
		cbbtrfpt.Items.Clear();
		cb_wl_name.Items.Clear();
		cb_bt_name.Items.Clear();
		List<string> list = new List<string>();
		for (int i = 0; i < 100; i++)
		{
			list.Add(i.ToString());
		}
		cbbtpad.Items.AddRange(list.ToArray());
		cbwlpad.Items.AddRange(list.ToArray());
		cbwlsad.Items.AddRange(list.ToArray());
		cbbtsad.Items.AddRange(list.ToArray());
		list.Clear();
		for (int j = 0; j < 3; j++)
		{
			list.Add(j.ToString());
		}
		cbwlbid.Items.AddRange(list.ToArray());
		cbbtbid.Items.AddRange(list.ToArray());
		cbwlrfpt.Items.AddRange(new string[7] { "left", "0", "1", "2", "3", "4", "right" });
		cbbtrfpt.Items.AddRange(new string[7] { "left", "0", "1", "2", "3", "4", "right" });
		cb_wl_name.Items.AddRange(wlanInstlist.Keys.ToArray());
		cb_bt_name.Items.AddRange(btInstlist.Keys.ToArray());
		tbbtip.Tag = new Tip(tbbtip, lbbtip, toolTip1, Tip.TxtContent.IP_ADDRESS, lbbtip.Text, "Example: 127.0.0.1", "IP address, Format like: 192.168.0.2");
		tbwlip.Tag = new Tip(tbwlip, lbwlip, toolTip1, Tip.TxtContent.IP_ADDRESS, lbwlip.Text, "Example: 127.0.0.1", "IP address, Format like: 192.168.0.2");
		tbwlwv.Tag = new Tip(tbwlwv, lbWaveWlan, toolTip1, Tip.TxtContent.FILE_PATH, lbWaveWlan.Text, "Example: C:\\", "File path, Format: C:\\");
		tbbtwv.Tag = new Tip(tbbtwv, lbWaveBT, toolTip1, Tip.TxtContent.FILE_PATH, lbWaveBT.Text, "Example: C:\\", "File path, Format: C:\\");
	}

	private void InitProperty(string wlanOrBt)
	{
		try
		{
			if (wlanOrBt == "WLAN")
			{
				string preInstWlan = (result.wres.Name = FileToUI(wlan.Model, 1));
				PreInstWlan = preInstWlan;
				result.wres.HWInterface = FileToUI(wlan.HardwareInterface.PartialClassName, 3);
				result.wres.Remote = GetRemoteType(wlan);
				result.wres.WaveFolder = GetValue(wlanOptionlist, "WaveFilePath");
				switch (result.wres.Name)
				{
				case "QTI SCPI":
					result.wres.VSA_REFERENCE_LEVEL_HEADSPACE_DBR = GetValue(wlanOptionlist, "VSA_REFERENCE_LEVEL_HEADSPACE_DBR");
					result.wres.VSA_TRIGGER_LEVEL_MAX_DBM = GetValue(wlanOptionlist, "VSA_TRIGGER_LEVEL_MAX_DBM");
					result.wres.WLAN_80P80_POWER_OFFSET_DB = GetValue(wlanOptionlist, "WLAN_80P80_POWER_OFFSET_DB");
					result.wres.MIMO_CONFIG = GetValue(wlanOptionlist, "MIMO_CONFIG");
					result.wres.DUT_PORT1_VSA_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT1-VSA_TERMINAL_INDEX");
					result.wres.DUT_PORT2_VSA_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT2-VSA_TERMINAL_INDEX");
					result.wres.DUT_PORT3_VSA_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT3-VSA_TERMINAL_INDEX");
					result.wres.DUT_PORT4_VSA_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT4-VSA_TERMINAL_INDEX");
					result.wres.DUT_PORT5_VSA_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT5-VSA_TERMINAL_INDEX");
					result.wres.DUT_PORT6_VSA_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT6-VSA_TERMINAL_INDEX");
					result.wres.DUT_PORT7_VSA_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT7-VSA_TERMINAL_INDEX");
					result.wres.DUT_PORT8_VSA_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT8-VSA_TERMINAL_INDEX");
					result.wres.DUT_PORT1_VSG_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT1-VSG_TERMINAL_INDEX");
					result.wres.DUT_PORT2_VSG_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT2-VSG_TERMINAL_INDEX");
					result.wres.DUT_PORT3_VSG_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT3-VSG_TERMINAL_INDEX");
					result.wres.DUT_PORT4_VSG_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT4-VSG_TERMINAL_INDEX");
					result.wres.DUT_PORT5_VSG_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT5-VSG_TERMINAL_INDEX");
					result.wres.DUT_PORT6_VSG_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT6-VSG_TERMINAL_INDEX");
					result.wres.DUT_PORT7_VSG_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT7-VSG_TERMINAL_INDEX");
					result.wres.DUT_PORT8_VSG_TERMINAL_INDEX = GetValue(wlanOptionlist, "DUT_PORT8-VSG_TERMINAL_INDEX");
					if (result.wres.VSA_REFERENCE_LEVEL_HEADSPACE_DBR == "0")
					{
						cmbWlanInst.SelectedIndex = 0;
					}
					else if (result.wres.VSA_TRIGGER_LEVEL_MAX_DBM == "-25")
					{
						cmbWlanInst.SelectedIndex = 2;
					}
					else if (result.wres.WLAN_80P80_POWER_OFFSET_DB == "0")
					{
						cmbWlanInst.SelectedIndex = 4;
					}
					else
					{
						cmbWlanInst.SelectedIndex = 1;
					}
					switch (result.wres.Remote)
					{
					case "GPIB":
						result.wres.BoardID = ((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).BoardID.ToString();
						result.wres.PrimAddress = ((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).PrimAddress.ToString();
						result.wres.ScndAddress = ((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).ScndAddress.ToString();
						break;
					case "USB":
						result.wres.Resource = GetValue(wlanOptionlist, "InstrumentVisaString");
						break;
					case "IP":
						result.wres.Host = ((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Host;
						result.wres.Port = ((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Port.ToString();
						result.wres.RFPort = GetValue(wlanOptionlist, "RFPort");
						result.wres.WaveFolder = GetValue(wlanOptionlist, "WaveFilePath");
						break;
					}
					break;
				case "AgilentN4010A":
					switch (result.wres.Remote)
					{
					case "GPIB":
						result.wres.BoardID = FileToUI(GetValue(wlanOptionlist, "InstrumentVisaString"), 4);
						result.wres.PrimAddress = FileToUI(GetValue(wlanOptionlist, "InstrumentVisaString"), 5);
						result.wres.ScndAddress = FileToUI(GetValue(wlanOptionlist, "InstrumentVisaString"), 6);
						break;
					case "USB":
						result.wres.Resource = GetValue(wlanOptionlist, "InstrumentVisaString");
						break;
					}
					break;
				case "CMW100":
				case "CMW500":
					switch (result.wres.Remote)
					{
					case "GPIB":
						result.wres.BoardID = ((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).BoardID.ToString();
						result.wres.PrimAddress = ((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).PrimAddress.ToString();
						result.wres.ScndAddress = ((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).ScndAddress.ToString();
						break;
					case "IP":
						result.wres.Host = ((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Host;
						result.wres.Port = ((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Port.ToString();
						result.wres.RFPort = GetValue(wlanOptionlist, "RFPort");
						result.wres.WaveFolder = GetValue(wlanOptionlist, "WaveFilePath");
						break;
					}
					break;
				case "LPIQ2010":
					switch (result.wres.Remote)
					{
					case "IP":
						result.wres.Host = GetValue(wlanOptionlist, "IPAddress");
						result.wres.RFPort = GetValue(wlanOptionlist, "RFPort");
						break;
					case "USB":
						result.wres.Host = GetValue(wlanOptionlist, "IPAddress");
						result.wres.RFPort = GetValue(wlanOptionlist, "RFPort");
						break;
					}
					result.wres.Path = GetValue(wlanOptionlist, "ServerExeFullLocation");
					break;
				case "LPIQxel":
				{
					string remote2;
					if ((remote2 = result.wres.Remote) != null && remote2 == "IP")
					{
						result.wres.Host = ((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Host;
						result.wres.Port = ((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Port.ToString();
						result.wres.RFPort = GetValue(wlanOptionlist, "RFPort");
						result.wres.WaveFolder = GetValue(wlanOptionlist, "WaveFilePath");
					}
					break;
				}
				case "AnritsuMT8870A":
				{
					string remote;
					if ((remote = result.wres.Remote) != null && remote == "IP")
					{
						result.wres.Host = ((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Host;
						result.wres.Port = ((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Port.ToString();
						result.wres.RFPort = GetValue(wlanOptionlist, "RFPort");
						result.wres.WaveFolder = GetValue(wlanOptionlist, "WaveFilePath");
					}
					break;
				}
				}
			}
			if (!(wlanOrBt == "BT"))
			{
				return;
			}
			string preInstBt = (result.bres.Name = FileToUI(bt.Model, 2));
			PreInstBt = preInstBt;
			result.bres.HWInterface = FileToUI(bt.HardwareInterface.PartialClassName, 3);
			result.bres.Remote = GetRemoteType(bt);
			switch (result.bres.Name)
			{
			case "QTI SCPI":
				switch (result.bres.Remote)
				{
				case "GPIB":
					result.bres.BoardID = ((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).BoardID.ToString();
					result.bres.PrimAddress = ((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).PrimAddress.ToString();
					result.bres.ScndAddress = ((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).ScndAddress.ToString();
					break;
				case "USB":
					result.bres.Resource = GetValue(btOptionlist, "InstrumentVisaString");
					break;
				case "IP":
					result.bres.Host = ((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Host;
					result.bres.Port = ((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Port.ToString();
					result.bres.RFPort = GetValue(btOptionlist, "RFPort");
					result.bres.WaveFolder = GetValue(btOptionlist, "WaveFilePath");
					break;
				}
				break;
			case "AgilentN4010A":
				switch (result.bres.Remote)
				{
				case "GPIB":
				{
					string resource = ((HardwareInterfaceIVisa32)bt.HardwareInterface.Item).Resource;
					result.bres.BoardID = FileToUI(resource, 4);
					result.bres.PrimAddress = FileToUI(resource, 5);
					result.bres.ScndAddress = FileToUI(resource, 6);
					break;
				}
				case "USB":
					result.bres.Resource = ((HardwareInterfaceIVisa32)bt.HardwareInterface.Item).Resource;
					break;
				}
				result.bres.WaveFolder = FileToUI(GetValue(btOptionlist, "EntireARBLocation_DH1"), 7);
				break;
			case "CMW100":
			case "CMW500":
				switch (result.bres.Remote)
				{
				case "IP":
					result.bres.Host = ((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Host;
					result.bres.Port = ((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Port.ToString();
					result.bres.RFPort = GetValue(btOptionlist, "RFPort");
					break;
				case "GPIB":
					result.bres.BoardID = ((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).BoardID.ToString();
					result.bres.PrimAddress = ((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).PrimAddress.ToString();
					result.bres.ScndAddress = ((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).ScndAddress.ToString();
					break;
				}
				result.bres.WaveFolder = FileToUI(GetValue(btOptionlist, "EntireARBLocation_DH1"), 7);
				break;
			case "LPIQ2010":
				switch (result.bres.Remote)
				{
				case "IP":
					result.bres.Host = GetValue(btOptionlist, "IPAddress");
					result.bres.RFPort = GetValue(btOptionlist, "RFPort");
					break;
				case "USB":
					result.bres.Host = GetValue(btOptionlist, "IPAddress");
					result.bres.RFPort = GetValue(btOptionlist, "RFPort");
					break;
				}
				result.bres.Path = GetValue(btOptionlist, "ServerExeFullLocation");
				result.bres.WaveFolder = FileToUI(GetValue(btOptionlist, "EntireARBLocation_DH1"), 7);
				break;
			case "LPIQxel":
			{
				string remote4;
				if ((remote4 = result.bres.Remote) != null && remote4 == "IP")
				{
					result.bres.Host = ((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Host;
					result.bres.Port = ((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Port.ToString();
					result.bres.RFPort = GetValue(btOptionlist, "RFPort");
					result.bres.WaveFolder = GetValue(btOptionlist, "WaveFilePath");
				}
				break;
			}
			case "AnritsuMT8870A":
			{
				string remote3;
				if ((remote3 = result.bres.Remote) != null && remote3 == "IP")
				{
					result.bres.Host = ((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Host;
					result.bres.Port = ((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Port.ToString();
					result.bres.RFPort = GetValue(btOptionlist, "RFPort");
					result.bres.WaveFolder = GetValue(btOptionlist, "WaveFilePath");
				}
				break;
			}
			case "NITrident":
				break;
			}
		}
		catch
		{
		}
	}

	public bool OpenFile()
	{
		bool flag = false;
		try
		{
			OpenFileDialog openFileDialog = new OpenFileDialog();
			openFileDialog.Filter = "xml(*.xml)|*.xml";
			if (openFileDialog.ShowDialog() == DialogResult.OK)
			{
				TargetFile = openFileDialog.FileName;
				OnFileChange(TargetFile);
				LoadTargetFile(TargetFile, "WLAN");
				LoadTargetFile(TargetFile, "BT");
				InitControls();
				InitPropertys();
				flag = true;
			}
			return flag;
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
			return false;
		}
	}

	private bool LoadTargetFile(string target, string wlanOrBt)
	{
		switch (wlanOrBt)
		{
		case "BT":
			btOptionlist.Clear();
			bt = null;
			break;
		case "WLAN":
			wlanOptionlist.Clear();
			wlan = null;
			break;
		}
		if (!File.Exists(target))
		{
			if (!File.Exists(source_filemap["AgilentN4010A"]))
			{
				MessageBox.Show("Nothing will load. Not exist: " + target);
				return false;
			}
			File.Copy(source_filemap["AgilentN4010A"], target);
		}
		using (FileStream fileStream = new FileStream(target, FileMode.Open, FileAccess.Read, FileShare.Read))
		{
			rootInstrumentConfList rootInstrumentConfList = null;
			XmlSerializer xmlSerializer = new XmlSerializer(typeof(root));
			rt = (root)xmlSerializer.Deserialize(fileStream);
			if (rt != null)
			{
				rootInstrumentConfList = rt.InstrumentConfList;
				if (rootInstrumentConfList.Instruments.Length != 0)
				{
					rootInstrumentConfListInstruments rootInstrumentConfListInstruments = rootInstrumentConfList.Instruments[0];
					Instrument[] instrument = rootInstrumentConfListInstruments.Instrument;
					foreach (Instrument instrument2 in instrument)
					{
						if (!instrument2.Model.Contains(wlanOrBt))
						{
							continue;
						}
						switch (wlanOrBt)
						{
						case "WLAN":
						{
							wlan = instrument2;
							InstrumentInfoItem[] optionalConfigInfoList2 = wlan.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem2 in optionalConfigInfoList2)
							{
								wlanOptionlist.Add(instrumentInfoItem2.Name, instrumentInfoItem2.Value);
							}
							break;
						}
						case "BT":
						{
							bt = instrument2;
							InstrumentInfoItem[] optionalConfigInfoList = bt.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem in optionalConfigInfoList)
							{
								btOptionlist.Add(instrumentInfoItem.Name, instrumentInfoItem.Value);
							}
							break;
						}
						}
						break;
					}
				}
				if (wlanOrBt == "BT")
				{
					btExt = rt.BTConfig;
				}
			}
			fileStream.Close();
		}
		switch (wlanOrBt)
		{
		case "BT":
			rtbt = rt;
			break;
		case "WLAN":
			rtwlan = rt;
			break;
		}
		return true;
	}

	private void SerialToFile()
	{
		try
		{
			if (btExt != null)
			{
				rtbt.BTConfig = btExt;
			}
			XmlSerializer xmlSerializer = new XmlSerializer(typeof(root));
			using StreamWriter streamWriter = new StreamWriter(TargetFile);
			bool flag = false;
			if (result.WlanSelected)
			{
				rt = rtwlan;
				if (result.BtSelected)
				{
					int num = 0;
					bool flag2 = false;
					Instrument[] instrument = rt.InstrumentConfList.Instruments[0].Instrument;
					foreach (Instrument instrument2 in instrument)
					{
						if (instrument2.Model.Contains("WLAN"))
						{
							rt.InstrumentConfList.Instruments[0].Instrument[num] = wlan;
						}
						if (instrument2.Model.Contains("BT"))
						{
							flag = true;
							flag2 = true;
						}
						if (!flag2)
						{
							num++;
						}
					}
					if (flag)
					{
						rt.InstrumentConfList.Instruments[0].Instrument[num] = bt;
					}
					else
					{
						List<Instrument> list = rt.InstrumentConfList.Instruments[0].Instrument.ToList();
						list.Add(bt);
						rt.InstrumentConfList.Instruments[0].Instrument = list.ToArray();
					}
				}
			}
			else
			{
				rt = rtbt;
				int num2 = 0;
				Instrument[] instrument3 = rt.InstrumentConfList.Instruments[0].Instrument;
				foreach (Instrument instrument4 in instrument3)
				{
					if (instrument4.Model.Contains("BT"))
					{
						rt.InstrumentConfList.Instruments[0].Instrument[num2] = bt;
					}
					num2++;
				}
			}
			xmlSerializer.Serialize(streamWriter, rt);
			streamWriter.Close();
		}
		catch (Exception ex)
		{
			MessageBox.Show(ex.Message);
		}
	}

	public void SaveResult()
	{
		if (!result.WlanSelected && !result.BtSelected)
		{
			MessageBox.Show("At least one selected 'BT' and/or 'WLAN'");
			return;
		}
		if (!File.Exists(TargetFile))
		{
			string text = "";
			text = ((!result.WlanSelected) ? TargetFile.Replace(".xml", ".BT.xml") : TargetFile.Replace(".xml", ".WLAN.xml"));
			File.Copy(text, TargetFile);
		}
		CommonFileSave();
	}

	public void SaveResultAs()
	{
		if (!result.WlanSelected && !result.BtSelected)
		{
			MessageBox.Show("At least one selected 'BT' and/or 'WLAN'");
			return;
		}
		string targetFile = TargetFile;
		using SaveFileDialog saveFileDialog = new SaveFileDialog();
		saveFileDialog.Title = "Save file as Diag";
		saveFileDialog.InitialDirectory = Path.GetDirectoryName(targetFile);
		saveFileDialog.FileName = targetFile;
		saveFileDialog.Filter = "xmlfile|*.xml";
		if (saveFileDialog.ShowDialog() != DialogResult.OK)
		{
			return;
		}
		targetFile = (TargetFile = saveFileDialog.FileName);
		if (!File.Exists(targetFile))
		{
			string directoryName = Path.GetDirectoryName(targetFile);
			if (!Directory.Exists(directoryName))
			{
				Directory.CreateDirectory(directoryName);
			}
			FileStream fileStream = File.Create(targetFile);
			fileStream.Close();
		}
		CommonFileSave();
		OnFileChange(TargetFile);
		if (cb_wl.Checked)
		{
			LoadTargetFile(TargetFile, "WLAN");
		}
		if (cb_bt.Checked)
		{
			LoadTargetFile(TargetFile, "BT");
		}
		InitControls();
		InitPropertys();
		DataBindingToUI();
	}

	private void UpdateWlanOptionalConfigInfoList(string keyName, string updatedValue)
	{
		if (string.IsNullOrEmpty(updatedValue))
		{
			return;
		}
		bool flag = false;
		InstrumentInfoItem[] optionalConfigInfoList = wlan.OptionalConfigInfoList;
		foreach (InstrumentInfoItem instrumentInfoItem in optionalConfigInfoList)
		{
			if (instrumentInfoItem.Name == keyName)
			{
				instrumentInfoItem.Value = updatedValue;
				flag = true;
				break;
			}
		}
		if (!flag)
		{
			InstrumentInfoItem instrumentInfoItem2 = new InstrumentInfoItem();
			instrumentInfoItem2.Name = keyName;
			instrumentInfoItem2.Value = updatedValue;
			List<InstrumentInfoItem> list = wlan.OptionalConfigInfoList.ToList();
			list.Add(instrumentInfoItem2);
			wlan.OptionalConfigInfoList = list.ToArray();
		}
	}

	private void CommonFileSave()
	{
		if (File.GetAttributes(TargetFile).ToString().IndexOf("ReadOnly") != -1)
		{
			File.SetAttributes(TargetFile, FileAttributes.Normal);
		}
		try
		{
			if (result.WlanSelected)
			{
				switch (result.wres.Name)
				{
				case "QTI SCPI":
					UpdateWlanOptionalConfigInfoList("WLAN_80P80_POWER_OFFSET_DB", result.wres.WLAN_80P80_POWER_OFFSET_DB);
					UpdateWlanOptionalConfigInfoList("VSA_TRIGGER_LEVEL_MAX_DBM", result.wres.VSA_TRIGGER_LEVEL_MAX_DBM);
					UpdateWlanOptionalConfigInfoList("VSA_REFERENCE_LEVEL_HEADSPACE_DBR", result.wres.VSA_REFERENCE_LEVEL_HEADSPACE_DBR);
					UpdateWlanOptionalConfigInfoList("MIMO_CONFIG", result.wres.MIMO_CONFIG);
					UpdateWlanOptionalConfigInfoList("DUT_PORT1-VSA_TERMINAL_INDEX", result.wres.DUT_PORT1_VSA_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT2-VSA_TERMINAL_INDEX", result.wres.DUT_PORT2_VSA_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT3-VSA_TERMINAL_INDEX", result.wres.DUT_PORT3_VSA_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT4-VSA_TERMINAL_INDEX", result.wres.DUT_PORT4_VSA_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT5-VSA_TERMINAL_INDEX", result.wres.DUT_PORT5_VSA_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT6-VSA_TERMINAL_INDEX", result.wres.DUT_PORT6_VSA_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT7-VSA_TERMINAL_INDEX", result.wres.DUT_PORT7_VSA_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT8-VSA_TERMINAL_INDEX", result.wres.DUT_PORT8_VSA_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT1-VSG_TERMINAL_INDEX", result.wres.DUT_PORT1_VSG_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT2-VSG_TERMINAL_INDEX", result.wres.DUT_PORT2_VSG_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT3-VSG_TERMINAL_INDEX", result.wres.DUT_PORT3_VSG_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT4-VSG_TERMINAL_INDEX", result.wres.DUT_PORT4_VSG_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT5-VSG_TERMINAL_INDEX", result.wres.DUT_PORT5_VSG_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT6-VSG_TERMINAL_INDEX", result.wres.DUT_PORT6_VSG_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT7-VSG_TERMINAL_INDEX", result.wres.DUT_PORT7_VSG_TERMINAL_INDEX);
					UpdateWlanOptionalConfigInfoList("DUT_PORT8-VSG_TERMINAL_INDEX", result.wres.DUT_PORT8_VSG_TERMINAL_INDEX);
					switch (result.wres.HWInterface)
					{
					case "SWFacade":
						switch (result.wres.Remote)
						{
						case "USB":
						{
							InstrumentInfoItem[] optionalConfigInfoList = wlan.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem6 in optionalConfigInfoList)
							{
								switch (instrumentInfoItem6.Name)
								{
								case "InstrumentVisaString":
									instrumentInfoItem6.Value = result.wres.Resource;
									break;
								case "WaveFilePath":
									instrumentInfoItem6.Value = result.wres.WaveFolder;
									break;
								}
							}
							break;
						}
						case "GPIB":
						{
							InstrumentInfoItem[] optionalConfigInfoList5 = wlan.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem5 in optionalConfigInfoList5)
							{
								switch (instrumentInfoItem5.Name)
								{
								case "InstrumentVisaString":
									if (result.wres.ScndAddress == "0")
									{
										instrumentInfoItem5.Value = "GPIB" + result.wres.BoardID + "::" + result.wres.PrimAddress + "::INSTR";
									}
									else
									{
										instrumentInfoItem5.Value = "GPIB" + result.wres.BoardID + "::" + result.wres.PrimAddress + "::" + result.wres.ScndAddress + "::INSTR";
									}
									break;
								case "WaveFilePath":
									instrumentInfoItem5.Value = result.wres.WaveFolder;
									break;
								}
							}
							break;
						}
						default:
							MessageBox.Show("QTI SCPI does not support write " + result.wres.Remote);
							break;
						}
						break;
					case "GPIB":
					{
						wlan.HardwareInterface.PartialClassName = "GPIB";
						wlan.HardwareInterface.Item = new HardwareInterfaceIGPIB();
						((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).BoardID = Convert.ToByte(result.wres.BoardID);
						((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).PrimAddress = Convert.ToByte(result.wres.PrimAddress);
						((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).ScndAddress = Convert.ToByte(result.wres.ScndAddress);
						InstrumentInfoItem[] optionalConfigInfoList6 = wlan.OptionalConfigInfoList;
						foreach (InstrumentInfoItem instrumentInfoItem7 in optionalConfigInfoList6)
						{
							string name;
							if ((name = instrumentInfoItem7.Name) != null && name == "WaveFilePath")
							{
								instrumentInfoItem7.Value = result.wres.WaveFolder;
							}
						}
						break;
					}
					case "TcpClient":
					{
						wlan.HardwareInterface.PartialClassName = "TcpClient";
						wlan.HardwareInterface.Item = new HardwareInterfaceITcpClient();
						((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Host = result.wres.Host;
						((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Port = Convert.ToInt32(result.wres.Port);
						InstrumentInfoItem[] optionalConfigInfoList4 = wlan.OptionalConfigInfoList;
						foreach (InstrumentInfoItem instrumentInfoItem4 in optionalConfigInfoList4)
						{
							switch (instrumentInfoItem4.Name)
							{
							case "WaveFilePath":
								instrumentInfoItem4.Value = result.wres.WaveFolder;
								break;
							case "RFPort":
								instrumentInfoItem4.Value = result.wres.RFPort;
								break;
							}
						}
						break;
					}
					default:
						MessageBox.Show("QTI SCPI does not support write " + result.wres.HWInterface);
						break;
					}
					break;
				case "AgilentN4010A":
				{
					string hWInterface2;
					if ((hWInterface2 = result.wres.HWInterface) != null && hWInterface2 == "SWFacade")
					{
						switch (result.wres.Remote)
						{
						case "USB":
						{
							InstrumentInfoItem[] optionalConfigInfoList3 = wlan.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem3 in optionalConfigInfoList3)
							{
								switch (instrumentInfoItem3.Name)
								{
								case "InstrumentVisaString":
									instrumentInfoItem3.Value = result.wres.Resource;
									break;
								case "WaveFilePath":
									instrumentInfoItem3.Value = result.wres.WaveFolder;
									break;
								}
							}
							break;
						}
						case "GPIB":
						{
							InstrumentInfoItem[] optionalConfigInfoList2 = wlan.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem2 in optionalConfigInfoList2)
							{
								switch (instrumentInfoItem2.Name)
								{
								case "InstrumentVisaString":
									if (result.wres.ScndAddress == "0")
									{
										instrumentInfoItem2.Value = "GPIB" + result.wres.BoardID + "::" + result.wres.PrimAddress + "::INSTR";
									}
									else
									{
										instrumentInfoItem2.Value = "GPIB" + result.wres.BoardID + "::" + result.wres.PrimAddress + "::" + result.wres.ScndAddress + "::INSTR";
									}
									break;
								case "WaveFilePath":
									instrumentInfoItem2.Value = result.wres.WaveFolder;
									break;
								}
							}
							break;
						}
						default:
							MessageBox.Show("N4010 does not support write " + result.wres.Remote);
							break;
						}
					}
					else
					{
						MessageBox.Show("N4010 does not support write " + result.wres.HWInterface);
					}
					break;
				}
				case "LPIQ2010":
				{
					string hWInterface3;
					if ((hWInterface3 = result.wres.HWInterface) != null && hWInterface3 == "SWFacade")
					{
						switch (result.wres.Remote)
						{
						case "IP":
						{
							InstrumentInfoItem[] optionalConfigInfoList7 = wlan.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem11 in optionalConfigInfoList7)
							{
								switch (instrumentInfoItem11.Name)
								{
								case "IPAddress":
									instrumentInfoItem11.Value = result.wres.Host;
									break;
								case "WaveFilePath":
									instrumentInfoItem11.Value = result.wres.WaveFolder;
									break;
								case "RFPort":
									instrumentInfoItem11.Value = result.wres.RFPort;
									break;
								case "ServerExeFullLocation":
									instrumentInfoItem11.Value = result.wres.Path;
									break;
								}
							}
							break;
						}
						case "USB":
						{
							InstrumentInfoItem[] optionalConfigInfoList = wlan.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem10 in optionalConfigInfoList)
							{
								switch (instrumentInfoItem10.Name)
								{
								case "IPAddress":
									instrumentInfoItem10.Value = result.wres.Host;
									break;
								case "WaveFilePath":
									instrumentInfoItem10.Value = result.wres.WaveFolder;
									break;
								case "RFPort":
									instrumentInfoItem10.Value = result.wres.RFPort;
									break;
								case "ServerExeFullLocation":
									instrumentInfoItem10.Value = result.wres.Path;
									break;
								}
							}
							break;
						}
						}
					}
					else
					{
						MessageBox.Show("IQ 2010 does not support" + result.wres.HWInterface);
					}
					break;
				}
				case "CMW100":
				case "CMW500":
					switch (result.wres.HWInterface)
					{
					case "GPIB":
					{
						wlan.HardwareInterface.PartialClassName = "GPIB";
						wlan.HardwareInterface.Item = new HardwareInterfaceIGPIB();
						((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).BoardID = Convert.ToByte(result.wres.BoardID);
						((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).PrimAddress = Convert.ToByte(result.wres.PrimAddress);
						((HardwareInterfaceIGPIB)wlan.HardwareInterface.Item).ScndAddress = Convert.ToByte(result.wres.ScndAddress);
						InstrumentInfoItem[] optionalConfigInfoList = wlan.OptionalConfigInfoList;
						foreach (InstrumentInfoItem instrumentInfoItem9 in optionalConfigInfoList)
						{
							string hWInterface;
							if ((hWInterface = instrumentInfoItem9.Name) != null && hWInterface == "WaveFilePath")
							{
								instrumentInfoItem9.Value = result.wres.WaveFolder;
							}
						}
						break;
					}
					case "TcpClient":
					{
						wlan.HardwareInterface.PartialClassName = "TcpClient";
						wlan.HardwareInterface.Item = new HardwareInterfaceITcpClient();
						((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Host = result.wres.Host;
						((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Port = Convert.ToInt32(result.wres.Port);
						InstrumentInfoItem[] optionalConfigInfoList = wlan.OptionalConfigInfoList;
						foreach (InstrumentInfoItem instrumentInfoItem8 in optionalConfigInfoList)
						{
							switch (instrumentInfoItem8.Name)
							{
							case "WaveFilePath":
								instrumentInfoItem8.Value = result.wres.WaveFolder;
								break;
							case "RFPort":
								instrumentInfoItem8.Value = result.wres.RFPort;
								break;
							}
						}
						break;
					}
					default:
						MessageBox.Show("CMW500 does not support " + result.wres.HWInterface);
						break;
					}
					break;
				case "LPIQxel":
				{
					string hWInterface;
					if ((hWInterface = result.wres.HWInterface) != null && hWInterface == "TcpClient")
					{
						wlan.HardwareInterface.PartialClassName = "TcpClient";
						wlan.HardwareInterface.Item = new HardwareInterfaceITcpClient();
						((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Host = result.wres.Host;
						((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Port = Convert.ToInt32(result.wres.Port);
						InstrumentInfoItem[] optionalConfigInfoList = wlan.OptionalConfigInfoList;
						foreach (InstrumentInfoItem instrumentInfoItem12 in optionalConfigInfoList)
						{
							switch (instrumentInfoItem12.Name)
							{
							case "WaveFilePath":
								instrumentInfoItem12.Value = result.wres.WaveFolder;
								break;
							case "RFPort":
								instrumentInfoItem12.Value = result.wres.RFPort;
								break;
							}
						}
					}
					else
					{
						MessageBox.Show("IQ Xel does not support " + result.wres.HWInterface);
					}
					break;
				}
				case "AnritsuMT8870A":
				{
					string hWInterface;
					if ((hWInterface = result.wres.HWInterface) != null && hWInterface == "TcpClient")
					{
						wlan.HardwareInterface.PartialClassName = "TcpClient";
						wlan.HardwareInterface.Item = new HardwareInterfaceITcpClient();
						((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Host = result.wres.Host;
						((HardwareInterfaceITcpClient)wlan.HardwareInterface.Item).Port = Convert.ToInt32(result.wres.Port);
						InstrumentInfoItem[] optionalConfigInfoList = wlan.OptionalConfigInfoList;
						foreach (InstrumentInfoItem instrumentInfoItem in optionalConfigInfoList)
						{
							switch (instrumentInfoItem.Name)
							{
							case "WaveFilePath":
								instrumentInfoItem.Value = result.wres.WaveFolder;
								break;
							case "RFPort":
								instrumentInfoItem.Value = result.wres.RFPort;
								break;
							}
						}
					}
					else
					{
						MessageBox.Show("Anritsu8870A does not support " + result.wres.HWInterface);
					}
					break;
				}
				default:
					MessageBox.Show("Not supported: " + result.wres.Name);
					break;
				case "NITrident":
					break;
				}
			}
			if (result.BtSelected)
			{
				bool flag = false;
				string name2 = result.bres.Name;
				string text = result.bres.HWInterface;
				string remote = result.bres.Remote;
				if (result.WlanSelected && cb_same_remote.Checked)
				{
					flag = true;
					name2 = result.wres.Name;
					text = ((!(name2 != "AgilentN4010A")) ? "Visa32" : result.wres.HWInterface);
					remote = result.wres.Remote;
					bool flag2 = false;
					if (File.Exists(TargetFile))
					{
						LoadTargetFile(TargetFile, "BT");
						if (bt != null && FileToUI(bt.Model, 2).ToUpper() != name2.ToUpper())
						{
							flag2 = true;
						}
					}
					if (flag2 && !CopyNeedFile(name2, "BT"))
					{
						MessageBox.Show("Failed to save. Get the needed file to continue edit.");
						return;
					}
				}
				switch (name2)
				{
				case "QTI SCPI":
					switch (text)
					{
					case "SWFacade":
						switch (result.bres.Remote)
						{
						case "USB":
						{
							InstrumentInfoItem[] optionalConfigInfoList = bt.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem15 in optionalConfigInfoList)
							{
								switch (instrumentInfoItem15.Name)
								{
								case "InstrumentVisaString":
									instrumentInfoItem15.Value = result.bres.Resource;
									break;
								case "WaveFilePath":
									instrumentInfoItem15.Value = result.bres.WaveFolder;
									break;
								}
							}
							break;
						}
						case "GPIB":
						{
							InstrumentInfoItem[] optionalConfigInfoList = bt.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem14 in optionalConfigInfoList)
							{
								switch (instrumentInfoItem14.Name)
								{
								case "InstrumentVisaString":
									if (result.bres.ScndAddress == "0")
									{
										instrumentInfoItem14.Value = "GPIB" + result.bres.BoardID + "::" + result.bres.PrimAddress + "::INSTR";
									}
									else
									{
										instrumentInfoItem14.Value = "GPIB" + result.bres.BoardID + "::" + result.bres.PrimAddress + "::" + result.bres.ScndAddress + "::INSTR";
									}
									break;
								case "WaveFilePath":
									instrumentInfoItem14.Value = result.bres.WaveFolder;
									break;
								}
							}
							break;
						}
						default:
							MessageBox.Show("QTI SCPI does not support write " + result.wres.Remote);
							break;
						}
						break;
					case "GPIB":
						bt.HardwareInterface.PartialClassName = "GPIB";
						bt.HardwareInterface.Item = new HardwareInterfaceIGPIB();
						((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).BoardID = (flag ? Convert.ToByte(result.wres.BoardID) : Convert.ToByte(result.bres.BoardID));
						((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).PrimAddress = (flag ? Convert.ToByte(result.wres.PrimAddress) : Convert.ToByte(result.bres.PrimAddress));
						((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).ScndAddress = (flag ? Convert.ToByte(result.wres.ScndAddress) : Convert.ToByte(result.bres.ScndAddress));
						break;
					case "TcpClient":
						bt.HardwareInterface.PartialClassName = "TcpClient";
						bt.HardwareInterface.Item = new HardwareInterfaceITcpClient();
						((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Host = (flag ? result.wres.Host : result.bres.Host);
						((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Port = (flag ? Convert.ToInt32(result.wres.Port) : Convert.ToInt32(result.bres.Port));
						break;
					default:
						MessageBox.Show("QTI SCPI does not support" + result.wres.HWInterface);
						break;
					}
					break;
				case "AgilentN4010A":
				{
					string hWInterface;
					if ((hWInterface = text) != null && hWInterface == "Visa32")
					{
						switch (remote)
						{
						case "USB":
						{
							bt.HardwareInterface.PartialClassName = "Visa32";
							bt.HardwareInterface.Item = new HardwareInterfaceIVisa32();
							((HardwareInterfaceIVisa32)bt.HardwareInterface.Item).Resource = (flag ? result.wres.Resource : result.bres.Resource);
							InstrumentInfoItem[] optionalConfigInfoList = bt.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem19 in optionalConfigInfoList)
							{
								switch (instrumentInfoItem19.Name)
								{
								case "EntireARBLocation_DH1":
									instrumentInfoItem19.Value = UIToFile(result.bres.WaveFolder, 102);
									break;
								case "EntireARBLocation_DH5":
									instrumentInfoItem19.Value = UIToFile(result.bres.WaveFolder, 103);
									break;
								case "EntireARBLocation_2DH5":
									instrumentInfoItem19.Value = UIToFile(result.bres.WaveFolder, 104);
									break;
								case "EntireARBLocation_3DH5":
									instrumentInfoItem19.Value = UIToFile(result.bres.WaveFolder, 105);
									break;
								}
							}
							break;
						}
						case "GPIB":
						{
							bt.HardwareInterface.PartialClassName = "Visa32";
							bt.HardwareInterface.Item = new HardwareInterfaceIVisa32();
							string text2 = "";
							text2 = (flag ? ((!(result.wres.ScndAddress == "0")) ? ("GPIB" + result.wres.BoardID + "::" + result.wres.PrimAddress + "::" + result.wres.ScndAddress + "::INSTR") : ("GPIB" + result.wres.BoardID + "::" + result.wres.PrimAddress + "::INSTR")) : ((!(result.bres.ScndAddress == "0")) ? ("GPIB" + result.bres.BoardID + "::" + result.bres.PrimAddress + "::" + result.bres.ScndAddress + "::INSTR") : ("GPIB" + result.bres.BoardID + "::" + result.bres.PrimAddress + "::INSTR")));
							((HardwareInterfaceIVisa32)bt.HardwareInterface.Item).Resource = text2;
							InstrumentInfoItem[] optionalConfigInfoList = bt.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem18 in optionalConfigInfoList)
							{
								switch (instrumentInfoItem18.Name)
								{
								case "EntireARBLocation_DH1":
									instrumentInfoItem18.Value = UIToFile(result.bres.WaveFolder, 102);
									break;
								case "EntireARBLocation_DH5":
									instrumentInfoItem18.Value = UIToFile(result.bres.WaveFolder, 103);
									break;
								case "EntireARBLocation_2DH5":
									instrumentInfoItem18.Value = UIToFile(result.bres.WaveFolder, 104);
									break;
								case "EntireARBLocation_3DH5":
									instrumentInfoItem18.Value = UIToFile(result.bres.WaveFolder, 105);
									break;
								}
							}
							break;
						}
						default:
							MessageBox.Show("N4010 does not support write " + result.bres.Remote);
							break;
						}
					}
					else
					{
						MessageBox.Show("N4010 does not support write " + result.bres.HWInterface);
					}
					break;
				}
				case "LPIQ2010":
				{
					string hWInterface;
					if ((hWInterface = text) != null && hWInterface == "SWFacade")
					{
						switch (remote)
						{
						case "IP":
						{
							InstrumentInfoItem[] optionalConfigInfoList = bt.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem17 in optionalConfigInfoList)
							{
								switch (instrumentInfoItem17.Name)
								{
								case "IPAddress":
									instrumentInfoItem17.Value = (flag ? result.wres.Host : result.bres.Host);
									break;
								case "RFPort":
									instrumentInfoItem17.Value = (flag ? result.wres.RFPort : result.bres.RFPort);
									break;
								case "ServerExeFullLocation":
									instrumentInfoItem17.Value = (flag ? result.wres.Path : result.bres.Path);
									break;
								case "LE1a":
									instrumentInfoItem17.Value = UIToFile(result.bres.WaveFolder, 101);
									break;
								case "EntireARBLocation_DH1":
									instrumentInfoItem17.Value = UIToFile(result.bres.WaveFolder, 102);
									break;
								case "EntireARBLocation_DH5":
									instrumentInfoItem17.Value = UIToFile(result.bres.WaveFolder, 103);
									break;
								case "EntireARBLocation_2DH5":
									instrumentInfoItem17.Value = UIToFile(result.bres.WaveFolder, 104);
									break;
								case "EntireARBLocation_3DH5":
									instrumentInfoItem17.Value = UIToFile(result.bres.WaveFolder, 105);
									break;
								}
							}
							break;
						}
						case "USB":
						{
							InstrumentInfoItem[] optionalConfigInfoList = wlan.OptionalConfigInfoList;
							foreach (InstrumentInfoItem instrumentInfoItem16 in optionalConfigInfoList)
							{
								switch (instrumentInfoItem16.Name)
								{
								case "IPAddress":
									instrumentInfoItem16.Value = (flag ? result.wres.Host : result.bres.Host);
									break;
								case "RFPort":
									instrumentInfoItem16.Value = (flag ? result.wres.RFPort : result.bres.RFPort);
									break;
								case "ServerExeFullLocation":
									instrumentInfoItem16.Value = (flag ? result.wres.Path : result.bres.Path);
									break;
								case "LE1a":
									instrumentInfoItem16.Value = UIToFile(result.bres.WaveFolder, 101);
									break;
								case "EntireARBLocation_DH1":
									instrumentInfoItem16.Value = UIToFile(result.bres.WaveFolder, 102);
									break;
								case "EntireARBLocation_DH5":
									instrumentInfoItem16.Value = UIToFile(result.bres.WaveFolder, 103);
									break;
								case "EntireARBLocation_2DH5":
									instrumentInfoItem16.Value = UIToFile(result.bres.WaveFolder, 104);
									break;
								case "EntireARBLocation_3DH5":
									instrumentInfoItem16.Value = UIToFile(result.bres.WaveFolder, 105);
									break;
								}
							}
							break;
						}
						}
					}
					else
					{
						MessageBox.Show("IQ 2010 does not support" + result.bres.HWInterface);
					}
					break;
				}
				case "CMW100":
				case "CMW500":
					switch (text)
					{
					case "GPIB":
					{
						bt.HardwareInterface.PartialClassName = "GPIB";
						bt.HardwareInterface.Item = new HardwareInterfaceIGPIB();
						((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).BoardID = (flag ? Convert.ToByte(result.wres.BoardID) : Convert.ToByte(result.bres.BoardID));
						((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).PrimAddress = (flag ? Convert.ToByte(result.wres.PrimAddress) : Convert.ToByte(result.bres.PrimAddress));
						((HardwareInterfaceIGPIB)bt.HardwareInterface.Item).ScndAddress = (flag ? Convert.ToByte(result.wres.ScndAddress) : Convert.ToByte(result.bres.ScndAddress));
						InstrumentInfoItem[] optionalConfigInfoList = bt.OptionalConfigInfoList;
						foreach (InstrumentInfoItem instrumentInfoItem22 in optionalConfigInfoList)
						{
							switch (instrumentInfoItem22.Name)
							{
							case "LE1a":
								instrumentInfoItem22.Value = UIToFile(result.bres.WaveFolder, 101);
								break;
							case "EntireARBLocation_DH1":
								instrumentInfoItem22.Value = UIToFile(result.bres.WaveFolder, 102);
								break;
							case "EntireARBLocation_DH5":
								instrumentInfoItem22.Value = UIToFile(result.bres.WaveFolder, 103);
								break;
							case "EntireARBLocation_2DH5":
								instrumentInfoItem22.Value = UIToFile(result.bres.WaveFolder, 104);
								break;
							case "EntireARBLocation_3DH5":
								instrumentInfoItem22.Value = UIToFile(result.bres.WaveFolder, 105);
								break;
							case "ListModeWaveform":
								instrumentInfoItem22.Value = UIToFile(result.bres.WaveFolder, 106);
								break;
							}
						}
						break;
					}
					case "TcpClient":
					{
						bt.HardwareInterface.PartialClassName = "TcpClient";
						bt.HardwareInterface.Item = new HardwareInterfaceITcpClient();
						((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Host = (flag ? result.wres.Host : result.bres.Host);
						((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Port = (flag ? Convert.ToInt32(result.wres.Port) : Convert.ToInt32(result.bres.Port));
						InstrumentInfoItem[] optionalConfigInfoList = bt.OptionalConfigInfoList;
						foreach (InstrumentInfoItem instrumentInfoItem21 in optionalConfigInfoList)
						{
							switch (instrumentInfoItem21.Name)
							{
							case "WaveFilePath":
								instrumentInfoItem21.Value = result.bres.WaveFolder;
								break;
							case "RFPort":
								instrumentInfoItem21.Value = (flag ? result.wres.RFPort : result.bres.RFPort);
								break;
							case "LE1a":
								instrumentInfoItem21.Value = UIToFile(result.bres.WaveFolder, 101);
								break;
							case "EntireARBLocation_DH1":
								instrumentInfoItem21.Value = UIToFile(result.bres.WaveFolder, 102);
								break;
							case "EntireARBLocation_DH5":
								instrumentInfoItem21.Value = UIToFile(result.bres.WaveFolder, 103);
								break;
							case "EntireARBLocation_2DH5":
								instrumentInfoItem21.Value = UIToFile(result.bres.WaveFolder, 104);
								break;
							case "EntireARBLocation_3DH5":
								instrumentInfoItem21.Value = UIToFile(result.bres.WaveFolder, 105);
								break;
							case "ListModeWaveform":
								instrumentInfoItem21.Value = UIToFile(result.bres.WaveFolder, 106);
								break;
							}
						}
						break;
					}
					default:
						MessageBox.Show("CMW500 does not support" + result.wres.HWInterface);
						break;
					}
					break;
				case "LPIQxel":
				{
					string hWInterface;
					if ((hWInterface = text) != null && hWInterface == "TcpClient")
					{
						bt.HardwareInterface.PartialClassName = "TcpClient";
						bt.HardwareInterface.Item = new HardwareInterfaceITcpClient();
						((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Host = (flag ? result.wres.Host : result.bres.Host);
						((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Port = (flag ? Convert.ToInt32(result.wres.Port) : Convert.ToInt32(result.bres.Port));
						InstrumentInfoItem[] optionalConfigInfoList = bt.OptionalConfigInfoList;
						foreach (InstrumentInfoItem instrumentInfoItem20 in optionalConfigInfoList)
						{
							switch (instrumentInfoItem20.Name)
							{
							case "WaveFilePath":
								instrumentInfoItem20.Value = result.bres.WaveFolder;
								break;
							case "RFPort":
								instrumentInfoItem20.Value = (flag ? result.wres.RFPort : result.bres.RFPort);
								break;
							}
						}
					}
					else
					{
						MessageBox.Show("IQ Xel does not support " + result.bres.HWInterface);
					}
					break;
				}
				case "AnritsuMT8870A":
				{
					string hWInterface;
					if ((hWInterface = text) != null && hWInterface == "TcpClient")
					{
						bt.HardwareInterface.PartialClassName = "TcpClient";
						bt.HardwareInterface.Item = new HardwareInterfaceITcpClient();
						((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Host = (flag ? result.wres.Host : result.bres.Host);
						((HardwareInterfaceITcpClient)bt.HardwareInterface.Item).Port = (flag ? Convert.ToInt32(result.wres.Port) : Convert.ToInt32(result.bres.Port));
						InstrumentInfoItem[] optionalConfigInfoList = bt.OptionalConfigInfoList;
						foreach (InstrumentInfoItem instrumentInfoItem13 in optionalConfigInfoList)
						{
							switch (instrumentInfoItem13.Name)
							{
							case "WaveFilePath":
								instrumentInfoItem13.Value = result.bres.WaveFolder;
								break;
							case "RFPort":
								instrumentInfoItem13.Value = (flag ? result.wres.RFPort : result.bres.RFPort);
								break;
							}
						}
					}
					else
					{
						MessageBox.Show("Anritsu8870A does not support " + result.bres.HWInterface);
					}
					break;
				}
				default:
					MessageBox.Show("Not supported: " + result.wres.Name);
					break;
				case "NITrident":
					break;
				}
			}
			SerialToFile();
		}
		catch (Exception ex)
		{
			MessageBox.Show("Save result fail! Exception:" + ex.Message);
		}
	}

	private void WirelessConnectTestPanel_Load(object sender, EventArgs e)
	{
		DataBindingToUI();
	}

	private void DataBindingToUI()
	{
		cb_wl.DataBindings.Clear();
		cb_bt.DataBindings.Clear();
		cb_wl_name.DataBindings.Clear();
		cb_wl_ihw.DataBindings.Clear();
		cb_wl_remote.DataBindings.Clear();
		tbwlwv.DataBindings.Clear();
		tbwlpath.DataBindings.Clear();
		cbwlbid.DataBindings.Clear();
		cbwlpad.DataBindings.Clear();
		cbwlsad.DataBindings.Clear();
		tbwlvs.DataBindings.Clear();
		tbwlip.DataBindings.Clear();
		tbwlpt.DataBindings.Clear();
		cbwlrfpt.DataBindings.Clear();
		cb_bt_name.DataBindings.Clear();
		cb_bt_ihw.DataBindings.Clear();
		cb_bt_remote.DataBindings.Clear();
		tbbtwv.DataBindings.Clear();
		tbbtpath.DataBindings.Clear();
		cbbtbid.DataBindings.Clear();
		cbbtpad.DataBindings.Clear();
		cbbtsad.DataBindings.Clear();
		tbbtvs.DataBindings.Clear();
		tbbtip.DataBindings.Clear();
		tbbtpt.DataBindings.Clear();
		cbbtrfpt.DataBindings.Clear();
		tbVsaDut1.DataBindings.Clear();
		tbVsaDut2.DataBindings.Clear();
		tbVsaDut3.DataBindings.Clear();
		tbVsaDut4.DataBindings.Clear();
		tbVsaDut5.DataBindings.Clear();
		tbVsaDut6.DataBindings.Clear();
		tbVsaDut7.DataBindings.Clear();
		tbVsaDut8.DataBindings.Clear();
		tbVsgDut1.DataBindings.Clear();
		tbVsgDut2.DataBindings.Clear();
		tbVsgDut3.DataBindings.Clear();
		tbVsgDut4.DataBindings.Clear();
		tbVsgDut5.DataBindings.Clear();
		tbVsgDut6.DataBindings.Clear();
		tbVsgDut7.DataBindings.Clear();
		tbVsgDut8.DataBindings.Clear();
		cmbWlanChainMap.DataBindings.Clear();
		cb_wl.DataBindings.Add(new Binding("Checked", result, "WlanSelected"));
		cb_bt.DataBindings.Add(new Binding("Checked", result, "BtSelected"));
		cb_wl_name.DataBindings.Add(new Binding("Text", result.wres, "Name"));
		cb_wl_ihw.DataBindings.Add(new Binding("Text", result.wres, "HWInterface"));
		cb_wl_remote.DataBindings.Add(new Binding("Text", result.wres, "Remote"));
		tbwlwv.DataBindings.Add(new Binding("Text", result.wres, "WaveFolder"));
		tbwlpath.DataBindings.Add(new Binding("Text", result.wres, "Path"));
		cbwlbid.DataBindings.Add(new Binding("Text", result.wres, "BoardID"));
		cbwlpad.DataBindings.Add(new Binding("Text", result.wres, "PrimAddress"));
		cbwlsad.DataBindings.Add(new Binding("Text", result.wres, "ScndAddress"));
		tbwlvs.DataBindings.Add(new Binding("Text", result.wres, "Resource"));
		tbwlip.DataBindings.Add(new Binding("Text", result.wres, "Host"));
		tbwlpt.DataBindings.Add(new Binding("Text", result.wres, "Port"));
		cbwlrfpt.DataBindings.Add(new Binding("Text", result.wres, "RFPort"));
		cmbWlanChainMap.DataBindings.Add(new Binding("Text", result.wres, "MIMO_CONFIG"));
		tbVsaDut1.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT1_VSA_TERMINAL_INDEX"));
		tbVsaDut2.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT2_VSA_TERMINAL_INDEX"));
		tbVsaDut3.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT3_VSA_TERMINAL_INDEX"));
		tbVsaDut4.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT4_VSA_TERMINAL_INDEX"));
		tbVsaDut5.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT5_VSA_TERMINAL_INDEX"));
		tbVsaDut6.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT6_VSA_TERMINAL_INDEX"));
		tbVsaDut7.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT7_VSA_TERMINAL_INDEX"));
		tbVsaDut8.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT8_VSA_TERMINAL_INDEX"));
		tbVsgDut1.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT1_VSG_TERMINAL_INDEX"));
		tbVsgDut2.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT2_VSG_TERMINAL_INDEX"));
		tbVsgDut3.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT3_VSG_TERMINAL_INDEX"));
		tbVsgDut4.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT4_VSG_TERMINAL_INDEX"));
		tbVsgDut5.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT5_VSG_TERMINAL_INDEX"));
		tbVsgDut6.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT6_VSG_TERMINAL_INDEX"));
		tbVsgDut7.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT7_VSG_TERMINAL_INDEX"));
		tbVsgDut8.DataBindings.Add(new Binding("Text", result.wres, "DUT_PORT8_VSG_TERMINAL_INDEX"));
		if (cb_bt.Checked)
		{
			cb_bt_name.DataBindings.Add(new Binding("Text", result.bres, "Name"));
			cb_bt_ihw.DataBindings.Add(new Binding("Text", result.bres, "HWInterface"));
			cb_bt_remote.DataBindings.Add(new Binding("Text", result.bres, "Remote"));
			tbbtwv.DataBindings.Add(new Binding("Text", result.bres, "WaveFolder"));
			tbbtpath.DataBindings.Add(new Binding("Text", result.bres, "Path"));
			cbbtbid.DataBindings.Add(new Binding("Text", result.bres, "BoardID"));
			cbbtpad.DataBindings.Add(new Binding("Text", result.bres, "PrimAddress"));
			cbbtsad.DataBindings.Add(new Binding("Text", result.bres, "ScndAddress"));
			tbbtvs.DataBindings.Add(new Binding("Text", result.bres, "Resource"));
			tbbtip.DataBindings.Add(new Binding("Text", result.bres, "Host"));
			tbbtpt.DataBindings.Add(new Binding("Text", result.bres, "Port"));
			cbbtrfpt.DataBindings.Add(new Binding("Text", result.bres, "RFPort"));
		}
	}

	private bool CopyNeedFile(string instName, string wlanOrBt)
	{
		string value = GetValue(source_filemap, instName);
		if (wlanOrBt == "BT" && instName == "QTI SCPI")
		{
			value = GetValue(other_filemap, instName);
		}
		string text = TargetFile.Replace(".xml", "." + wlanOrBt + ".xml");
		if (value != "")
		{
			if (!File.Exists(value))
			{
				MessageBox.Show("Not find source file: " + value);
				return false;
			}
			try
			{
				if (File.Exists(text))
				{
					if (File.GetAttributes(text).ToString().IndexOf("ReadOnly") != -1)
					{
						File.SetAttributes(text, FileAttributes.Normal);
					}
					File.Delete(text);
				}
				File.Copy(value, text);
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
				return false;
			}
			LoadTargetFile(text, wlanOrBt);
			return true;
		}
		MessageBox.Show("Not find source file map for " + instName);
		return false;
	}

	private Dictionary<string, List<string>> GetInstIhwRemoteMap(string str)
	{
		Dictionary<string, List<string>> dictionary = new Dictionary<string, List<string>>();
		string[] array = str.Split(new char[1] { ';' }, StringSplitOptions.RemoveEmptyEntries);
		for (int i = 0; i < array.Length; i++)
		{
			List<string> list = new List<string>();
			string[] array2 = array[i].Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries);
			string text = "";
			if (array2.Length == 0)
			{
				break;
			}
			text = array2[0];
			list.Clear();
			for (int j = 1; j < array2.Length; j++)
			{
				list.Add(array2[j]);
			}
			dictionary.Add(text, list);
		}
		return dictionary;
	}

	private string GetValue(Dictionary<string, string> dc, string str)
	{
		string text = "";
		if (dc.Keys.Contains(str))
		{
			text = dc[str];
		}
		return text;
	}

	private string FileToUI(string strOri, int index)
	{
		string text = "";
		switch (index)
		{
		case 1:
			strOri = strOri.Replace("WCNTester_", "");
			text = strOri.Replace("WLAN", "");
			if (cb_wl_name.Text == "CMW100")
			{
				text = "CMW100";
			}
			switch (text.ToUpper())
			{
			case "LPIQ2010":
				text = "LPIQ2010";
				break;
			case "AGILENTN4010A":
				text = "AgilentN4010A";
				break;
			case "CMW100":
				text = "CMW100";
				break;
			case "CMW500":
				text = "CMW500";
				break;
			case "LPIQXEL":
				text = "LPIQxel";
				break;
			case "NITRIDENT":
				text = "NITrident";
				break;
			case "ANRITSUMT8870A":
				text = "AnritsuMT8870A";
				break;
			case "COMMONSCPI":
				text = "QTI SCPI";
				break;
			default:
				MessageBox.Show(text);
				break;
			}
			break;
		case 2:
			strOri = strOri.Replace("WCNTester_", "");
			text = strOri.Replace("BT", "");
			if (cb_bt_name.Text == "CMW100")
			{
				text = "CMW100";
			}
			switch (text.ToUpper())
			{
			case "LPIQ2010":
				text = "LPIQ2010";
				break;
			case "AGILENTN4010A":
				text = "AgilentN4010A";
				break;
			case "CMW100":
				text = "CMW100";
				break;
			case "CMW500":
				text = "CMW500";
				break;
			case "LPIQXEL":
				text = "LPIQxel";
				break;
			case "NITRIDENT":
				text = "NITrident";
				break;
			case "ANRITSUMT8870A":
				text = "AnritsuMT8870A";
				break;
			case "COMMONSCPI":
				text = "QTI SCPI";
				break;
			default:
				MessageBox.Show(text);
				break;
			}
			break;
		case 3:
			if (strOri.Contains("SWFacade"))
			{
				text = "SWFacade";
			}
			else if (strOri.Contains("Visa32"))
			{
				text = "Visa32";
			}
			else if (strOri.Contains("GPIB"))
			{
				text = "GPIB";
			}
			else if (strOri.Contains("TcpClient"))
			{
				text = "TcpClient";
			}
			break;
		case 7:
			text = strOri.Replace(Path.GetFileName(strOri), "");
			break;
		case 4:
			if (strOri.Contains("::"))
			{
				string[] array3 = strOri.Split(new string[1] { "::" }, StringSplitOptions.RemoveEmptyEntries);
				text = ((array3.Length == 3 || array3.Length == 4) ? array3[0].Replace("GPIB", "") : "");
			}
			else
			{
				text = "";
			}
			break;
		case 5:
			if (strOri.Contains("::"))
			{
				string[] array2 = strOri.Split(new string[1] { "::" }, StringSplitOptions.RemoveEmptyEntries);
				text = ((array2.Length == 3 || array2.Length == 4) ? array2[1] : "");
			}
			else
			{
				text = "";
			}
			break;
		case 6:
			if (strOri.Contains("::"))
			{
				string[] array = strOri.Split(new string[1] { "::" }, StringSplitOptions.RemoveEmptyEntries);
				text = ((array.Length != 3) ? ((array.Length != 4) ? "" : array[2]) : "0");
			}
			else
			{
				text = "";
			}
			break;
		default:
			text = "";
			break;
		}
		return text;
	}

	private string UIToFile(string strOri, int index)
	{
		string text = "";
		switch (index)
		{
		case 102:
			text = Path.Combine(strOri, Path.GetFileName(btOptionlist["EntireARBLocation_DH1"]));
			break;
		case 103:
			text = Path.Combine(strOri, Path.GetFileName(btOptionlist["EntireARBLocation_DH5"]));
			break;
		case 104:
			text = Path.Combine(strOri, Path.GetFileName(btOptionlist["EntireARBLocation_2DH5"]));
			break;
		case 105:
			text = Path.Combine(strOri, Path.GetFileName(btOptionlist["EntireARBLocation_3DH5"]));
			break;
		case 101:
			text = Path.Combine(strOri, Path.GetFileName(btOptionlist["LE1a"]));
			break;
		case 106:
			text = Path.Combine(strOri, Path.GetFileName(btOptionlist["ListModeWaveform"]));
			break;
		}
		return text;
	}

	private string GetRemoteType(Instrument instSeg)
	{
		string text = "";
		string partialClassName = instSeg.HardwareInterface.PartialClassName;
		string text2 = "";
		if (partialClassName.Contains("GPIB"))
		{
			text = "GPIB";
		}
		else if (partialClassName.Contains("TcpClient"))
		{
			text = "IP";
		}
		else if (partialClassName.Contains("Visa32"))
		{
			text2 = ((HardwareInterfaceIVisa32)instSeg.HardwareInterface.Item).Resource;
			text = (text2.Contains("USB") ? "USB" : (text2.Contains("GPIB") ? "GPIB" : ((!text2.Contains("TcpClient")) ? "USB" : "IP")));
		}
		else if (partialClassName.Contains("SWFacade"))
		{
			InstrumentInfoItem[] optionalConfigInfoList = instSeg.OptionalConfigInfoList;
			foreach (InstrumentInfoItem instrumentInfoItem in optionalConfigInfoList)
			{
				if (instrumentInfoItem.Name == "InstrumentVisaString")
				{
					text2 = instrumentInfoItem.Value;
					text = ((!text2.Contains("USB")) ? ((!text2.Contains("GPIB")) ? ((!text2.Contains("TcpClient")) ? "USB" : "IP") : "GPIB") : "USB");
					break;
				}
				if (instrumentInfoItem.Name == "IPAddress")
				{
					text = ((!(instrumentInfoItem.Value == "127.0.0.1")) ? "IP" : "USB");
					break;
				}
			}
		}
		return text;
	}

	private void NameWlan_Changed(object sender, EventArgs e)
	{
		p2.Visible = false;
		p3.Visible = false;
		p4.Visible = false;
		string text = ((ComboBox)sender).Text;
		if (PreInstWlan != text && !string.IsNullOrEmpty(text))
		{
			PreInstWlan = text;
			if (!CopyNeedFile(text, "WLAN"))
			{
				return;
			}
		}
		if (!string.IsNullOrEmpty(text))
		{
			plChain.Visible = false;
			switch (text)
			{
			case "AgilentN4010A":
			case "CMW100":
			case "CMW500":
			case "LPIQxel":
			case "AnritsuMT8870A":
				p2.Visible = true;
				p3.Visible = true;
				p4.Visible = false;
				break;
			case "NITrident":
				p2.Visible = false;
				p3.Visible = false;
				p4.Visible = false;
				break;
			case "LPIQ2010":
				p2.Visible = true;
				p3.Visible = true;
				p4.Visible = true;
				break;
			case "QTI SCPI":
				p2.Visible = true;
				p3.Visible = false;
				p4.Visible = false;
				plChain.Visible = true;
				plChain.Location = new Point(4, 150);
				break;
			default:
				MessageBox.Show(text);
				break;
			}
			if (wlanInstlist.Keys.Contains(text))
			{
				cb_wl_ihw.Items.Clear();
				cb_wl_ihw.Items.AddRange(wlanInstlist[text].Keys.ToArray());
				cb_wl_ihw.Text = result.wres.HWInterface;
			}
			InitProperty("WLAN");
		}
	}

	private void NameBt_Changed(object sender, EventArgs e)
	{
		p6.Visible = false;
		p5.Visible = false;
		p7.Visible = false;
		string text = ((ComboBox)sender).Text;
		if (PreInstBt != text && !string.IsNullOrEmpty(text))
		{
			PreInstBt = text;
			if (!CopyNeedFile(text, "BT"))
			{
				return;
			}
		}
		if (!string.IsNullOrEmpty(text))
		{
			switch (text)
			{
			case "AgilentN4010A":
			case "CMW100":
			case "CMW500":
			case "LPIQxel":
			case "AnritsuMT8870A":
				p6.Visible = true;
				p5.Visible = true;
				p7.Visible = false;
				break;
			case "NITrident":
				p6.Visible = false;
				p5.Visible = false;
				p7.Visible = false;
				break;
			case "LPIQ2010":
				p6.Visible = true;
				p5.Visible = true;
				p7.Visible = true;
				break;
			case "QTI SCPI":
				p6.Visible = false;
				p5.Visible = true;
				p7.Visible = false;
				break;
			default:
				MessageBox.Show(text);
				break;
			}
			if (btInstlist.Keys.Contains(text))
			{
				cb_bt_ihw.Items.Clear();
				cb_bt_ihw.Items.AddRange(btInstlist[text].Keys.ToArray());
				cb_bt_ihw.Text = result.bres.HWInterface;
			}
			InitProperty("BT");
		}
	}

	private void SetCtrlUnVisible()
	{
	}

	private void btnWlanLPT_Click(object sender, EventArgs e)
	{
		DialogResult dialogResult = openFileDialog1.ShowDialog();
		if (dialogResult == DialogResult.OK)
		{
			string fileName = openFileDialog1.FileName;
			tbwlpath.Text = fileName;
			tbwlpath.Focus();
		}
	}

	private void btnWlanPath_Click(object sender, EventArgs e)
	{
		DialogResult dialogResult = folderBrowserDialog2.ShowDialog();
		if (dialogResult == DialogResult.OK)
		{
			string selectedPath = folderBrowserDialog2.SelectedPath;
			tbwlwv.Text = selectedPath;
			tbwlwv.Focus();
		}
	}

	private void btnBTLPT_Click(object sender, EventArgs e)
	{
		DialogResult dialogResult = openFileDialog1.ShowDialog();
		if (dialogResult == DialogResult.OK)
		{
			string fileName = openFileDialog1.FileName;
			tbbtpath.Text = fileName;
			tbbtpath.Focus();
		}
	}

	private void btnBTPath_Click(object sender, EventArgs e)
	{
		DialogResult dialogResult = folderBrowserDialog2.ShowDialog();
		if (dialogResult == DialogResult.OK)
		{
			string selectedPath = folderBrowserDialog2.SelectedPath;
			tbbtwv.Text = selectedPath;
			tbbtwv.Focus();
		}
	}

	private void bWlan_Changed(object sender, EventArgs e)
	{
		bool flag = (((CheckBox)sender).Checked ? true : false);
		if (flag)
		{
			plSameRemote.Visible = (cb_bt.Checked ? true : false);
			if (cb_bt.Checked)
			{
				plbt.Location = new Point(plwl.Location.X, plwl.Location.Y + plwl.Height);
			}
		}
		else
		{
			cb_same_remote.Checked = false;
			plSameRemote.Visible = false;
			if (cb_bt.Checked)
			{
				plbt.Location = new Point(plwl.Location.X, plwl.Location.Y);
			}
		}
		plwl.Visible = flag;
	}

	private void bBT_Changed(object sender, EventArgs e)
	{
		bool flag = (((CheckBox)sender).Checked ? true : false);
		if (flag)
		{
			plSameRemote.Visible = (cb_wl.Checked ? true : false);
		}
		else
		{
			cb_same_remote.Checked = false;
			plSameRemote.Visible = false;
		}
		plbt.Visible = flag;
	}

	private void bBTSameRemote_Changed(object sender, EventArgs e)
	{
		if (((CheckBox)sender).Checked)
		{
			p5.Visible = false;
			p7.Visible = false;
			p9.Visible = false;
			return;
		}
		p5.Visible = true;
		if (cb_bt_name.Text == "LPIQ2010")
		{
			p7.Visible = true;
		}
		p9.Visible = true;
	}

	private void bBTSameWavePath_Changed(object sender, EventArgs e)
	{
		p6.Visible = !((CheckBox)sender).Checked;
	}

	private void cb_wl_remote_SelectedIndexChanged(object sender, EventArgs e)
	{
		plwlrt.Visible = true;
		foreach (Control control in plwlrt.Controls)
		{
			control.Visible = false;
		}
		string text = cb_wl_name.Text;
		string text2 = cb_wl_ihw.Text;
		string text3 = cb_wl_remote.Text;
		if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(text2) || string.IsNullOrEmpty(text3))
		{
			return;
		}
		switch (text)
		{
		case "QTI SCPI":
			switch (text2)
			{
			case "SWFacade":
				switch (text3)
				{
				case "GPIB":
					lbwlbid.Visible = true;
					cbwlbid.Visible = true;
					lbwlpad.Visible = true;
					cbwlpad.Visible = true;
					lbwlsad.Visible = true;
					cbwlsad.Visible = true;
					break;
				case "USB":
					lbwlvs.Visible = true;
					tbwlvs.Visible = true;
					break;
				default:
					MessageBox.Show("For QTI SCPI - does not support: " + text3);
					break;
				}
				break;
			case "TcpClient":
			{
				string text10;
				if ((text10 = text3) != null && text10 == "IP")
				{
					lbwlip.Visible = true;
					tbwlip.Visible = true;
					lbwlpt.Visible = true;
					tbwlpt.Visible = true;
					lbwlrfpt.Visible = false;
					cbwlrfpt.Visible = false;
				}
				else
				{
					MessageBox.Show("For QTI SCPI - does not support: " + text3);
				}
				break;
			}
			case "GPIB":
				lbwlbid.Visible = true;
				cbwlbid.Visible = true;
				lbwlpad.Visible = true;
				cbwlpad.Visible = true;
				lbwlsad.Visible = true;
				cbwlsad.Visible = true;
				break;
			default:
				MessageBox.Show("For QTI SCPI - does not support HWInterface: " + text2);
				break;
			}
			break;
		case "AgilentN4010A":
		{
			string text9;
			if ((text9 = text2) != null && text9 == "SWFacade")
			{
				switch (text3)
				{
				case "GPIB":
					lbwlbid.Visible = true;
					cbwlbid.Visible = true;
					lbwlpad.Visible = true;
					cbwlpad.Visible = true;
					lbwlsad.Visible = true;
					cbwlsad.Visible = true;
					break;
				case "USB":
					lbwlvs.Visible = true;
					tbwlvs.Visible = true;
					break;
				default:
					MessageBox.Show("For 4010 - does not support: " + text3);
					break;
				}
			}
			else
			{
				MessageBox.Show("For 4010 - does not support HWInterface: " + text2);
			}
			break;
		}
		case "LPIQ2010":
		{
			string text8;
			if ((text8 = text2) != null && text8 == "SWFacade")
			{
				switch (text3)
				{
				case "IP":
				case "USB":
					lbwlip.Visible = true;
					tbwlip.Visible = true;
					lbwlrfpt.Visible = true;
					cbwlrfpt.Visible = true;
					break;
				default:
					MessageBox.Show("For IQ 2010 - does not support: " + text3);
					break;
				}
			}
			else
			{
				MessageBox.Show("For IQ 2010 - does not support HWInterface: " + text2);
			}
			break;
		}
		case "CMW100":
		case "CMW500":
			switch (text2)
			{
			case "TcpClient":
			{
				string text12;
				if ((text12 = text3) != null && text12 == "IP")
				{
					lbwlip.Visible = true;
					tbwlip.Visible = true;
					lbwlpt.Visible = true;
					tbwlpt.Visible = true;
					lbwlrfpt.Visible = true;
					cbwlrfpt.Visible = true;
				}
				else
				{
					MessageBox.Show("For CMW 500 - does not support: " + text3);
				}
				break;
			}
			case "GPIB":
			{
				string text11;
				if ((text11 = text3) != null && text11 == "GPIB")
				{
					lbwlbid.Visible = true;
					cbwlbid.Visible = true;
					lbwlpad.Visible = true;
					cbwlpad.Visible = true;
					lbwlsad.Visible = true;
					cbwlsad.Visible = true;
				}
				else
				{
					MessageBox.Show("For CMW 500 - does not support: " + text3);
				}
				break;
			}
			default:
				MessageBox.Show("For CMW 500 - does not support HWInterface: " + text2);
				break;
			}
			break;
		case "LPIQxel":
		{
			string text6;
			if ((text6 = text2) != null && text6 == "TcpClient")
			{
				string text7;
				if ((text7 = text3) != null && text7 == "IP")
				{
					lbwlip.Visible = true;
					tbwlip.Visible = true;
					lbwlpt.Visible = true;
					tbwlpt.Visible = true;
					lbwlrfpt.Visible = true;
					cbwlrfpt.Visible = true;
				}
				else
				{
					MessageBox.Show("For IQXel - does not support: " + text3);
				}
			}
			else
			{
				MessageBox.Show("For IQXel - does not support HWInterface: " + text2);
			}
			break;
		}
		case "AnritsuMT8870A":
		{
			string text4;
			if ((text4 = text2) != null && text4 == "TcpClient")
			{
				string text5;
				if ((text5 = text3) != null && text5 == "IP")
				{
					lbwlip.Visible = true;
					tbwlip.Visible = true;
					lbwlpt.Visible = true;
					tbwlpt.Visible = true;
					lbwlrfpt.Visible = true;
					cbwlrfpt.Visible = true;
				}
				else
				{
					MessageBox.Show("For Anritsu8870A - does not support: " + text3);
				}
			}
			else
			{
				MessageBox.Show("For Anritsu8870A - does not support HWInterface: " + text2);
			}
			break;
		}
		}
	}

	private void cb_bt_remote_SelectedIndexChanged(object sender, EventArgs e)
	{
		plbtrt.Visible = true;
		foreach (Control control in plbtrt.Controls)
		{
			control.Visible = false;
		}
		string text = cb_bt_name.Text;
		string text2 = cb_bt_ihw.Text;
		string text3 = cb_bt_remote.Text;
		if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(text2) || string.IsNullOrEmpty(text3))
		{
			return;
		}
		switch (text)
		{
		case "QTI SCPI":
			switch (text2)
			{
			case "SWFacade":
				switch (text3)
				{
				case "GPIB":
					lbbtbid.Visible = true;
					cbbtbid.Visible = true;
					lbbtpad.Visible = true;
					cbbtpad.Visible = true;
					lbbtsad.Visible = true;
					cbbtsad.Visible = true;
					break;
				case "USB":
					lbbtvs.Visible = true;
					tbbtvs.Visible = true;
					break;
				default:
					MessageBox.Show("For QTI SCPI - does not support: " + text3);
					break;
				}
				break;
			case "TcpClient":
			{
				string text10;
				if ((text10 = text3) != null && text10 == "IP")
				{
					lbbtip.Visible = true;
					tbbtip.Visible = true;
					lbbtpt.Visible = true;
					tbbtpt.Visible = true;
					lbbtrfpt.Visible = false;
					cbbtrfpt.Visible = false;
				}
				else
				{
					MessageBox.Show("For QTI SCPI - does not support: " + text3);
				}
				break;
			}
			case "GPIB":
				lbbtbid.Visible = true;
				cbbtbid.Visible = true;
				lbbtpad.Visible = true;
				cbbtpad.Visible = true;
				lbbtsad.Visible = true;
				cbbtsad.Visible = true;
				break;
			default:
				MessageBox.Show("For QTI SCPI - does not support HWInterface: " + text2);
				break;
			}
			break;
		case "AgilentN4010A":
		{
			string text9;
			if ((text9 = text2) != null && text9 == "Visa32")
			{
				switch (text3)
				{
				case "GPIB":
					lbbtbid.Visible = true;
					cbbtbid.Visible = true;
					lbbtpad.Visible = true;
					cbbtpad.Visible = true;
					lbbtsad.Visible = true;
					cbbtsad.Visible = true;
					break;
				case "USB":
					lbbtvs.Visible = true;
					tbbtvs.Visible = true;
					break;
				default:
					MessageBox.Show("For 4010 - does not support: " + text3);
					break;
				}
			}
			else
			{
				MessageBox.Show("For 4010 - does not support HWInterface: " + text2);
			}
			break;
		}
		case "LPIQ2010":
		{
			string text8;
			if ((text8 = text2) != null && text8 == "SWFacade")
			{
				switch (text3)
				{
				case "IP":
				case "USB":
					lbbtip.Visible = true;
					tbbtip.Visible = true;
					lbbtrfpt.Visible = true;
					cbbtrfpt.Visible = true;
					break;
				default:
					MessageBox.Show("For IQ 2010 - does not support: " + text3);
					break;
				}
			}
			else
			{
				MessageBox.Show("For IQ 2010 - does not support HWInterface: " + text2);
			}
			break;
		}
		case "CMW100":
		case "CMW500":
			switch (text2)
			{
			case "GPIB":
			{
				string text12;
				if ((text12 = text3) != null && text12 == "GPIB")
				{
					lbbtbid.Visible = true;
					cbbtbid.Visible = true;
					lbbtpad.Visible = true;
					cbbtpad.Visible = true;
					lbbtsad.Visible = true;
					cbbtsad.Visible = true;
				}
				else
				{
					MessageBox.Show("For CMW 500 - does not support: " + text3);
				}
				break;
			}
			case "TcpClient":
			{
				string text11;
				if ((text11 = text3) != null && text11 == "IP")
				{
					lbbtip.Visible = true;
					tbbtip.Visible = true;
					lbbtpt.Visible = true;
					tbbtpt.Visible = true;
					lbbtrfpt.Visible = true;
					cbbtrfpt.Visible = true;
				}
				else
				{
					MessageBox.Show("For CMW 500 - does not support: " + text3);
				}
				break;
			}
			default:
				MessageBox.Show("For CMW 500 - does not support HWInterface: " + text2);
				break;
			}
			break;
		case "LPIQxel":
		{
			string text6;
			if ((text6 = text2) != null && text6 == "TcpClient")
			{
				string text7;
				if ((text7 = text3) != null && text7 == "IP")
				{
					lbbtip.Visible = true;
					tbbtip.Visible = true;
					lbbtpt.Visible = true;
					tbbtpt.Visible = true;
					lbbtrfpt.Visible = true;
					cbbtrfpt.Visible = true;
				}
				else
				{
					MessageBox.Show("For IQXel - does not support: " + text3);
				}
			}
			else
			{
				MessageBox.Show("For IQXel - does not support HWInterface: " + text2);
			}
			break;
		}
		case "AnritsuMT8870A":
		{
			string text4;
			if ((text4 = text2) != null && text4 == "TcpClient")
			{
				string text5;
				if ((text5 = text3) != null && text5 == "IP")
				{
					lbbtip.Visible = true;
					tbbtip.Visible = true;
					lbbtpt.Visible = true;
					tbbtpt.Visible = true;
					lbbtrfpt.Visible = true;
					cbbtrfpt.Visible = true;
				}
				else
				{
					MessageBox.Show("For Anritsu8870A - does not support: " + text3);
				}
			}
			else
			{
				MessageBox.Show("For Anritsu8870A - does not support HWInterface: " + text2);
			}
			break;
		}
		}
	}

	private void cb_wl_ihw_SelectedIndexChanged(object sender, EventArgs e)
	{
		string text = ((ComboBox)sender).Text;
		if (!string.IsNullOrEmpty(text))
		{
			cb_wl_remote.Visible = true;
			lbRemoteWlan.Visible = true;
			plwlrt.Visible = false;
			if (wlanInstlist[cb_wl_name.Text].Keys.Contains(text))
			{
				cb_wl_remote.Items.Clear();
				cb_wl_remote.Items.AddRange(wlanInstlist[cb_wl_name.Text][text].ToArray());
				cb_wl_remote.Text = GetRemoteType(wlan);
			}
		}
		else
		{
			cb_wl_remote.Visible = false;
			lbRemoteWlan.Visible = false;
			plwlrt.Visible = false;
		}
	}

	private void cb_bt_ihw_SelectedIndexChanged(object sender, EventArgs e)
	{
		string text = ((ComboBox)sender).Text;
		if (!string.IsNullOrEmpty(text))
		{
			cb_bt_remote.Visible = true;
			lbbtrt.Visible = true;
			plbtrt.Visible = false;
			if (btInstlist[result.bres.Name].Keys.Contains(text))
			{
				cb_bt_remote.Items.Clear();
				cb_bt_remote.Items.AddRange(btInstlist[result.bres.Name][text].ToArray());
				cb_bt_remote.Text = GetRemoteType(bt);
			}
		}
		else
		{
			cb_bt_remote.Visible = false;
			lbbtrt.Visible = false;
			plbtrt.Visible = false;
		}
	}

	private void OnFileChange(string resfile)
	{
		if (this.TargetFileChanged != null)
		{
			this.TargetFileChanged(resfile);
		}
	}

	public void TickFileChange()
	{
		OnFileChange(TargetFile);
	}

	private void cmbWlanChainMap_SelectedIndexChanged(object sender, EventArgs e)
	{
		panel1.Visible = false;
		panel2.Visible = false;
		panel3.Visible = false;
		panel4.Visible = false;
		panel5.Visible = false;
		panel6.Visible = false;
		panel7.Visible = false;
		panel8.Visible = false;
		label6.Visible = false;
		label7.Visible = false;
		label8.Visible = false;
		if (cmbWlanChainMap.SelectedIndex != 0)
		{
			label6.Visible = true;
			label7.Visible = true;
			label8.Visible = true;
		}
		if (cmbWlanChainMap.SelectedIndex > 7)
		{
			panel1.Visible = true;
			panel2.Visible = true;
			panel3.Visible = true;
			panel4.Visible = true;
			panel5.Visible = true;
			panel6.Visible = true;
			panel7.Visible = true;
			panel8.Visible = true;
		}
		else if (cmbWlanChainMap.SelectedIndex > 6)
		{
			panel1.Visible = true;
			panel2.Visible = true;
			panel3.Visible = true;
			panel4.Visible = true;
			panel5.Visible = true;
			panel6.Visible = true;
			panel7.Visible = true;
		}
		else if (cmbWlanChainMap.SelectedIndex > 5)
		{
			panel1.Visible = true;
			panel2.Visible = true;
			panel3.Visible = true;
			panel4.Visible = true;
			panel5.Visible = true;
			panel6.Visible = true;
		}
		else if (cmbWlanChainMap.SelectedIndex > 4)
		{
			panel1.Visible = true;
			panel2.Visible = true;
			panel3.Visible = true;
			panel4.Visible = true;
			panel5.Visible = true;
		}
		else if (cmbWlanChainMap.SelectedIndex > 3)
		{
			panel1.Visible = true;
			panel2.Visible = true;
			panel3.Visible = true;
			panel4.Visible = true;
		}
		else if (cmbWlanChainMap.SelectedIndex > 3)
		{
			panel1.Visible = true;
			panel2.Visible = true;
			panel3.Visible = true;
			panel4.Visible = true;
		}
		else if (cmbWlanChainMap.SelectedIndex > 2)
		{
			panel1.Visible = true;
			panel2.Visible = true;
			panel3.Visible = true;
		}
		else if (cmbWlanChainMap.SelectedIndex > 1)
		{
			panel1.Visible = true;
			panel2.Visible = true;
		}
		else if (cmbWlanChainMap.SelectedIndex > 0)
		{
			panel1.Visible = true;
		}
	}

	private void cmbWlanInst_SelectedIndexChanged(object sender, EventArgs e)
	{
		if (cmbWlanInst.SelectedIndex != -1)
		{
			result.wres.VSA_REFERENCE_LEVEL_HEADSPACE_DBR = Common.GetFormatString(RefLevelHeadspace, cmbWlanInst.Text);
			result.wres.VSA_TRIGGER_LEVEL_MAX_DBM = Common.GetFormatString(TriggerLevelMax, cmbWlanInst.Text);
			result.wres.WLAN_80P80_POWER_OFFSET_DB = Common.GetFormatString(p80PowerOffset, cmbWlanInst.Text);
		}
	}

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

	private void InitializeComponent()
	{
		this.components = new System.ComponentModel.Container();
		this.tbbtadr = new System.Windows.Forms.TextBox();
		this.lbbtadr = new System.Windows.Forms.Label();
		this.tbbtpath = new System.Windows.Forms.TextBox();
		this.btnBtPath = new System.Windows.Forms.Button();
		this.lbLptBT = new System.Windows.Forms.Label();
		this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
		this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
		this.tbwlwv = new System.Windows.Forms.TextBox();
		this.btnwlwv = new System.Windows.Forms.Button();
		this.lbWaveBT = new System.Windows.Forms.Label();
		this.folderBrowserDialog2 = new System.Windows.Forms.FolderBrowserDialog();
		this.cb_same_remote = new System.Windows.Forms.CheckBox();
		this.cb_wl = new System.Windows.Forms.CheckBox();
		this.cb_bt = new System.Windows.Forms.CheckBox();
		this.lbNameBT = new System.Windows.Forms.Label();
		this.tbbtwv = new System.Windows.Forms.TextBox();
		this.btnbtwv = new System.Windows.Forms.Button();
		this.lbWaveWlan = new System.Windows.Forms.Label();
		this.cbwlpad = new System.Windows.Forms.ComboBox();
		this.tbwlip = new System.Windows.Forms.TextBox();
		this.lbNameWlan = new System.Windows.Forms.Label();
		this.lbRemoteWlan = new System.Windows.Forms.Label();
		this.lbwlpad = new System.Windows.Forms.Label();
		this.lbwlip = new System.Windows.Forms.Label();
		this.tbwlvs = new System.Windows.Forms.TextBox();
		this.lbwlvs = new System.Windows.Forms.Label();
		this.tbwlpath = new System.Windows.Forms.TextBox();
		this.btnWlanPath = new System.Windows.Forms.Button();
		this.lbLptWlan = new System.Windows.Forms.Label();
		this.p6 = new System.Windows.Forms.Panel();
		this.p7 = new System.Windows.Forms.Panel();
		this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
		this.plwl = new System.Windows.Forms.Panel();
		this.label3 = new System.Windows.Forms.Label();
		this.p2 = new System.Windows.Forms.Panel();
		this.plwlrt = new System.Windows.Forms.Panel();
		this.cbwlrfpt = new System.Windows.Forms.ComboBox();
		this.lbwlrfpt = new System.Windows.Forms.Label();
		this.tbwlpt = new System.Windows.Forms.TextBox();
		this.lbwlpt = new System.Windows.Forms.Label();
		this.lbwlsad = new System.Windows.Forms.Label();
		this.lbwlbid = new System.Windows.Forms.Label();
		this.cbwlsad = new System.Windows.Forms.ComboBox();
		this.cbwlbid = new System.Windows.Forms.ComboBox();
		this.label1 = new System.Windows.Forms.Label();
		this.cb_wl_ihw = new System.Windows.Forms.ComboBoxEx();
		this.cb_wl_remote = new System.Windows.Forms.ComboBoxEx();
		this.p3 = new System.Windows.Forms.Panel();
		this.p4 = new System.Windows.Forms.Panel();
		this.cb_wl_name = new System.Windows.Forms.ComboBoxEx();
		this.plbt = new System.Windows.Forms.Panel();
		this.p9 = new System.Windows.Forms.Panel();
		this.cb_bt_name = new System.Windows.Forms.ComboBoxEx();
		this.label4 = new System.Windows.Forms.Label();
		this.p5 = new System.Windows.Forms.Panel();
		this.plbtrt = new System.Windows.Forms.Panel();
		this.cbbtrfpt = new System.Windows.Forms.ComboBox();
		this.lbbtrfpt = new System.Windows.Forms.Label();
		this.tbbtpt = new System.Windows.Forms.TextBox();
		this.lbbtpt = new System.Windows.Forms.Label();
		this.tbbtvs = new System.Windows.Forms.TextBox();
		this.lbbtsad = new System.Windows.Forms.Label();
		this.tbbtip = new System.Windows.Forms.TextBox();
		this.lbbtpad = new System.Windows.Forms.Label();
		this.lbbtvs = new System.Windows.Forms.Label();
		this.lbbtip = new System.Windows.Forms.Label();
		this.lbbtbid = new System.Windows.Forms.Label();
		this.cbbtsad = new System.Windows.Forms.ComboBox();
		this.cbbtbid = new System.Windows.Forms.ComboBox();
		this.cbbtpad = new System.Windows.Forms.ComboBox();
		this.lbbtihw = new System.Windows.Forms.Label();
		this.cb_bt_ihw = new System.Windows.Forms.ComboBoxEx();
		this.cb_bt_remote = new System.Windows.Forms.ComboBoxEx();
		this.lbbtrt = new System.Windows.Forms.Label();
		this.p8 = new System.Windows.Forms.Panel();
		this.p1 = new System.Windows.Forms.Panel();
		this.plSameRemote = new System.Windows.Forms.Panel();
		this.label2 = new System.Windows.Forms.Label();
		this.plChain = new System.Windows.Forms.Panel();
		this.panel8 = new System.Windows.Forms.Panel();
		this.tbVsgDut8 = new System.Windows.Forms.TextBox();
		this.textBox15 = new System.Windows.Forms.TextBox();
		this.tbVsaDut8 = new System.Windows.Forms.TextBox();
		this.panel7 = new System.Windows.Forms.Panel();
		this.tbVsgDut7 = new System.Windows.Forms.TextBox();
		this.tbVsaDut7 = new System.Windows.Forms.TextBox();
		this.textBox13 = new System.Windows.Forms.TextBox();
		this.panel4 = new System.Windows.Forms.Panel();
		this.tbVsgDut4 = new System.Windows.Forms.TextBox();
		this.textBox10 = new System.Windows.Forms.TextBox();
		this.tbVsaDut4 = new System.Windows.Forms.TextBox();
		this.panel6 = new System.Windows.Forms.Panel();
		this.tbVsgDut6 = new System.Windows.Forms.TextBox();
		this.tbVsaDut6 = new System.Windows.Forms.TextBox();
		this.textBox9 = new System.Windows.Forms.TextBox();
		this.panel3 = new System.Windows.Forms.Panel();
		this.tbVsgDut3 = new System.Windows.Forms.TextBox();
		this.tbVsaDut3 = new System.Windows.Forms.TextBox();
		this.textBox7 = new System.Windows.Forms.TextBox();
		this.panel5 = new System.Windows.Forms.Panel();
		this.tbVsgDut5 = new System.Windows.Forms.TextBox();
		this.tbVsaDut5 = new System.Windows.Forms.TextBox();
		this.textBox5 = new System.Windows.Forms.TextBox();
		this.panel2 = new System.Windows.Forms.Panel();
		this.tbVsgDut2 = new System.Windows.Forms.TextBox();
		this.tbVsaDut2 = new System.Windows.Forms.TextBox();
		this.textBox4 = new System.Windows.Forms.TextBox();
		this.panel1 = new System.Windows.Forms.Panel();
		this.tbVsgDut1 = new System.Windows.Forms.TextBox();
		this.tbVsaDut1 = new System.Windows.Forms.TextBox();
		this.textBox1 = new System.Windows.Forms.TextBox();
		this.label8 = new System.Windows.Forms.Label();
		this.label7 = new System.Windows.Forms.Label();
		this.label6 = new System.Windows.Forms.Label();
		this.label5 = new System.Windows.Forms.Label();
		this.cmbWlanChainMap = new System.Windows.Forms.ComboBoxEx();
		this.cmbWlanInst = new System.Windows.Forms.ComboBoxEx();
		this.p6.SuspendLayout();
		this.p7.SuspendLayout();
		this.plwl.SuspendLayout();
		this.p2.SuspendLayout();
		this.plwlrt.SuspendLayout();
		this.p3.SuspendLayout();
		this.p4.SuspendLayout();
		this.plbt.SuspendLayout();
		this.p9.SuspendLayout();
		this.p5.SuspendLayout();
		this.plbtrt.SuspendLayout();
		this.p8.SuspendLayout();
		this.p1.SuspendLayout();
		this.plSameRemote.SuspendLayout();
		this.plChain.SuspendLayout();
		this.panel8.SuspendLayout();
		this.panel7.SuspendLayout();
		this.panel4.SuspendLayout();
		this.panel6.SuspendLayout();
		this.panel3.SuspendLayout();
		this.panel5.SuspendLayout();
		this.panel2.SuspendLayout();
		this.panel1.SuspendLayout();
		base.SuspendLayout();
		this.tbbtadr.Location = new System.Drawing.Point(124, 24);
		this.tbbtadr.Margin = new System.Windows.Forms.Padding(4);
		this.tbbtadr.Name = "tbbtadr";
		this.tbbtadr.Size = new System.Drawing.Size(197, 22);
		this.tbbtadr.TabIndex = 31;
		this.lbbtadr.AutoSize = true;
		this.lbbtadr.Location = new System.Drawing.Point(15, 29);
		this.lbbtadr.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbbtadr.Name = "lbbtadr";
		this.lbbtadr.Size = new System.Drawing.Size(81, 17);
		this.lbbtadr.TabIndex = 10;
		this.lbbtadr.Text = "BT address";
		this.tbbtpath.Location = new System.Drawing.Point(28, 25);
		this.tbbtpath.Margin = new System.Windows.Forms.Padding(4);
		this.tbbtpath.Name = "tbbtpath";
		this.tbbtpath.Size = new System.Drawing.Size(627, 22);
		this.tbbtpath.TabIndex = 43;
		this.btnBtPath.Location = new System.Drawing.Point(697, 21);
		this.btnBtPath.Margin = new System.Windows.Forms.Padding(4);
		this.btnBtPath.Name = "btnBtPath";
		this.btnBtPath.Size = new System.Drawing.Size(49, 28);
		this.btnBtPath.TabIndex = 44;
		this.btnBtPath.Text = "...";
		this.btnBtPath.UseVisualStyleBackColor = true;
		this.btnBtPath.Click += new System.EventHandler(btnBTLPT_Click);
		this.lbLptBT.AutoSize = true;
		this.lbLptBT.Location = new System.Drawing.Point(24, 5);
		this.lbLptBT.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbLptBT.Name = "lbLptBT";
		this.lbLptBT.Size = new System.Drawing.Size(269, 17);
		this.lbLptBT.TabIndex = 16;
		this.lbLptBT.Text = "StartLitePointConnectivityServer.exe path";
		this.openFileDialog1.FileName = "openFileDialog1";
		this.tbwlwv.Location = new System.Drawing.Point(28, 31);
		this.tbwlwv.Margin = new System.Windows.Forms.Padding(4);
		this.tbwlwv.Name = "tbwlwv";
		this.tbwlwv.Size = new System.Drawing.Size(629, 22);
		this.tbwlwv.TabIndex = 15;
		this.btnwlwv.Location = new System.Drawing.Point(700, 28);
		this.btnwlwv.Margin = new System.Windows.Forms.Padding(4);
		this.btnwlwv.Name = "btnwlwv";
		this.btnwlwv.Size = new System.Drawing.Size(49, 28);
		this.btnwlwv.TabIndex = 16;
		this.btnwlwv.Text = "...";
		this.btnwlwv.UseVisualStyleBackColor = true;
		this.btnwlwv.Click += new System.EventHandler(btnWlanPath_Click);
		this.lbWaveBT.AutoSize = true;
		this.lbWaveBT.Location = new System.Drawing.Point(24, 5);
		this.lbWaveBT.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbWaveBT.Name = "lbWaveBT";
		this.lbWaveBT.Size = new System.Drawing.Size(102, 17);
		this.lbWaveBT.TabIndex = 15;
		this.lbWaveBT.Text = "Wavefile folder";
		this.cb_same_remote.AutoSize = true;
		this.cb_same_remote.Font = new System.Drawing.Font("Microsoft Sans Serif", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.cb_same_remote.Location = new System.Drawing.Point(99, 5);
		this.cb_same_remote.Margin = new System.Windows.Forms.Padding(4);
		this.cb_same_remote.Name = "cb_same_remote";
		this.cb_same_remote.Size = new System.Drawing.Size(271, 29);
		this.cb_same_remote.TabIndex = 3;
		this.cb_same_remote.Text = "Same control for BlueTooth";
		this.cb_same_remote.UseVisualStyleBackColor = true;
		this.cb_same_remote.Visible = false;
		this.cb_same_remote.CheckedChanged += new System.EventHandler(bBTSameRemote_Changed);
		this.cb_wl.AutoSize = true;
		this.cb_wl.Checked = true;
		this.cb_wl.CheckState = System.Windows.Forms.CheckState.Checked;
		this.cb_wl.Font = new System.Drawing.Font("Microsoft Sans Serif", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.cb_wl.Location = new System.Drawing.Point(32, 4);
		this.cb_wl.Margin = new System.Windows.Forms.Padding(4);
		this.cb_wl.Name = "cb_wl";
		this.cb_wl.Size = new System.Drawing.Size(93, 29);
		this.cb_wl.TabIndex = 1;
		this.cb_wl.Text = "WLAN";
		this.cb_wl.UseVisualStyleBackColor = true;
		this.cb_wl.CheckedChanged += new System.EventHandler(bWlan_Changed);
		this.cb_bt.AutoSize = true;
		this.cb_bt.Checked = true;
		this.cb_bt.CheckState = System.Windows.Forms.CheckState.Checked;
		this.cb_bt.Font = new System.Drawing.Font("Microsoft Sans Serif", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.cb_bt.Location = new System.Drawing.Point(167, 4);
		this.cb_bt.Margin = new System.Windows.Forms.Padding(4);
		this.cb_bt.Name = "cb_bt";
		this.cb_bt.Size = new System.Drawing.Size(124, 29);
		this.cb_bt.TabIndex = 2;
		this.cb_bt.Text = "BlueTooth";
		this.cb_bt.UseVisualStyleBackColor = true;
		this.cb_bt.CheckedChanged += new System.EventHandler(bBT_Changed);
		this.lbNameBT.AutoSize = true;
		this.lbNameBT.Location = new System.Drawing.Point(5, 10);
		this.lbNameBT.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbNameBT.Name = "lbNameBT";
		this.lbNameBT.Size = new System.Drawing.Size(45, 17);
		this.lbNameBT.TabIndex = 5;
		this.lbNameBT.Text = "Name";
		this.tbbtwv.Location = new System.Drawing.Point(28, 25);
		this.tbbtwv.Margin = new System.Windows.Forms.Padding(4);
		this.tbbtwv.Name = "tbbtwv";
		this.tbbtwv.Size = new System.Drawing.Size(627, 22);
		this.tbbtwv.TabIndex = 41;
		this.btnbtwv.Location = new System.Drawing.Point(697, 22);
		this.btnbtwv.Margin = new System.Windows.Forms.Padding(4);
		this.btnbtwv.Name = "btnbtwv";
		this.btnbtwv.Size = new System.Drawing.Size(49, 28);
		this.btnbtwv.TabIndex = 42;
		this.btnbtwv.Text = "...";
		this.btnbtwv.UseVisualStyleBackColor = true;
		this.btnbtwv.Click += new System.EventHandler(btnBTPath_Click);
		this.lbWaveWlan.AutoSize = true;
		this.lbWaveWlan.Location = new System.Drawing.Point(24, 11);
		this.lbWaveWlan.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbWaveWlan.Name = "lbWaveWlan";
		this.lbWaveWlan.Size = new System.Drawing.Size(102, 17);
		this.lbWaveWlan.TabIndex = 15;
		this.lbWaveWlan.Text = "Wavefile folder";
		this.cbwlpad.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cbwlpad.FormattingEnabled = true;
		this.cbwlpad.Location = new System.Drawing.Point(104, 22);
		this.cbwlpad.Margin = new System.Windows.Forms.Padding(4);
		this.cbwlpad.Name = "cbwlpad";
		this.cbwlpad.Size = new System.Drawing.Size(57, 24);
		this.cbwlpad.TabIndex = 11;
		this.cbwlpad.Visible = false;
		this.tbwlip.Location = new System.Drawing.Point(17, 22);
		this.tbwlip.Margin = new System.Windows.Forms.Padding(4);
		this.tbwlip.Name = "tbwlip";
		this.tbwlip.Size = new System.Drawing.Size(164, 22);
		this.tbwlip.TabIndex = 9;
		this.tbwlip.TabStop = false;
		this.tbwlip.Visible = false;
		this.lbNameWlan.AutoSize = true;
		this.lbNameWlan.Location = new System.Drawing.Point(145, 4);
		this.lbNameWlan.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbNameWlan.Name = "lbNameWlan";
		this.lbNameWlan.Size = new System.Drawing.Size(45, 17);
		this.lbNameWlan.TabIndex = 5;
		this.lbNameWlan.Text = "Name";
		this.lbRemoteWlan.AutoSize = true;
		this.lbRemoteWlan.Location = new System.Drawing.Point(171, 5);
		this.lbRemoteWlan.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbRemoteWlan.Name = "lbRemoteWlan";
		this.lbRemoteWlan.Size = new System.Drawing.Size(57, 17);
		this.lbRemoteWlan.TabIndex = 6;
		this.lbRemoteWlan.Text = "Remote";
		this.lbwlpad.AutoSize = true;
		this.lbwlpad.Location = new System.Drawing.Point(100, 4);
		this.lbwlpad.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbwlpad.Name = "lbwlpad";
		this.lbwlpad.Size = new System.Drawing.Size(33, 17);
		this.lbwlpad.TabIndex = 7;
		this.lbwlpad.Text = "Pad";
		this.lbwlpad.Visible = false;
		this.lbwlip.AutoSize = true;
		this.lbwlip.Location = new System.Drawing.Point(13, 2);
		this.lbwlip.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbwlip.Name = "lbwlip";
		this.lbwlip.Size = new System.Drawing.Size(52, 17);
		this.lbwlip.TabIndex = 8;
		this.lbwlip.Text = "Host ip";
		this.lbwlip.Visible = false;
		this.tbwlvs.Location = new System.Drawing.Point(17, 23);
		this.tbwlvs.Margin = new System.Windows.Forms.Padding(4);
		this.tbwlvs.Name = "tbwlvs";
		this.tbwlvs.Size = new System.Drawing.Size(461, 22);
		this.tbwlvs.TabIndex = 8;
		this.tbwlvs.TabStop = false;
		this.tbwlvs.Visible = false;
		this.lbwlvs.AutoSize = true;
		this.lbwlvs.Location = new System.Drawing.Point(13, 4);
		this.lbwlvs.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbwlvs.Name = "lbwlvs";
		this.lbwlvs.Size = new System.Drawing.Size(72, 17);
		this.lbwlvs.TabIndex = 8;
		this.lbwlvs.Text = "VisaString";
		this.lbwlvs.Visible = false;
		this.tbwlpath.Location = new System.Drawing.Point(28, 27);
		this.tbwlpath.Margin = new System.Windows.Forms.Padding(4);
		this.tbwlpath.Name = "tbwlpath";
		this.tbwlpath.Size = new System.Drawing.Size(627, 22);
		this.tbwlpath.TabIndex = 17;
		this.btnWlanPath.Location = new System.Drawing.Point(697, 22);
		this.btnWlanPath.Margin = new System.Windows.Forms.Padding(4);
		this.btnWlanPath.Name = "btnWlanPath";
		this.btnWlanPath.Size = new System.Drawing.Size(49, 28);
		this.btnWlanPath.TabIndex = 18;
		this.btnWlanPath.Text = "...";
		this.btnWlanPath.UseVisualStyleBackColor = true;
		this.btnWlanPath.Click += new System.EventHandler(btnWlanLPT_Click);
		this.lbLptWlan.AutoSize = true;
		this.lbLptWlan.Location = new System.Drawing.Point(24, 7);
		this.lbLptWlan.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbLptWlan.Name = "lbLptWlan";
		this.lbLptWlan.Size = new System.Drawing.Size(269, 17);
		this.lbLptWlan.TabIndex = 16;
		this.lbLptWlan.Text = "StartLitePointConnectivityServer.exe path";
		this.p6.Controls.Add(this.btnbtwv);
		this.p6.Controls.Add(this.tbbtwv);
		this.p6.Controls.Add(this.lbWaveBT);
		this.p6.Location = new System.Drawing.Point(4, 126);
		this.p6.Margin = new System.Windows.Forms.Padding(4);
		this.p6.Name = "p6";
		this.p6.Size = new System.Drawing.Size(865, 50);
		this.p6.TabIndex = 20;
		this.p6.Visible = false;
		this.p7.Controls.Add(this.btnBtPath);
		this.p7.Controls.Add(this.tbbtpath);
		this.p7.Controls.Add(this.lbLptBT);
		this.p7.Location = new System.Drawing.Point(4, 178);
		this.p7.Margin = new System.Windows.Forms.Padding(4);
		this.p7.Name = "p7";
		this.p7.Size = new System.Drawing.Size(865, 50);
		this.p7.TabIndex = 21;
		this.p7.Visible = false;
		this.plwl.Controls.Add(this.label3);
		this.plwl.Controls.Add(this.p2);
		this.plwl.Controls.Add(this.p3);
		this.plwl.Controls.Add(this.p4);
		this.plwl.Controls.Add(this.cb_wl_name);
		this.plwl.Controls.Add(this.lbNameWlan);
		this.plwl.Location = new System.Drawing.Point(5, 38);
		this.plwl.Margin = new System.Windows.Forms.Padding(4);
		this.plwl.Name = "plwl";
		this.plwl.Size = new System.Drawing.Size(873, 268);
		this.plwl.TabIndex = 22;
		this.label3.AutoSize = true;
		this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.label3.Location = new System.Drawing.Point(27, 18);
		this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label3.Name = "label3";
		this.label3.Size = new System.Drawing.Size(71, 25);
		this.label3.TabIndex = 22;
		this.label3.Text = "WLAN";
		this.p2.Controls.Add(this.plwlrt);
		this.p2.Controls.Add(this.label1);
		this.p2.Controls.Add(this.cb_wl_ihw);
		this.p2.Controls.Add(this.cb_wl_remote);
		this.p2.Controls.Add(this.lbRemoteWlan);
		this.p2.Location = new System.Drawing.Point(4, 54);
		this.p2.Margin = new System.Windows.Forms.Padding(4);
		this.p2.Name = "p2";
		this.p2.Size = new System.Drawing.Size(865, 66);
		this.p2.TabIndex = 21;
		this.plwlrt.Controls.Add(this.cbwlrfpt);
		this.plwlrt.Controls.Add(this.lbwlrfpt);
		this.plwlrt.Controls.Add(this.tbwlpt);
		this.plwlrt.Controls.Add(this.tbwlvs);
		this.plwlrt.Controls.Add(this.lbwlpt);
		this.plwlrt.Controls.Add(this.lbwlvs);
		this.plwlrt.Controls.Add(this.tbwlip);
		this.plwlrt.Controls.Add(this.lbwlip);
		this.plwlrt.Controls.Add(this.lbwlsad);
		this.plwlrt.Controls.Add(this.lbwlbid);
		this.plwlrt.Controls.Add(this.lbwlpad);
		this.plwlrt.Controls.Add(this.cbwlsad);
		this.plwlrt.Controls.Add(this.cbwlbid);
		this.plwlrt.Controls.Add(this.cbwlpad);
		this.plwlrt.Location = new System.Drawing.Point(288, 4);
		this.plwlrt.Margin = new System.Windows.Forms.Padding(4);
		this.plwlrt.Name = "plwlrt";
		this.plwlrt.Size = new System.Drawing.Size(525, 62);
		this.plwlrt.TabIndex = 26;
		this.cbwlrfpt.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cbwlrfpt.FormattingEnabled = true;
		this.cbwlrfpt.Location = new System.Drawing.Point(376, 22);
		this.cbwlrfpt.Margin = new System.Windows.Forms.Padding(4);
		this.cbwlrfpt.Name = "cbwlrfpt";
		this.cbwlrfpt.Size = new System.Drawing.Size(103, 24);
		this.cbwlrfpt.TabIndex = 14;
		this.cbwlrfpt.Visible = false;
		this.lbwlrfpt.AutoSize = true;
		this.lbwlrfpt.Location = new System.Drawing.Point(372, 4);
		this.lbwlrfpt.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbwlrfpt.Name = "lbwlrfpt";
		this.lbwlrfpt.Size = new System.Drawing.Size(55, 17);
		this.lbwlrfpt.TabIndex = 24;
		this.lbwlrfpt.Text = "RF port";
		this.lbwlrfpt.Visible = false;
		this.tbwlpt.Location = new System.Drawing.Point(225, 23);
		this.tbwlpt.Margin = new System.Windows.Forms.Padding(4);
		this.tbwlpt.Name = "tbwlpt";
		this.tbwlpt.Size = new System.Drawing.Size(104, 22);
		this.tbwlpt.TabIndex = 13;
		this.tbwlpt.Visible = false;
		this.lbwlpt.AutoSize = true;
		this.lbwlpt.Location = new System.Drawing.Point(221, 2);
		this.lbwlpt.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbwlpt.Name = "lbwlpt";
		this.lbwlpt.Size = new System.Drawing.Size(34, 17);
		this.lbwlpt.TabIndex = 22;
		this.lbwlpt.Text = "Port";
		this.lbwlpt.Visible = false;
		this.lbwlsad.AutoSize = true;
		this.lbwlsad.Location = new System.Drawing.Point(187, 4);
		this.lbwlsad.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbwlsad.Name = "lbwlsad";
		this.lbwlsad.Size = new System.Drawing.Size(33, 17);
		this.lbwlsad.TabIndex = 7;
		this.lbwlsad.Text = "Sad";
		this.lbwlsad.Visible = false;
		this.lbwlbid.AutoSize = true;
		this.lbwlbid.Location = new System.Drawing.Point(13, 4);
		this.lbwlbid.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbwlbid.Name = "lbwlbid";
		this.lbwlbid.Size = new System.Drawing.Size(59, 17);
		this.lbwlbid.TabIndex = 7;
		this.lbwlbid.Text = "BoardID";
		this.lbwlbid.Visible = false;
		this.cbwlsad.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cbwlsad.FormattingEnabled = true;
		this.cbwlsad.Location = new System.Drawing.Point(191, 22);
		this.cbwlsad.Margin = new System.Windows.Forms.Padding(4);
		this.cbwlsad.Name = "cbwlsad";
		this.cbwlsad.Size = new System.Drawing.Size(57, 24);
		this.cbwlsad.TabIndex = 12;
		this.cbwlsad.Visible = false;
		this.cbwlbid.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cbwlbid.FormattingEnabled = true;
		this.cbwlbid.Location = new System.Drawing.Point(17, 22);
		this.cbwlbid.Margin = new System.Windows.Forms.Padding(4);
		this.cbwlbid.Name = "cbwlbid";
		this.cbwlbid.Size = new System.Drawing.Size(57, 24);
		this.cbwlbid.TabIndex = 10;
		this.cbwlbid.Visible = false;
		this.label1.AutoSize = true;
		this.label1.Location = new System.Drawing.Point(24, 6);
		this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label1.Name = "label1";
		this.label1.Size = new System.Drawing.Size(86, 17);
		this.label1.TabIndex = 21;
		this.label1.Text = "HWInterface";
		this.cb_wl_ihw.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cb_wl_ihw.FormattingEnabled = true;
		this.cb_wl_ihw.Location = new System.Drawing.Point(24, 25);
		this.cb_wl_ihw.Margin = new System.Windows.Forms.Padding(4);
		this.cb_wl_ihw.Name = "cb_wl_ihw";
		this.cb_wl_ihw.Size = new System.Drawing.Size(117, 24);
		this.cb_wl_ihw.TabIndex = 6;
		this.cb_wl_ihw.TextChanged += new System.EventHandler(cb_wl_ihw_SelectedIndexChanged);
		this.cb_wl_remote.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cb_wl_remote.FormattingEnabled = true;
		this.cb_wl_remote.Location = new System.Drawing.Point(175, 25);
		this.cb_wl_remote.Margin = new System.Windows.Forms.Padding(4);
		this.cb_wl_remote.Name = "cb_wl_remote";
		this.cb_wl_remote.Size = new System.Drawing.Size(69, 24);
		this.cb_wl_remote.TabIndex = 7;
		this.cb_wl_remote.TextChanged += new System.EventHandler(cb_wl_remote_SelectedIndexChanged);
		this.p3.Controls.Add(this.lbWaveWlan);
		this.p3.Controls.Add(this.btnwlwv);
		this.p3.Controls.Add(this.tbwlwv);
		this.p3.Location = new System.Drawing.Point(4, 124);
		this.p3.Margin = new System.Windows.Forms.Padding(4);
		this.p3.Name = "p3";
		this.p3.Size = new System.Drawing.Size(865, 70);
		this.p3.TabIndex = 20;
		this.p4.Controls.Add(this.lbLptWlan);
		this.p4.Controls.Add(this.btnWlanPath);
		this.p4.Controls.Add(this.tbwlpath);
		this.p4.Location = new System.Drawing.Point(4, 202);
		this.p4.Margin = new System.Windows.Forms.Padding(4);
		this.p4.Name = "p4";
		this.p4.Size = new System.Drawing.Size(865, 62);
		this.p4.TabIndex = 17;
		this.p4.Visible = false;
		this.cb_wl_name.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cb_wl_name.FormattingEnabled = true;
		this.cb_wl_name.Location = new System.Drawing.Point(149, 21);
		this.cb_wl_name.Margin = new System.Windows.Forms.Padding(4);
		this.cb_wl_name.Name = "cb_wl_name";
		this.cb_wl_name.Size = new System.Drawing.Size(148, 24);
		this.cb_wl_name.TabIndex = 5;
		this.cb_wl_name.TextChanged += new System.EventHandler(NameWlan_Changed);
		this.plbt.Controls.Add(this.p9);
		this.plbt.Controls.Add(this.label4);
		this.plbt.Controls.Add(this.p5);
		this.plbt.Controls.Add(this.p7);
		this.plbt.Controls.Add(this.p8);
		this.plbt.Controls.Add(this.p6);
		this.plbt.Location = new System.Drawing.Point(5, 422);
		this.plbt.Margin = new System.Windows.Forms.Padding(4);
		this.plbt.Name = "plbt";
		this.plbt.Size = new System.Drawing.Size(873, 230);
		this.plbt.TabIndex = 23;
		this.p9.Controls.Add(this.cb_bt_name);
		this.p9.Controls.Add(this.lbNameBT);
		this.p9.Location = new System.Drawing.Point(140, 12);
		this.p9.Margin = new System.Windows.Forms.Padding(4);
		this.p9.Name = "p9";
		this.p9.Size = new System.Drawing.Size(208, 55);
		this.p9.TabIndex = 26;
		this.cb_bt_name.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cb_bt_name.FormattingEnabled = true;
		this.cb_bt_name.Location = new System.Drawing.Point(9, 28);
		this.cb_bt_name.Margin = new System.Windows.Forms.Padding(4);
		this.cb_bt_name.Name = "cb_bt_name";
		this.cb_bt_name.Size = new System.Drawing.Size(149, 24);
		this.cb_bt_name.TabIndex = 30;
		this.cb_bt_name.TextChanged += new System.EventHandler(NameBt_Changed);
		this.label4.AutoSize = true;
		this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.label4.Location = new System.Drawing.Point(23, 31);
		this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label4.Name = "label4";
		this.label4.Size = new System.Drawing.Size(102, 25);
		this.label4.TabIndex = 25;
		this.label4.Text = "BlueTooth";
		this.p5.Controls.Add(this.plbtrt);
		this.p5.Controls.Add(this.lbbtihw);
		this.p5.Controls.Add(this.cb_bt_ihw);
		this.p5.Controls.Add(this.cb_bt_remote);
		this.p5.Controls.Add(this.lbbtrt);
		this.p5.Location = new System.Drawing.Point(4, 68);
		this.p5.Margin = new System.Windows.Forms.Padding(4);
		this.p5.Name = "p5";
		this.p5.Size = new System.Drawing.Size(865, 59);
		this.p5.TabIndex = 21;
		this.plbtrt.Controls.Add(this.cbbtrfpt);
		this.plbtrt.Controls.Add(this.lbbtrfpt);
		this.plbtrt.Controls.Add(this.tbbtpt);
		this.plbtrt.Controls.Add(this.lbbtpt);
		this.plbtrt.Controls.Add(this.tbbtvs);
		this.plbtrt.Controls.Add(this.lbbtsad);
		this.plbtrt.Controls.Add(this.tbbtip);
		this.plbtrt.Controls.Add(this.lbbtpad);
		this.plbtrt.Controls.Add(this.lbbtvs);
		this.plbtrt.Controls.Add(this.lbbtip);
		this.plbtrt.Controls.Add(this.lbbtbid);
		this.plbtrt.Controls.Add(this.cbbtsad);
		this.plbtrt.Controls.Add(this.cbbtbid);
		this.plbtrt.Controls.Add(this.cbbtpad);
		this.plbtrt.Location = new System.Drawing.Point(299, 1);
		this.plbtrt.Margin = new System.Windows.Forms.Padding(4);
		this.plbtrt.Name = "plbtrt";
		this.plbtrt.Size = new System.Drawing.Size(519, 54);
		this.plbtrt.TabIndex = 26;
		this.cbbtrfpt.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cbbtrfpt.FormattingEnabled = true;
		this.cbbtrfpt.Location = new System.Drawing.Point(369, 22);
		this.cbbtrfpt.Margin = new System.Windows.Forms.Padding(4);
		this.cbbtrfpt.Name = "cbbtrfpt";
		this.cbbtrfpt.Size = new System.Drawing.Size(103, 24);
		this.cbbtrfpt.TabIndex = 40;
		this.cbbtrfpt.Visible = false;
		this.lbbtrfpt.AutoSize = true;
		this.lbbtrfpt.Location = new System.Drawing.Point(365, 4);
		this.lbbtrfpt.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbbtrfpt.Name = "lbbtrfpt";
		this.lbbtrfpt.Size = new System.Drawing.Size(55, 17);
		this.lbbtrfpt.TabIndex = 24;
		this.lbbtrfpt.Text = "RF port";
		this.lbbtrfpt.Visible = false;
		this.tbbtpt.Location = new System.Drawing.Point(219, 23);
		this.tbbtpt.Margin = new System.Windows.Forms.Padding(4);
		this.tbbtpt.Name = "tbbtpt";
		this.tbbtpt.Size = new System.Drawing.Size(104, 22);
		this.tbbtpt.TabIndex = 39;
		this.tbbtpt.Visible = false;
		this.lbbtpt.AutoSize = true;
		this.lbbtpt.Location = new System.Drawing.Point(215, 4);
		this.lbbtpt.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbbtpt.Name = "lbbtpt";
		this.lbbtpt.Size = new System.Drawing.Size(34, 17);
		this.lbbtpt.TabIndex = 22;
		this.lbbtpt.Text = "Port";
		this.lbbtpt.Visible = false;
		this.tbbtvs.Location = new System.Drawing.Point(11, 25);
		this.tbbtvs.Margin = new System.Windows.Forms.Padding(4);
		this.tbbtvs.Name = "tbbtvs";
		this.tbbtvs.Size = new System.Drawing.Size(461, 22);
		this.tbbtvs.TabIndex = 34;
		this.tbbtvs.TabStop = false;
		this.tbbtvs.Visible = false;
		this.lbbtsad.AutoSize = true;
		this.lbbtsad.Location = new System.Drawing.Point(180, 4);
		this.lbbtsad.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbbtsad.Name = "lbbtsad";
		this.lbbtsad.Size = new System.Drawing.Size(33, 17);
		this.lbbtsad.TabIndex = 7;
		this.lbbtsad.Text = "Sad";
		this.lbbtsad.Visible = false;
		this.tbbtip.Location = new System.Drawing.Point(11, 23);
		this.tbbtip.Margin = new System.Windows.Forms.Padding(4);
		this.tbbtip.Name = "tbbtip";
		this.tbbtip.Size = new System.Drawing.Size(164, 22);
		this.tbbtip.TabIndex = 35;
		this.tbbtip.TabStop = false;
		this.tbbtip.Visible = false;
		this.lbbtpad.AutoSize = true;
		this.lbbtpad.Location = new System.Drawing.Point(93, 4);
		this.lbbtpad.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbbtpad.Name = "lbbtpad";
		this.lbbtpad.Size = new System.Drawing.Size(33, 17);
		this.lbbtpad.TabIndex = 7;
		this.lbbtpad.Text = "Pad";
		this.lbbtpad.Visible = false;
		this.lbbtvs.AutoSize = true;
		this.lbbtvs.Location = new System.Drawing.Point(7, 4);
		this.lbbtvs.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbbtvs.Name = "lbbtvs";
		this.lbbtvs.Size = new System.Drawing.Size(72, 17);
		this.lbbtvs.TabIndex = 8;
		this.lbbtvs.Text = "VisaString";
		this.lbbtvs.Visible = false;
		this.lbbtip.AutoSize = true;
		this.lbbtip.Location = new System.Drawing.Point(7, 4);
		this.lbbtip.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbbtip.Name = "lbbtip";
		this.lbbtip.Size = new System.Drawing.Size(52, 17);
		this.lbbtip.TabIndex = 8;
		this.lbbtip.Text = "Host ip";
		this.lbbtip.Visible = false;
		this.lbbtbid.AutoSize = true;
		this.lbbtbid.Location = new System.Drawing.Point(7, 4);
		this.lbbtbid.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbbtbid.Name = "lbbtbid";
		this.lbbtbid.Size = new System.Drawing.Size(59, 17);
		this.lbbtbid.TabIndex = 7;
		this.lbbtbid.Text = "BoardID";
		this.lbbtbid.Visible = false;
		this.cbbtsad.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cbbtsad.FormattingEnabled = true;
		this.cbbtsad.Location = new System.Drawing.Point(184, 22);
		this.cbbtsad.Margin = new System.Windows.Forms.Padding(4);
		this.cbbtsad.Name = "cbbtsad";
		this.cbbtsad.Size = new System.Drawing.Size(57, 24);
		this.cbbtsad.TabIndex = 38;
		this.cbbtsad.Visible = false;
		this.cbbtbid.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cbbtbid.FormattingEnabled = true;
		this.cbbtbid.Location = new System.Drawing.Point(11, 23);
		this.cbbtbid.Margin = new System.Windows.Forms.Padding(4);
		this.cbbtbid.Name = "cbbtbid";
		this.cbbtbid.Size = new System.Drawing.Size(57, 24);
		this.cbbtbid.TabIndex = 36;
		this.cbbtbid.Visible = false;
		this.cbbtpad.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cbbtpad.FormattingEnabled = true;
		this.cbbtpad.Location = new System.Drawing.Point(97, 22);
		this.cbbtpad.Margin = new System.Windows.Forms.Padding(4);
		this.cbbtpad.Name = "cbbtpad";
		this.cbbtpad.Size = new System.Drawing.Size(57, 24);
		this.cbbtpad.TabIndex = 37;
		this.cbbtpad.Visible = false;
		this.lbbtihw.AutoSize = true;
		this.lbbtihw.Location = new System.Drawing.Point(24, 6);
		this.lbbtihw.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbbtihw.Name = "lbbtihw";
		this.lbbtihw.Size = new System.Drawing.Size(86, 17);
		this.lbbtihw.TabIndex = 21;
		this.lbbtihw.Text = "HWInterface";
		this.cb_bt_ihw.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cb_bt_ihw.FormattingEnabled = true;
		this.cb_bt_ihw.Location = new System.Drawing.Point(24, 25);
		this.cb_bt_ihw.Margin = new System.Windows.Forms.Padding(4);
		this.cb_bt_ihw.Name = "cb_bt_ihw";
		this.cb_bt_ihw.Size = new System.Drawing.Size(117, 24);
		this.cb_bt_ihw.TabIndex = 32;
		this.cb_bt_ihw.TextChanged += new System.EventHandler(cb_bt_ihw_SelectedIndexChanged);
		this.cb_bt_remote.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cb_bt_remote.FormattingEnabled = true;
		this.cb_bt_remote.Location = new System.Drawing.Point(175, 25);
		this.cb_bt_remote.Margin = new System.Windows.Forms.Padding(4);
		this.cb_bt_remote.Name = "cb_bt_remote";
		this.cb_bt_remote.Size = new System.Drawing.Size(69, 24);
		this.cb_bt_remote.TabIndex = 33;
		this.cb_bt_remote.TextChanged += new System.EventHandler(cb_bt_remote_SelectedIndexChanged);
		this.lbbtrt.AutoSize = true;
		this.lbbtrt.Location = new System.Drawing.Point(171, 5);
		this.lbbtrt.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lbbtrt.Name = "lbbtrt";
		this.lbbtrt.Size = new System.Drawing.Size(57, 17);
		this.lbbtrt.TabIndex = 6;
		this.lbbtrt.Text = "Remote";
		this.p8.Controls.Add(this.tbbtadr);
		this.p8.Controls.Add(this.lbbtadr);
		this.p8.Location = new System.Drawing.Point(499, 15);
		this.p8.Margin = new System.Windows.Forms.Padding(4);
		this.p8.Name = "p8";
		this.p8.Size = new System.Drawing.Size(371, 49);
		this.p8.TabIndex = 24;
		this.p8.Visible = false;
		this.p1.Controls.Add(this.plSameRemote);
		this.p1.Controls.Add(this.cb_bt);
		this.p1.Controls.Add(this.cb_wl);
		this.p1.Location = new System.Drawing.Point(5, 0);
		this.p1.Margin = new System.Windows.Forms.Padding(4);
		this.p1.Name = "p1";
		this.p1.Size = new System.Drawing.Size(872, 38);
		this.p1.TabIndex = 24;
		this.plSameRemote.Controls.Add(this.cb_same_remote);
		this.plSameRemote.Location = new System.Drawing.Point(441, 0);
		this.plSameRemote.Margin = new System.Windows.Forms.Padding(4);
		this.plSameRemote.Name = "plSameRemote";
		this.plSameRemote.Size = new System.Drawing.Size(428, 37);
		this.plSameRemote.TabIndex = 19;
		this.label2.AutoSize = true;
		this.label2.Location = new System.Drawing.Point(28, 13);
		this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label2.Name = "label2";
		this.label2.Size = new System.Drawing.Size(88, 17);
		this.label2.TabIndex = 26;
		this.label2.Text = "Inst / Vendor";
		this.plChain.Controls.Add(this.panel8);
		this.plChain.Controls.Add(this.panel7);
		this.plChain.Controls.Add(this.panel4);
		this.plChain.Controls.Add(this.panel6);
		this.plChain.Controls.Add(this.panel3);
		this.plChain.Controls.Add(this.panel5);
		this.plChain.Controls.Add(this.panel2);
		this.plChain.Controls.Add(this.panel1);
		this.plChain.Controls.Add(this.label8);
		this.plChain.Controls.Add(this.label7);
		this.plChain.Controls.Add(this.label6);
		this.plChain.Controls.Add(this.label5);
		this.plChain.Controls.Add(this.cmbWlanChainMap);
		this.plChain.Controls.Add(this.label2);
		this.plChain.Controls.Add(this.cmbWlanInst);
		this.plChain.Location = new System.Drawing.Point(5, 658);
		this.plChain.Name = "plChain";
		this.plChain.Size = new System.Drawing.Size(868, 255);
		this.plChain.TabIndex = 27;
		this.panel8.Controls.Add(this.tbVsgDut8);
		this.panel8.Controls.Add(this.textBox15);
		this.panel8.Controls.Add(this.tbVsaDut8);
		this.panel8.Location = new System.Drawing.Point(350, 225);
		this.panel8.Name = "panel8";
		this.panel8.Size = new System.Drawing.Size(399, 29);
		this.panel8.TabIndex = 33;
		this.tbVsgDut8.Location = new System.Drawing.Point(301, 4);
		this.tbVsgDut8.Name = "tbVsgDut8";
		this.tbVsgDut8.Size = new System.Drawing.Size(68, 22);
		this.tbVsgDut8.TabIndex = 0;
		this.tbVsgDut8.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.textBox15.Location = new System.Drawing.Point(7, 3);
		this.textBox15.Name = "textBox15";
		this.textBox15.ReadOnly = true;
		this.textBox15.Size = new System.Drawing.Size(68, 22);
		this.textBox15.TabIndex = 0;
		this.textBox15.Text = "8";
		this.textBox15.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.tbVsaDut8.Location = new System.Drawing.Point(154, 4);
		this.tbVsaDut8.Name = "tbVsaDut8";
		this.tbVsaDut8.Size = new System.Drawing.Size(68, 22);
		this.tbVsaDut8.TabIndex = 0;
		this.tbVsaDut8.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.panel7.Controls.Add(this.tbVsgDut7);
		this.panel7.Controls.Add(this.tbVsaDut7);
		this.panel7.Controls.Add(this.textBox13);
		this.panel7.Location = new System.Drawing.Point(350, 197);
		this.panel7.Name = "panel7";
		this.panel7.Size = new System.Drawing.Size(399, 29);
		this.panel7.TabIndex = 32;
		this.tbVsgDut7.Location = new System.Drawing.Point(301, 4);
		this.tbVsgDut7.Name = "tbVsgDut7";
		this.tbVsgDut7.Size = new System.Drawing.Size(68, 22);
		this.tbVsgDut7.TabIndex = 0;
		this.tbVsgDut7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.tbVsaDut7.Location = new System.Drawing.Point(154, 4);
		this.tbVsaDut7.Name = "tbVsaDut7";
		this.tbVsaDut7.Size = new System.Drawing.Size(68, 22);
		this.tbVsaDut7.TabIndex = 0;
		this.tbVsaDut7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.textBox13.Location = new System.Drawing.Point(7, 3);
		this.textBox13.Name = "textBox13";
		this.textBox13.ReadOnly = true;
		this.textBox13.Size = new System.Drawing.Size(68, 22);
		this.textBox13.TabIndex = 0;
		this.textBox13.Text = "7";
		this.textBox13.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.panel4.Controls.Add(this.tbVsgDut4);
		this.panel4.Controls.Add(this.textBox10);
		this.panel4.Controls.Add(this.tbVsaDut4);
		this.panel4.Location = new System.Drawing.Point(350, 109);
		this.panel4.Name = "panel4";
		this.panel4.Size = new System.Drawing.Size(399, 29);
		this.panel4.TabIndex = 33;
		this.tbVsgDut4.Location = new System.Drawing.Point(301, 4);
		this.tbVsgDut4.Name = "tbVsgDut4";
		this.tbVsgDut4.Size = new System.Drawing.Size(68, 22);
		this.tbVsgDut4.TabIndex = 0;
		this.tbVsgDut4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.textBox10.Location = new System.Drawing.Point(7, 3);
		this.textBox10.Name = "textBox10";
		this.textBox10.ReadOnly = true;
		this.textBox10.Size = new System.Drawing.Size(68, 22);
		this.textBox10.TabIndex = 0;
		this.textBox10.Text = "4";
		this.textBox10.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.tbVsaDut4.Location = new System.Drawing.Point(154, 4);
		this.tbVsaDut4.Name = "tbVsaDut4";
		this.tbVsaDut4.Size = new System.Drawing.Size(68, 22);
		this.tbVsaDut4.TabIndex = 0;
		this.tbVsaDut4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.panel6.Controls.Add(this.tbVsgDut6);
		this.panel6.Controls.Add(this.tbVsaDut6);
		this.panel6.Controls.Add(this.textBox9);
		this.panel6.Location = new System.Drawing.Point(350, 167);
		this.panel6.Name = "panel6";
		this.panel6.Size = new System.Drawing.Size(399, 29);
		this.panel6.TabIndex = 31;
		this.tbVsgDut6.Location = new System.Drawing.Point(301, 4);
		this.tbVsgDut6.Name = "tbVsgDut6";
		this.tbVsgDut6.Size = new System.Drawing.Size(68, 22);
		this.tbVsgDut6.TabIndex = 0;
		this.tbVsgDut6.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.tbVsaDut6.Location = new System.Drawing.Point(154, 4);
		this.tbVsaDut6.Name = "tbVsaDut6";
		this.tbVsaDut6.Size = new System.Drawing.Size(68, 22);
		this.tbVsaDut6.TabIndex = 0;
		this.tbVsaDut6.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.textBox9.Location = new System.Drawing.Point(7, 3);
		this.textBox9.Name = "textBox9";
		this.textBox9.ReadOnly = true;
		this.textBox9.Size = new System.Drawing.Size(68, 22);
		this.textBox9.TabIndex = 0;
		this.textBox9.Text = "6";
		this.textBox9.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.panel3.Controls.Add(this.tbVsgDut3);
		this.panel3.Controls.Add(this.tbVsaDut3);
		this.panel3.Controls.Add(this.textBox7);
		this.panel3.Location = new System.Drawing.Point(350, 81);
		this.panel3.Name = "panel3";
		this.panel3.Size = new System.Drawing.Size(399, 29);
		this.panel3.TabIndex = 32;
		this.tbVsgDut3.Location = new System.Drawing.Point(301, 4);
		this.tbVsgDut3.Name = "tbVsgDut3";
		this.tbVsgDut3.Size = new System.Drawing.Size(68, 22);
		this.tbVsgDut3.TabIndex = 0;
		this.tbVsgDut3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.tbVsaDut3.Location = new System.Drawing.Point(154, 4);
		this.tbVsaDut3.Name = "tbVsaDut3";
		this.tbVsaDut3.Size = new System.Drawing.Size(68, 22);
		this.tbVsaDut3.TabIndex = 0;
		this.tbVsaDut3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.textBox7.Location = new System.Drawing.Point(7, 3);
		this.textBox7.Name = "textBox7";
		this.textBox7.ReadOnly = true;
		this.textBox7.Size = new System.Drawing.Size(68, 22);
		this.textBox7.TabIndex = 0;
		this.textBox7.Text = "3";
		this.textBox7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.panel5.Controls.Add(this.tbVsgDut5);
		this.panel5.Controls.Add(this.tbVsaDut5);
		this.panel5.Controls.Add(this.textBox5);
		this.panel5.Location = new System.Drawing.Point(350, 139);
		this.panel5.Name = "panel5";
		this.panel5.Size = new System.Drawing.Size(399, 29);
		this.panel5.TabIndex = 30;
		this.tbVsgDut5.Location = new System.Drawing.Point(301, 4);
		this.tbVsgDut5.Name = "tbVsgDut5";
		this.tbVsgDut5.Size = new System.Drawing.Size(68, 22);
		this.tbVsgDut5.TabIndex = 0;
		this.tbVsgDut5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.tbVsaDut5.Location = new System.Drawing.Point(154, 3);
		this.tbVsaDut5.Name = "tbVsaDut5";
		this.tbVsaDut5.Size = new System.Drawing.Size(68, 22);
		this.tbVsaDut5.TabIndex = 0;
		this.tbVsaDut5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.textBox5.Location = new System.Drawing.Point(7, 3);
		this.textBox5.Name = "textBox5";
		this.textBox5.ReadOnly = true;
		this.textBox5.Size = new System.Drawing.Size(68, 22);
		this.textBox5.TabIndex = 0;
		this.textBox5.Text = "5";
		this.textBox5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.panel2.Controls.Add(this.tbVsgDut2);
		this.panel2.Controls.Add(this.tbVsaDut2);
		this.panel2.Controls.Add(this.textBox4);
		this.panel2.Location = new System.Drawing.Point(350, 51);
		this.panel2.Name = "panel2";
		this.panel2.Size = new System.Drawing.Size(399, 29);
		this.panel2.TabIndex = 31;
		this.tbVsgDut2.Location = new System.Drawing.Point(301, 4);
		this.tbVsgDut2.Name = "tbVsgDut2";
		this.tbVsgDut2.Size = new System.Drawing.Size(68, 22);
		this.tbVsgDut2.TabIndex = 0;
		this.tbVsgDut2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.tbVsaDut2.Location = new System.Drawing.Point(154, 4);
		this.tbVsaDut2.Name = "tbVsaDut2";
		this.tbVsaDut2.Size = new System.Drawing.Size(68, 22);
		this.tbVsaDut2.TabIndex = 0;
		this.tbVsaDut2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.textBox4.Location = new System.Drawing.Point(7, 3);
		this.textBox4.Name = "textBox4";
		this.textBox4.ReadOnly = true;
		this.textBox4.Size = new System.Drawing.Size(68, 22);
		this.textBox4.TabIndex = 0;
		this.textBox4.Text = "2";
		this.textBox4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.panel1.Controls.Add(this.tbVsgDut1);
		this.panel1.Controls.Add(this.tbVsaDut1);
		this.panel1.Controls.Add(this.textBox1);
		this.panel1.Location = new System.Drawing.Point(350, 23);
		this.panel1.Name = "panel1";
		this.panel1.Size = new System.Drawing.Size(399, 29);
		this.panel1.TabIndex = 30;
		this.tbVsgDut1.Location = new System.Drawing.Point(301, 4);
		this.tbVsgDut1.Name = "tbVsgDut1";
		this.tbVsgDut1.Size = new System.Drawing.Size(68, 22);
		this.tbVsgDut1.TabIndex = 0;
		this.tbVsgDut1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.tbVsaDut1.Location = new System.Drawing.Point(154, 3);
		this.tbVsaDut1.Name = "tbVsaDut1";
		this.tbVsaDut1.Size = new System.Drawing.Size(68, 22);
		this.tbVsaDut1.TabIndex = 0;
		this.tbVsaDut1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.textBox1.Location = new System.Drawing.Point(7, 3);
		this.textBox1.Name = "textBox1";
		this.textBox1.ReadOnly = true;
		this.textBox1.Size = new System.Drawing.Size(68, 22);
		this.textBox1.TabIndex = 0;
		this.textBox1.Text = "1";
		this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.label8.AutoSize = true;
		this.label8.Location = new System.Drawing.Point(664, 1);
		this.label8.Name = "label8";
		this.label8.Size = new System.Drawing.Size(37, 17);
		this.label8.TabIndex = 29;
		this.label8.Text = "VSG";
		this.label7.AutoSize = true;
		this.label7.Location = new System.Drawing.Point(518, 1);
		this.label7.Name = "label7";
		this.label7.Size = new System.Drawing.Size(35, 17);
		this.label7.TabIndex = 29;
		this.label7.Text = "VSA";
		this.label6.AutoSize = true;
		this.label6.Location = new System.Drawing.Point(370, 1);
		this.label6.Name = "label6";
		this.label6.Size = new System.Drawing.Size(37, 17);
		this.label6.TabIndex = 29;
		this.label6.Text = "DUT";
		this.label5.AutoSize = true;
		this.label5.Location = new System.Drawing.Point(28, 65);
		this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label5.Name = "label5";
		this.label5.Size = new System.Drawing.Size(102, 17);
		this.label5.TabIndex = 28;
		this.label5.Text = "Chain Mapping";
		this.cmbWlanChainMap.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cmbWlanChainMap.FormattingEnabled = true;
		this.cmbWlanChainMap.Items.AddRange(new object[9] { "0x0", "1x1", "2x2", "3x3", "4x4", "5x5", "6x6", "7x7", "8x8" });
		this.cmbWlanChainMap.Location = new System.Drawing.Point(28, 84);
		this.cmbWlanChainMap.Margin = new System.Windows.Forms.Padding(4);
		this.cmbWlanChainMap.Name = "cmbWlanChainMap";
		this.cmbWlanChainMap.Size = new System.Drawing.Size(183, 24);
		this.cmbWlanChainMap.TabIndex = 27;
		this.cmbWlanChainMap.SelectedIndexChanged += new System.EventHandler(cmbWlanChainMap_SelectedIndexChanged);
		this.cmbWlanInst.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cmbWlanInst.FormattingEnabled = true;
		this.cmbWlanInst.Items.AddRange(new object[5] { "Anritsu", "Keysight", "LitePoint", "NI", "RS" });
		this.cmbWlanInst.Location = new System.Drawing.Point(28, 32);
		this.cmbWlanInst.Margin = new System.Windows.Forms.Padding(4);
		this.cmbWlanInst.Name = "cmbWlanInst";
		this.cmbWlanInst.Size = new System.Drawing.Size(183, 24);
		this.cmbWlanInst.TabIndex = 25;
		this.cmbWlanInst.SelectedIndexChanged += new System.EventHandler(cmbWlanInst_SelectedIndexChanged);
		base.AutoScaleDimensions = new System.Drawing.SizeF(8f, 16f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.Controls.Add(this.plChain);
		base.Controls.Add(this.p1);
		base.Controls.Add(this.plbt);
		base.Controls.Add(this.plwl);
		base.Margin = new System.Windows.Forms.Padding(4);
		base.Name = "WCNPanel";
		base.Size = new System.Drawing.Size(875, 654);
		base.Load += new System.EventHandler(WirelessConnectTestPanel_Load);
		this.p6.ResumeLayout(false);
		this.p6.PerformLayout();
		this.p7.ResumeLayout(false);
		this.p7.PerformLayout();
		this.plwl.ResumeLayout(false);
		this.plwl.PerformLayout();
		this.p2.ResumeLayout(false);
		this.p2.PerformLayout();
		this.plwlrt.ResumeLayout(false);
		this.plwlrt.PerformLayout();
		this.p3.ResumeLayout(false);
		this.p3.PerformLayout();
		this.p4.ResumeLayout(false);
		this.p4.PerformLayout();
		this.plbt.ResumeLayout(false);
		this.plbt.PerformLayout();
		this.p9.ResumeLayout(false);
		this.p9.PerformLayout();
		this.p5.ResumeLayout(false);
		this.p5.PerformLayout();
		this.plbtrt.ResumeLayout(false);
		this.plbtrt.PerformLayout();
		this.p8.ResumeLayout(false);
		this.p8.PerformLayout();
		this.p1.ResumeLayout(false);
		this.p1.PerformLayout();
		this.plSameRemote.ResumeLayout(false);
		this.plSameRemote.PerformLayout();
		this.plChain.ResumeLayout(false);
		this.plChain.PerformLayout();
		this.panel8.ResumeLayout(false);
		this.panel8.PerformLayout();
		this.panel7.ResumeLayout(false);
		this.panel7.PerformLayout();
		this.panel4.ResumeLayout(false);
		this.panel4.PerformLayout();
		this.panel6.ResumeLayout(false);
		this.panel6.PerformLayout();
		this.panel3.ResumeLayout(false);
		this.panel3.PerformLayout();
		this.panel5.ResumeLayout(false);
		this.panel5.PerformLayout();
		this.panel2.ResumeLayout(false);
		this.panel2.PerformLayout();
		this.panel1.ResumeLayout(false);
		this.panel1.PerformLayout();
		base.ResumeLayout(false);
	}
}
