天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
689 B

3 years ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace QMAPP.WinForm
{
public static class GlobalConfig
{
public const string UpdateFileName = "自动更新设置.ini";
public static T GetConfigValues<T>(string filename) where T : new()
{
T t = new T();
if (FileHelper.Exists(filename))
{
t = JsonHelper.ReadConfigFromFile<T>(filename);
}
else
{
throw new Exception($"配置文件{filename}丢失,请重新配置");
}
return t;
}
}
}