using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
namespace SlnMesnac.Config
{
///
/// 系统配置
///
public sealed class DebugConfig
{
private static IniHelper iniHelper = new IniHelper(System.Environment.CurrentDirectory + "/config/App.InI");
private static readonly Lazy lazy = new Lazy(() => new DebugConfig());
public static DebugConfig Instance
{
get
{
return lazy.Value;
}
}
public DebugConfig()
{
}
///
///工位编号
///
public string ProductLine
{
get { return iniHelper.IniReadValue("system", "ProductLine"); }
set { iniHelper.IniWriteValue("system", "ProductLine", value); }
}
///
/// 海康扫码器--IP
///
public string ScannerIP
{
get { return iniHelper.IniReadValue("system", "ScannerIP"); }
set { iniHelper.IniWriteValue("system", "ScannerIP", value); }
}
///
/// 海康相机--IP
///
public string CameraIP
{
get { return iniHelper.IniReadValue("system", "CameraIP"); }
set { iniHelper.IniWriteValue("system", "CameraIP", value); }
}
///
/// 串口模块--IP
///
public string SerialIP
{
get { return iniHelper.IniReadValue("system", "SerialIP"); }
set { iniHelper.IniWriteValue("system", "SerialIP", value); }
}
///
/// 海康相机拍照存放路径
///
public string CameraFilePath
{
get { return iniHelper.IniReadValue("system", "CameraFilePath"); }
set { iniHelper.IniWriteValue("system", "CameraFilePath", value); }
}
///
/// 拍照延迟
///
public string SleepStr
{
get { return iniHelper.IniReadValue("system", "Sleep"); }
set { iniHelper.IniWriteValue("system", "Sleep", value); }
}
///
/// 读取照片延迟
///
public string PictureSleep
{
get { return iniHelper.IniReadValue("system", "PictureSleep"); }
set { iniHelper.IniWriteValue("system", "PictureSleep", value); }
}
///
/// 报警灯COM口
///
public string Port
{
get { return iniHelper.IniReadValue("system", "ComPort"); }
set { iniHelper.IniWriteValue("system", "ComPort", value); }
}
///
/// 灯光控制COM口
///
public string LightPort
{
get { return iniHelper.IniReadValue("system", "LightPort"); }
set { iniHelper.IniWriteValue("system", "LightPort", value); }
}
///
/// 灯光控制波特率
///
public string LightBaudRate
{
get { return iniHelper.IniReadValue("system", "LightBaudRate"); }
set { iniHelper.IniWriteValue("system", "LightBaudRate", value); }
}
///
/// ch1灯光亮度 0-255
///
public string Ch1
{
get { return iniHelper.IniReadValue("system", "Ch1"); }
set { iniHelper.IniWriteValue("system", "Ch1", value); }
}
///
/// ch2灯光亮度 0-255
///
public string Ch2
{
get { return iniHelper.IniReadValue("system", "Ch2"); }
set { iniHelper.IniWriteValue("system", "Ch2", value); }
}
///
/// 照片及日志保存时间
///
public string PictureSaveTime
{
get { return iniHelper.IniReadValue("system", "PictureSaveTime"); }
set { iniHelper.IniWriteValue("system", "PictureSaveTime", value); }
}
}
}