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.

106 lines
3.0 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>
///缓存区重量
/// </summary>
public string BufferWeight
{
get { return iniHelper.IniReadValue("system", "BufferWeight"); }
set { iniHelper.IniWriteValue("system", "BufferWeight", value); }
}
/// <summary>
///2楼缓存区最大停机重量
/// </summary>
public string MaxBufferWeight
{
get { return iniHelper.IniReadValue("system", "MaxBufferWeight"); }
set { iniHelper.IniWriteValue("system", "MaxBufferWeight", value); }
}
/// <summary>
///系统当前使用配方模版
/// </summary>
public string RecipeName
{
get { return iniHelper.IniReadValue("system", "RecipeName"); }
set { iniHelper.IniWriteValue("system", "RecipeName", value); }
}
/// <summary>
///配方运行模式
/// </summary>
public string RecipeMode
{
get { return iniHelper.IniReadValue("system", "RecipeMode"); }
set { iniHelper.IniWriteValue("system", "RecipeMode", value); }
}
/// <summary>
///拆包机螺旋--烘干机螺旋切换间隔(单位:ms)
/// </summary>
public string UnpackToHotTime
{
get { return iniHelper.IniReadValue("system", "UnpackToHotTime"); }
set { iniHelper.IniWriteValue("system", "UnpackToHotTime", value); }
}
/// <summary>
///烘干机螺旋--螺旋1切换间隔(单位:ms)
/// </summary>
public string HotToSpiralTime
{
get { return iniHelper.IniReadValue("system", "HotToSpiralTime"); }
set { iniHelper.IniWriteValue("system", "HotToSpiralTime", value); }
}
/// <summary>
///#螺旋1--螺旋2切换间隔(单位:ms)
/// </summary>
public string SpiralTwoTime
{
get { return iniHelper.IniReadValue("system", "SpiralTwoTime"); }
set { iniHelper.IniWriteValue("system", "SpiralTwoTime", value); }
}
/// <summary>
///喷码机IP
/// </summary>
public string BarCodeMachineIP
{
get { return iniHelper.IniReadValue("system", "BarCodeMachineIP"); }
set { iniHelper.IniWriteValue("system", "BarCodeMachineIP", value); }
}
}
}