Пример #1
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            ConfSonOPCPumpDataService info = new ConfSonOPCPumpDataService();

            info.PointsSaveInterVal    = Convert.ToInt32(txt_PointsSaveInterVal.Value);
            info.PointsCollectInterVal = Convert.ToInt32(txt_PointsCollectInterVal.Value);
            info.DefaultGroupDeadband  = Convert.ToInt32(txt_DefaultGroupDeadband.Value);
            info.UpdateRate            = Convert.ToInt32(txt_UpdateRate.Value);
            info.ReadRate              = Convert.ToInt32(txt_ReadRate.Value);
            info.errorTimes            = Convert.ToInt32(txt_errorTimes.Value);
            info.okayTimes             = Convert.ToInt32(txt_okayTimes.Value);
            info.commandTimeoutSeconds = Convert.ToInt32(txt_commandTimeoutSeconds.Value);

            if (config.SubmitSonOPCPumpData(info, out string errMsg))
            {
                MessageBox.Show("提交 OPC二供接入服务 配置信息成功!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
                evtSubmit("OPC二供接入服务", EnvConfigInfo.Status.success);
            }
            else
            {
                MessageBox.Show("提交 OPC二供接入服务 配置信息失败," + errMsg, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                evtSubmit("OPC二供接入服务", EnvConfigInfo.Status.fail);
            }
        }
Пример #2
0
 public OPCPumpService(ConfSonOPCPumpDataService confSonOPC)
 {
     Config.pumpConfig = confSonOPC;
 }