25111501 调整参数本地可保存小数;主界面显示测试参数
This commit is contained in:
@@ -392,15 +392,15 @@ namespace SLC1_N
|
||||
Form1.f1.GetYiqiParam(CH, PorN).delaytime1 = Convert.ToInt32(tb_DelayTime1.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).delaytime2 = Convert.ToInt32(tb_DelayTime2.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).relievedelay = Convert.ToInt32(tb_RelieveDelay.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).evolume = Convert.ToInt32(tb_Evolume.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).evolume = StringToFloat(tb_Evolume.Text);
|
||||
|
||||
Form1.f1.GetYiqiParam(CH, PorN).fptoplimit = Convert.ToInt32(tb_FPtoplimit.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).fplowlimit = Convert.ToInt32(tb_FPlowlimit.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).balanpremax = Convert.ToInt32(tb_BalanPreMax.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).balanpremin = Convert.ToInt32(tb_BalanPreMin.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).fptoplimit = StringToFloat(tb_FPtoplimit.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).fplowlimit = StringToFloat(tb_FPlowlimit.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).balanpremax = StringToFloat(tb_BalanPreMax.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).balanpremin = StringToFloat(tb_BalanPreMin.Text);
|
||||
|
||||
Form1.f1.GetYiqiParam(CH, PorN).leaktoplimit = Convert.ToInt32(tb_Leaktoplimit.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).leaklowlimit = Convert.ToInt32(tb_Leaklowlimit.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).leaktoplimit = StringToFloat(tb_Leaktoplimit.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).leaklowlimit = StringToFloat(tb_Leaklowlimit.Text);
|
||||
Form1.f1.GetYiqiParam(CH, PorN).punit = cb_PUnit.SelectedIndex;
|
||||
Form1.f1.GetYiqiParam(CH, PorN).lunit = cb_LUnit.SelectedIndex;
|
||||
|
||||
@@ -411,6 +411,11 @@ namespace SLC1_N
|
||||
//MessageBox.Show("仪器编号:" + CH + "保存" + i + "组参数成功!");
|
||||
}
|
||||
|
||||
private float StringToFloat(string value, float defaultValue = 0f)
|
||||
{
|
||||
return float.TryParse(value, out float result) ? result : defaultValue;
|
||||
}
|
||||
|
||||
// 读取本地参数记录
|
||||
private void ReadParametersJson(string CH, string i, string PorN)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user