using HighWayIot.Common; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HighWayIot.Config { public sealed class PlcConfig { private static IniHelper iniHelper = new IniHelper(System.Environment.CurrentDirectory + "/config/Plc.InI"); private static readonly Lazy lazy = new Lazy(() => new PlcConfig()); public static PlcConfig Instance { get { return lazy.Value; } } private StringChange stringChange = StringChange.Instance; private PlcConfig() { } /// /// 箱壳——出库货道号 /// public string out_shell_spaceCode { get { return iniHelper.IniReadValue("shell_outStore_address", "出库货道号"); } set { iniHelper.IniWriteValue("shell_outStore_address", "出库货道号", value); } } /// /// 箱壳——出库数量 /// public string out_shell_amount { get { return iniHelper.IniReadValue("shell_outStore_address", "出库数量"); } set { iniHelper.IniWriteValue("shell_outStore_address", "出库数量", value); } } /// /// 箱壳——出库任务号 /// public string out_shell_task { get { return iniHelper.IniReadValue("shell_outStore_address", "出库任务号"); } set { iniHelper.IniWriteValue("shell_outStore_address", "出库任务号", value); } } /// /// 内胆——出库货道号 /// public string out_liner_spaceCode { get { return iniHelper.IniReadValue("liner_outStore_address", "出库货道号"); } set { iniHelper.IniWriteValue("liner_outStore_address", "出库货道号", value); } } /// /// 内胆——出库数量 /// public string out_liner_amount { get { return iniHelper.IniReadValue("liner_outStore_address", "出库数量"); } set { iniHelper.IniWriteValue("liner_outStore_address", "出库数量", value); } } /// /// 内胆——出库任务号 /// public string out_liner_task { get { return iniHelper.IniReadValue("liner_outStore_address", "出库任务号"); } set { iniHelper.IniWriteValue("liner_outStore_address", "出库任务号", value); } } } }