//保存历史计算引擎配置 private void bt_savehistorycalcu_Click(object sender, EventArgs e) { APPConfig.SaveConfig("/config", "historycalcu_period4RTD", APPConfig.historycalcu_period4RTD.ToString()); APPConfig.SaveConfig("/config", "historycalcu_period4PSL", APPConfig.historycalcu_period4PSL.ToString()); this.Close(); }
private void bt_save_Click(object sender, EventArgs e) { //"计算结果标签名自动生成“ if (this.rb_TagAuto.Checked) {//这里注意SaveConfig()接口,第一个参数要写xpaht,并且写到要更新节点的父节点。 APPConfig.SaveConfig("/config", "resulttagauto", "1"); APPConfig.rdbtable_resulttagauto = "1"; } else { APPConfig.SaveConfig("/config", "resulttagauto", "0"); APPConfig.rdbtable_resulttagauto = "0"; } //"计算结果标签名自动生成“ if (this.rb_IncludeIntervalType.Checked) {//这里注意SaveConfig()接口,第一个参数要写xpaht,并且写到要更新节点的父节点。 APPConfig.SaveConfig("/config", "resulttagincludeinterval", "1"); APPConfig.rdbtable_resulttagincludeinterval = "1"; } else { APPConfig.SaveConfig("/config", "resulttagincludeinterval", "0"); APPConfig.rdbtable_resulttagincludeinterval = "0"; } //“生成tag id映射表时,重新编id号 if (this.rb_TagAuto.Checked) { APPConfig.SaveConfig("/config", "tag2idalwaysreset", "1"); APPConfig.rdbtable_tag2idalwaysreset = "1"; } else { APPConfig.SaveConfig("/config", "tag2idalwaysreset", "0"); APPConfig.rdbtable_tag2idalwaysreset = "0"; } //“初始化时包含psldata表” if (this.cbIniTableIncludePSLData.Checked) { APPConfig.SaveConfig("/config", "rdbtable_iniTableIncludePsldata", "1"); APPConfig.rdbtable_tag2idalwaysreset = "1"; } else { APPConfig.SaveConfig("/config", "rdbtable_iniTableIncludePsldata", "0"); APPConfig.rdbtable_tag2idalwaysreset = "0"; } //psldata时间 APPConfig.psldata_startyear = int.Parse(this.tbStartYear.Text); APPConfig.SaveConfig("/config", "startyear", int.Parse(this.tbStartYear.Text).ToString()); APPConfig.psldata_endyear = int.Parse(this.tbEndYear.Text); APPConfig.SaveConfig("/config", "endyear", int.Parse(this.tbEndYear.Text).ToString()); this.Close(); }
//保存实时计算引擎配置 private void btSaveCalcu_Click(object sender, EventArgs e) { //是否自动计算 if (this.cbAutoRun.Checked) { APPConfig.realcalcu_autorun = "1"; APPConfig.SaveConfig("/config", "autorun", "1"); } else { APPConfig.realcalcu_autorun = "0"; APPConfig.SaveConfig("/config", "autorun", "0"); } //计算扫描周期 if (this.tb_CalcuPeriod.Text != "") { APPConfig.SaveConfig("/config", "period", this.tb_CalcuPeriod.Text); APPConfig.realcalcu_period = int.Parse(this.tb_CalcuPeriod.Text); } //保存计算配置对象信息周期 if (this.tb_WritePeriod.Text != "") { APPConfig.SaveConfig("/config", "periodwritepslcalcuitem", this.tb_WritePeriod.Text); APPConfig.realcalcu_periodwritepslcalcuitem = int.Parse(this.tb_WritePeriod.Text); } //统计计算模件用时 if (this.cbCalcuTime.Checked) { APPConfig.realcalcu_recordcalcutime = "1"; APPConfig.SaveConfig("/config", "recordcalcutime", "1"); } else { APPConfig.realcalcu_recordcalcutime = "0"; APPConfig.SaveConfig("/config", "recordcalcutime", "0"); } if (this.tb_saveNumber.Text != "") { APPConfig.realcalcu_recordsavenumber = int.Parse(this.tb_saveNumber.Text); APPConfig.SaveConfig("/config", "recordsavenumber", this.tb_saveNumber.Text); } //单次读取实时数据记录最大数量 //该参数不允许在界面配置。 this.Close(); }