You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.1 KiB
C#
75 lines
2.1 KiB
C#
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 AppConfig
|
|
{
|
|
|
|
private static IniHelper iniHelper = new IniHelper(System.Environment.CurrentDirectory + "/config/App.InI");
|
|
|
|
|
|
private static readonly Lazy<AppConfig> lazy = new Lazy<AppConfig>(() => new AppConfig());
|
|
public static AppConfig Instance
|
|
{
|
|
get
|
|
{
|
|
return lazy.Value;
|
|
}
|
|
}
|
|
|
|
|
|
private AppConfig()
|
|
{
|
|
mesConnStr = "Data Source=175.27.215.92/helowin;User ID=aucma_mes;Password=aucma";
|
|
|
|
scadaConnStr = "Data Source=175.27.215.92/helowin;User ID=aucma_scada;Password=aucma";
|
|
|
|
shellStoreCode = "X-001";
|
|
}
|
|
|
|
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); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 工位编号
|
|
/// </summary>
|
|
public string stationCode
|
|
{
|
|
get { return iniHelper.IniReadValue("system", "stationCode"); }
|
|
set { iniHelper.IniWriteValue("system", "stationCode", value); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 箱壳库编号
|
|
/// </summary>
|
|
public string shellStoreCode
|
|
{
|
|
get { return iniHelper.IniReadValue("system", "shellStoreCode"); }
|
|
set { iniHelper.IniWriteValue("system", "shellStoreCode", value); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 内胆库编号
|
|
/// </summary>
|
|
public string linerStoreCode
|
|
{
|
|
get { return iniHelper.IniReadValue("system", "linerStoreCode"); }
|
|
set { iniHelper.IniWriteValue("system", "linerStoreCode", value); }
|
|
}
|
|
}
|
|
}
|