|
|
|
@ -28,6 +28,7 @@ namespace MaterialTraceabilityUI
|
|
|
|
|
/// </summary>
|
|
|
|
|
private IniFileHelper inifile = new IniFileHelper(System.Environment.CurrentDirectory + "/MesConfig/App.InI");
|
|
|
|
|
private IniFileHelper inifile2 = new IniFileHelper(System.Environment.CurrentDirectory + "/App.InI");
|
|
|
|
|
private IniFileHelper plcIniFile = new IniFileHelper(System.Environment.CurrentDirectory + "/PlcConfig/App.InI");
|
|
|
|
|
private AppConfigDto appConfig = AppConfigDto.Instance;
|
|
|
|
|
private string iniSection = "";
|
|
|
|
|
|
|
|
|
@ -130,7 +131,7 @@ namespace MaterialTraceabilityUI
|
|
|
|
|
|
|
|
|
|
foreach(ParamValueDto item in plcParamValues)
|
|
|
|
|
{
|
|
|
|
|
inifile2.IniWriteValue(iniSection, item.paramName,item.paramValue);
|
|
|
|
|
plcIniFile.IniWriteValue(iniSection, item.paramName,item.paramValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MessageBox.Show("更新成功,重启生效");
|
|
|
|
@ -215,13 +216,13 @@ namespace MaterialTraceabilityUI
|
|
|
|
|
this.AppConfigParamMesWebServiceTimeOut.Text = inifile2.IniReadValue("SystemConfig", "MesWebServiceTimeOut");
|
|
|
|
|
|
|
|
|
|
//获取PLC配置
|
|
|
|
|
List<string> plcParamValues = inifile2.ReadKeys(iniSection);
|
|
|
|
|
List<string> plcParamValues = plcIniFile.ReadKeys(iniSection);
|
|
|
|
|
List<ParamValueDto> paramValues = new List<ParamValueDto>();
|
|
|
|
|
foreach(string item in plcParamValues)
|
|
|
|
|
{
|
|
|
|
|
ParamValueDto paramValueDto = new ParamValueDto();
|
|
|
|
|
paramValueDto.paramName = item;
|
|
|
|
|
paramValueDto.paramValue = inifile2.IniReadValue(iniSection, item);
|
|
|
|
|
paramValueDto.paramValue = plcIniFile.IniReadValue(iniSection, item);
|
|
|
|
|
paramValues.Add(paramValueDto);
|
|
|
|
|
}
|
|
|
|
|
this.PlcParamValue.ItemsSource = paramValues;
|
|
|
|
|