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.

64 lines
1.4 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 System;
using System.Collections.Generic;
namespace PrintBarCode.Helper
{
/// <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 PrintName
{
get { return iniHelper.IniReadValue("system", "PrintName"); }
set { iniHelper.IniWriteValue("system", "PrintName", value); }
}
/// <summary>
//所在电脑IP
/// </summary>
public string IP
{
get { return iniHelper.IniReadValue("system", "IP"); }
set { iniHelper.IniWriteValue("system", "IP", value); }
}
/// <summary>
//是否打印空白页,1打印0不打印
/// </summary>
public string BlankFlag
{
get { return iniHelper.IniReadValue("system", "BlankFlag"); }
set { iniHelper.IniWriteValue("system", "BlankFlag", value); }
}
}
}