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.
51 lines
1.8 KiB
C#
51 lines
1.8 KiB
C#
using MaterialTraceability.Common;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MaterialTraceability.Entity.DTO
|
|
{
|
|
public sealed class AppConfigDto
|
|
{
|
|
private static INIFile iNIFile = new INIFile(System.Environment.CurrentDirectory + "/App.InI");
|
|
|
|
private static readonly Lazy<AppConfigDto> lazy = new Lazy<AppConfigDto>(() => new AppConfigDto());
|
|
|
|
public static AppConfigDto Instance
|
|
{
|
|
get
|
|
{
|
|
return lazy.Value;
|
|
}
|
|
}
|
|
|
|
private AppConfigDto() { }
|
|
|
|
public int readTime = StringChange.ParseToInt(iNIFile.IniReadValue("SystemConfig", "readTime"));
|
|
|
|
public int machineId = StringChange.ParseToInt(iNIFile.IniReadValue("SystemConfig", "machineId"));
|
|
|
|
public string processId = iNIFile.IniReadValue("SystemConfig", "processId");
|
|
|
|
public string resource = iNIFile.IniReadValue("SystemConfig", "resource");
|
|
|
|
public int plcSingalReadTime = StringChange.ParseToInt(iNIFile.IniReadValue("SystemConfig", "plcSingalReadTime"));
|
|
|
|
public string plcAddress = iNIFile.IniReadValue("SystemConfig", "plcAddress");
|
|
|
|
public int plcPort = StringChange.ParseToInt(iNIFile.IniReadValue("SystemConfig", "plcPort"));
|
|
|
|
public int isMesFlag = StringChange.ParseToInt(iNIFile.IniReadValue("SystemConfig", "isMesFlag"));
|
|
|
|
public string operation = iNIFile.IniReadValue("SystemConfig", "operation");
|
|
|
|
public string operationByA = iNIFile.IniReadValue("SystemConfig", "operationByA");
|
|
|
|
public string operationByB = iNIFile.IniReadValue("SystemConfig", "operationByB");
|
|
|
|
public string MesWebServiceTimeOut = iNIFile.IniReadValue("SystemConfig", "MesWebServiceTimeOut");
|
|
}
|
|
}
|