25111701 参数批量通道保存

This commit is contained in:
moxiliang
2025-11-17 14:10:55 +08:00
parent 920ead4a18
commit 6958075f22
39 changed files with 887 additions and 497 deletions

View File

@@ -33,7 +33,7 @@ namespace SLC1_N
{
chk_ChkBee.Enabled = false;
bt_BtnKeep.Enabled = false;
bt_ParamSave.Enabled = false;
tb_FullTime.Enabled = false;
tb_BalanTime.Enabled = false;
tb_TestTime1.Enabled = false;
@@ -714,5 +714,37 @@ namespace SLC1_N
config.SetValue("tb_ContinueTestCount", Convert.ToInt32(tb_ContinueTestCount.Text));
}
// 批量保存参数
private void bt_BatchParamSave_Click(object sender, EventArgs e)
{
using (var dialog = new Form_BatchSave())
{
// 显示弹窗并等待用户操作
if (dialog.ShowDialog() == DialogResult.OK)
{
// 获取复选框状态
bool[] checkCHx = new bool[4];
checkCHx[0] = dialog.chk_CH1.Checked;
checkCHx[1] = dialog.chk_CH2.Checked;
checkCHx[2] = dialog.chk_CH3.Checked;
checkCHx[3] = dialog.chk_CH4.Checked;
string PorN = "P";
if (rbt_PpressureMode.Checked)
PorN = "P";
else if (rbt_NpressureMode.Checked)
PorN = "N";
for(int i = 0; i <= 3; i++ )
{
if(checkCHx[i])
{
SetParametersJson(Convert.ToInt32(i+1), cb_ParaNum.Text, PorN); // 通道-编号
}
}
}
}
}
}
}