63 lines
2.3 KiB
C#
63 lines
2.3 KiB
C#
using AllBase;
|
|
using AllBase.DouYinModel.Param.ConfigManage;
|
|
using AllBase.Helper;
|
|
using _29WxOrder.OrderForms;
|
|
using NaiBa.Util;
|
|
using NaiBa.Util.Helper;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace _29WxOrder
|
|
{
|
|
public class StartUp
|
|
{
|
|
public static void Init()
|
|
{
|
|
//GlobalConfig.IsShowSpecialBuyer = System.IO.File.Exists("locales\\pf.pak") || System.IO.File.Exists("pf.txt");
|
|
|
|
// 读取系统设置信息
|
|
GlobalConfig.SystemSettings = ConfigHelper.LoadConfig<SystemSettings>("system_settings");
|
|
if (GlobalConfig.SystemSettings == null)
|
|
GlobalConfig.SystemSettings = new SystemSettings();
|
|
// 拼多多批发、多买手等特殊功能不可见时,功能关闭
|
|
if (!BaseClass.IsCloudBuyOrder)
|
|
{
|
|
GlobalConfig.SystemSettings.IsUsePddPifa = false;
|
|
GlobalConfig.SystemSettings.IsUseMultiBuyer = false;
|
|
}
|
|
|
|
GlobalConfig.dicLocalStorage = ConfigHelper.LoadConfig<System.Dynamic.ExpandoObject>("dou_local_Storage");
|
|
|
|
GlobalConfig.dicDgvHeadersSetting = ConfigHelper.LoadConfig<Dictionary<string, List<string>>>("dgv_headers_settings");
|
|
if (GlobalConfig.dicDgvHeadersSetting == null)
|
|
GlobalConfig.dicDgvHeadersSetting = new Dictionary<string, List<string>>();
|
|
|
|
if (BaseClass.IsCloudBuyOrder)
|
|
GlobalConfig.LstPddPifaShop = ConfigHelper.LoadConfig<List<AllBase.Model.PddPifaShopInfo>>("pdd_shops");
|
|
if (GlobalConfig.LstPddPifaShop == null)
|
|
GlobalConfig.LstPddPifaShop = new List<AllBase.Model.PddPifaShopInfo>();
|
|
|
|
|
|
TransitAddressForm.TransitAddress = ConfigHelper.LoadConfig<TransitAddressInfo>("transit_address");
|
|
}
|
|
|
|
public static void SaveSystemSettings()
|
|
{
|
|
ConfigHelper.SaveConfig("system_settings", GlobalConfig.SystemSettings);
|
|
}
|
|
|
|
public static void SaveDgvHeadersSettings()
|
|
{
|
|
ConfigHelper.SaveConfig("dgv_headers_settings", GlobalConfig.dicDgvHeadersSetting);
|
|
}
|
|
|
|
public static void SavePddShops()
|
|
{
|
|
ConfigHelper.SaveConfig("pdd_shops", GlobalConfig.LstPddPifaShop);
|
|
}
|
|
}
|
|
}
|