using HighWayIot.Common; using System; namespace HighWayIot.Config { public sealed class AppConfig { private static IniHelper iniHelper = new IniHelper(System.Environment.CurrentDirectory + "/config/App.InI"); private static readonly Lazy lazy = new Lazy(() => new AppConfig()); public static AppConfig Instance { get { return lazy.Value; } } private AppConfig() { stationName = "箱壳内胆组装"; } public string mesConnStr { get { return iniHelper.IniReadValue("system", "mesConnStr"); } set { iniHelper.IniWriteValue("system", "mesConnStr", value); } } public string scadaConnStr { get { return iniHelper.IniReadValue("system", "scadaConnStr"); } set { iniHelper.IniWriteValue("system", "scadaConnStr", value); } } /// /// 工位编号 /// public string stationCode { get { return iniHelper.IniReadValue("system", "stationCode"); } set { iniHelper.IniWriteValue("system", "stationCode", value); } } /// /// 工位名称 /// public string stationName { get { return iniHelper.IniReadValue("system", "stationName"); } //get { return "箱壳内胆组装"; } set { iniHelper.IniWriteValue("system", "stationName", value); } } /// /// 箱壳库编号 /// public string shellStoreCode { get { return iniHelper.IniReadValue("system", "shellStoreCode"); } set { iniHelper.IniWriteValue("system", "shellStoreCode", value); } } /// /// 内胆库编号 /// public string linerStoreCode { get { return iniHelper.IniReadValue("system", "linerStoreCode"); } set { iniHelper.IniWriteValue("system", "linerStoreCode", value); } } /// /// 箱壳物料类型编号 /// public string shellMaterialType { get { return iniHelper.IniReadValue("system", "shellMaterialType"); } set { iniHelper.IniWriteValue("system", "shellMaterialType", value); } } /// /// 内胆物料类型编号 /// public string linerMaterialType { get { return iniHelper.IniReadValue("system", "linerMaterialType"); } set { iniHelper.IniWriteValue("system", "linerMaterialType", value); } } /// /// 入库任务类型编号 /// public int instoreTaskType { get { return Convert.ToInt32(iniHelper.IniReadValue("system", "instoreTaskType")); } set { iniHelper.IniWriteValue("system", "instoreTaskType", value.ToString()); } } /// /// 出库任务类型编号 /// public int outstoreTaskType { get { return Convert.ToInt32(iniHelper.IniReadValue("system", "outstoreTaskType")); } set { iniHelper.IniWriteValue("system", "outstoreTaskType", value.ToString()); } } /// /// 箱壳扫码器IP /// public string shellHikRobotIp { get { return iniHelper.IniReadValue("system", "shellHikRobotIp"); } set { iniHelper.IniWriteValue("system", "shellHikRobotIp", value); } } /// /// 内胆扫码器IP /// public string linerHikRobotIp { get { return iniHelper.IniReadValue("system", "linerHikRobotIp"); } set { iniHelper.IniWriteValue("system", "linerHikRobotIp", value); } } public string searchItems { get { return iniHelper.IniReadValue("system", "searchItems"); } set { iniHelper.IniWriteValue("system", "searchItems", value); } } } }