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.
84 lines
2.3 KiB
C#
84 lines
2.3 KiB
C#
using Microsoft.Extensions.Options;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace SlnMesnac.Config
|
|
{
|
|
/// <summary>
|
|
/// 系统配置
|
|
/// </summary>
|
|
public sealed class DebugConfig
|
|
{
|
|
private static IniHelper iniHelper = new IniHelper(System.Environment.CurrentDirectory + "/config/App.InI");
|
|
|
|
|
|
private static readonly Lazy<DebugConfig> lazy = new Lazy<DebugConfig>(() => new DebugConfig());
|
|
public static DebugConfig Instance
|
|
{
|
|
get
|
|
{
|
|
return lazy.Value;
|
|
}
|
|
}
|
|
|
|
public DebugConfig()
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 海康扫码器--IP
|
|
/// </summary>
|
|
public string ScannerIP
|
|
{
|
|
get { return iniHelper.IniReadValue("system", "ScannerIP"); }
|
|
set { iniHelper.IniWriteValue("system", "ScannerIP", value); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 海康相机--IP
|
|
/// </summary>
|
|
public string CameraIP
|
|
{
|
|
get { return iniHelper.IniReadValue("system", "CameraIP"); }
|
|
set { iniHelper.IniWriteValue("system", "CameraIP", value); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 海康相机拍照存放路径
|
|
/// </summary>
|
|
public string CameraFilePath
|
|
{
|
|
get { return iniHelper.IniReadValue("system", "CameraFilePath"); }
|
|
set { iniHelper.IniWriteValue("system", "CameraFilePath", value); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 拍照延迟
|
|
/// </summary>
|
|
public string SleepStr
|
|
{
|
|
get { return iniHelper.IniReadValue("system", "Sleep"); }
|
|
set { iniHelper.IniWriteValue("system", "Sleep", value); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 读取照片延迟
|
|
/// </summary>
|
|
public string PictureSleep
|
|
{
|
|
get { return iniHelper.IniReadValue("system", "PictureSleep"); }
|
|
set { iniHelper.IniWriteValue("system", "PictureSleep", value); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Com口
|
|
/// </summary>
|
|
public string Port
|
|
{
|
|
get { return iniHelper.IniReadValue("system", "ComPort"); }
|
|
set { iniHelper.IniWriteValue("system", "ComPort", value); }
|
|
}
|
|
}
|
|
}
|