using System; using System.Configuration; namespace iWareCommon.Utils { /// /// web.config操作类 /// Copyright (C) TBEA.WMS /// public sealed class WCSConfigHelper { /// /// 获取当前程序配置的 是否启用新入库口 /// /// public static bool GetConfig_IsEnableNewInStorePlace() { return ConfigHelper.GetConfigBool("IsEnableNewInStorePlace"); } /// /// 获取当前程序配置的 是否模拟PLC /// /// public static bool GetConfig_IsSimulationPLC() { return ConfigHelper.GetConfigBool("IsSimulationPLC"); //*/ //return false;//!!!!!注意:这里一定是FALSE!!!!! } /// /// 获取当前程序配置的 是否是随机寻找库位,默认是false /// /// true:随机寻找库位,false:不随机寻找库位 public static bool GetConfig_IsRandomFindPlace() { var isRandomFindPlace = System.Configuration.ConfigurationManager.AppSettings["IsRandomFindPlace"]; if (string.IsNullOrEmpty(isRandomFindPlace)) { return false; } return Convert.ToBoolean(isRandomFindPlace); } } }