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.

174 lines
5.2 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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>
//系统运行状态;点击一键启动按钮和急停复位改1,点击一键停止和急停改0;1的状态下根据缓存区自动启动设备
/// </summary>
public string SystemStatus
{
get { return iniHelper.IniReadValue("system", "SystemStatus"); }
set { iniHelper.IniWriteValue("system", "SystemStatus", value); }
}
/// <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>
///2楼缓存区最小启动重量
/// </summary>
public string MinBufferWeight
{
get { return iniHelper.IniReadValue("system", "MinBufferWeight"); }
set { iniHelper.IniWriteValue("system", "MinBufferWeight", 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>
///3F投料生产模式默认手动1-手动模式2-自动模式
/// </summary>
public string ProductMode
{
get { return iniHelper.IniReadValue("system", "ProductMode"); }
set { iniHelper.IniWriteValue("system", "ProductMode", value); }
}
/// <summary>
///无计划时按照无计划订单处理MaterialId可修改
/// </summary>
public string MaterialId
{
get { return iniHelper.IniReadValue("system", "MaterialId"); }
set { iniHelper.IniWriteValue("system", "MaterialId", value); }
}
/// <summary>
///喷码机IP
/// </summary>
public string BarCodeMachineIP
{
get { return iniHelper.IniReadValue("system", "BarCodeMachineIP"); }
set { iniHelper.IniWriteValue("system", "BarCodeMachineIP", value); }
}
/// <summary>
///软件自动更新,当前版本号
/// </summary>
public string Version
{
get { return iniHelper.IniReadValue("system", "Version"); }
set { iniHelper.IniWriteValue("system", "Version", value); }
}
/// <summary>
///软件自动更新,当前程序名
/// </summary>
public string ProcessName
{
get { return iniHelper.IniReadValue("system", "ProcessName"); }
set { iniHelper.IniWriteValue("system", "ProcessName", value); }
}
/// <summary>
///参数配置界面密码
/// </summary>
public string ConfigInfoPassWprd
{
get { return iniHelper.IniReadValue("system", "ConfigInfoPassWprd"); }
set { iniHelper.IniWriteValue("system", "ConfigInfoPassWprd", value); }
}
}
}