diff --git a/MaterialTraceability.Entity/Config/LyAddress.cs b/MaterialTraceability.Entity/Config/LyAddress.cs index f1d6f78..acce8af 100644 --- a/MaterialTraceability.Entity/Config/LyAddress.cs +++ b/MaterialTraceability.Entity/Config/LyAddress.cs @@ -9,8 +9,7 @@ namespace MaterialTraceability.Entity.Config { public sealed class LyAddress { - private static INIFile iNIFile = new INIFile(System.Environment.CurrentDirectory + "/App.InI"); - + private static INIFile iNIFile = new INIFile(System.Environment.CurrentDirectory + "/PlcConfig/App.InI"); private static readonly Lazy lazy = new Lazy(() => new LyAddress()); public static LyAddress Instance diff --git a/MaterialTraceability.Entity/Config/MqAddress.cs b/MaterialTraceability.Entity/Config/MqAddress.cs index beeea8f..aa3df81 100644 --- a/MaterialTraceability.Entity/Config/MqAddress.cs +++ b/MaterialTraceability.Entity/Config/MqAddress.cs @@ -9,7 +9,7 @@ namespace MaterialTraceability.Entity.Config { public sealed class MqAddress { - private static INIFile iNIFile = new INIFile(System.Environment.CurrentDirectory + "/App.InI"); + private static INIFile iNIFile = new INIFile(System.Environment.CurrentDirectory + "/PlcConfig/App.InI"); private static readonly Lazy lazy = new Lazy(() => new MqAddress()); diff --git a/MaterialTraceability.Entity/Config/TbAddress.cs b/MaterialTraceability.Entity/Config/TbAddress.cs index 63c6479..42629e2 100644 --- a/MaterialTraceability.Entity/Config/TbAddress.cs +++ b/MaterialTraceability.Entity/Config/TbAddress.cs @@ -10,7 +10,7 @@ namespace MaterialTraceability.Entity.Config { public sealed class TbAddress { - private static INIFile iNIFile = new INIFile(System.Environment.CurrentDirectory + "/App.InI"); + private static INIFile iNIFile = new INIFile(System.Environment.CurrentDirectory + "/PlcConfig/App.InI"); private static readonly Lazy lazy = new Lazy(() => new TbAddress()); diff --git a/MaterialTraceabilityUI/ConfigInfo.xaml.cs b/MaterialTraceabilityUI/ConfigInfo.xaml.cs index f9136bd..0d76ffa 100644 --- a/MaterialTraceabilityUI/ConfigInfo.xaml.cs +++ b/MaterialTraceabilityUI/ConfigInfo.xaml.cs @@ -28,6 +28,7 @@ namespace MaterialTraceabilityUI /// 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 plcParamValues = inifile2.ReadKeys(iniSection); + List plcParamValues = plcIniFile.ReadKeys(iniSection); List paramValues = new List(); 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; diff --git a/MaterialTraceabilityUI/MainWindow.xaml.cs b/MaterialTraceabilityUI/MainWindow.xaml.cs index f6a0d39..76f281c 100644 --- a/MaterialTraceabilityUI/MainWindow.xaml.cs +++ b/MaterialTraceabilityUI/MainWindow.xaml.cs @@ -8,7 +8,9 @@ using MaterialTraceability.SqlSugar.ServiceImpl; using MaterialTraceabilityUI.Common; using SqlSugar; using System; +using System.Collections.Generic; using System.ComponentModel; +using System.Configuration; using System.Data; using System.Drawing; using System.Linq.Expressions; @@ -50,8 +52,6 @@ namespace MaterialTraceabilityUI try { InitializeComponent(); - - // AutoUpdater.Start("ftp://172.21.29.56/update.xml",new System.Net.NetworkCredential("admin-60073571", "Bhl06130308$")); AutoUpdater.Start("file://172.21.19.24/temp每天凌晨2点清理/临时文件/BHL/RFID物料追溯系统-现场更新/溧阳五程序/update.xml"); LogHelperBusiness.LogInfo("版本获取地址:file://172.21.19.24/temp每天凌晨2点清理/临时文件/BHL/RFID物料追溯系统-现场更新/溧阳五程序/update.xml"); string info = Assembly.GetExecutingAssembly().GetName().Version.ToString(); @@ -386,15 +386,5 @@ namespace MaterialTraceabilityUI { AutoUpdater.Start("file://172.21.19.24/temp每天凌晨2点清理/临时文件/BHL/RFID物料追溯系统-现场更新/溧阳五程序/update.xml"); } - - /// - /// 工单设置 - /// - /// - /// - private void orderSet_Click(object sender, RoutedEventArgs e) - { - - } } }