//读取配置参数
private void loadcofig()
{
//List<param> camra1 = new List<param>();
List<string[]> camra = new List<string[]>();
if (File.Exists("config.txt"))
{
StreamReader sr = new StreamReader("config.txt", Encoding.Default);
string line;
string[] ss;
while ((line = sr.ReadLine()) != null)
{
ss = line.Split(' ', ',', '-');
camra.Add(ss);
}
sr.Close();
}
//串口数据赋值给textbox
textBox1.Text = camra[1][0];
textBox2.Text = camra[1][1];
textBox3.Text = camra[1][2];
textBox4.Text = camra[1][3];
textBox5.Text = camra[1][4];
//相机数据赋值textbox
Lmax1.Text = camra[3][0];
Lmin1.Text = camra[3][1];
Wmax1.Text = camra[3][2];
Wmin1.Text = camra[3][3];
Area1.Text = camra[3][4];
bgsj1.Text = camra[3][5];
}