using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ProjectBase.Util { /// /// 系统环境 /// public static class SysEnvironment { #region 系统级属性 /// /// 当前登录人ID /// public static string CurrentLoginID { get; set; } /// /// 当前登录人名字 /// public static string CurrentLoginName { get; set; } /// /// 当前登录人所属公司ID /// public static string CurrentLoginGroupId { get; set; } /// /// 密码(MD5)加密后 /// public static string passWordMD5 { get; set; } /// /// Opc数据点频道名称前缀 /// public static string OpcDataChannel = "OpcDataChannel"; /// /// Opc 连接PLC状态值 /// public static string PlcStatusChannel = "PlcStatusChannel"; /// /// OPC连接的PLC的状态的当前值 /// public static string PlcStatusCurrent = "PlcStatusCurrent_"; /// /// 车辆移动到位置,开始执行测试用例 /// public static string Start = "Start"; /// /// 当前使用的规则名称 /// public static string CurrentRuleName; /// /// Opc服务器连接状态 /// public static List> OpcServerStatus { get { List> status = new List>(); status.Add(new KeyValuePair(1, "未连接")); status.Add(new KeyValuePair(2, "已连接")); status.Add(new KeyValuePair(3, "已断开")); return status; } set { OpcServerStatus = value; } } /// /// 系统参数的参数类型 /// public static List> dirSysParameterType { get { List> type = new List>(); type.Add(new KeyValuePair(0, "任何值")); type.Add(new KeyValuePair(1, "数值")); type.Add(new KeyValuePair(2, "整型")); type.Add(new KeyValuePair(3, "时间")); type.Add(new KeyValuePair(4, "日期")); return type; } set { dirSysParameterType = value; } } /// /// 系统参数的数据 /// public static List> dirSysParameterData { get { List> data = new List>(); data.Add(new KeyValuePair(1, "介于")); data.Add(new KeyValuePair(2, "未介于")); data.Add(new KeyValuePair(3, "等于")); data.Add(new KeyValuePair(4, "不等于")); data.Add(new KeyValuePair(5, "大于")); data.Add(new KeyValuePair(6, "大于等于")); data.Add(new KeyValuePair(7, "小于")); data.Add(new KeyValuePair(8, "小于等于")); return data; } set { dirSysParameterData = value; } } /// /// winform窗体类型 /// public static List> dirWinformType { get { List> type = new List>(); type.Add(new KeyValuePair("1", "一级")); type.Add(new KeyValuePair("2", "二级")); type.Add(new KeyValuePair("3", "三级")); return type; } set { dirWinformType = value; } } /// /// PLC连接类型 /// public static List> dirPlcLinkType { get { List> type = new List>(); type.Add(new KeyValuePair("1", "OPCDA")); type.Add(new KeyValuePair("2", "TCP服务端")); type.Add(new KeyValuePair("3", "TCP客户端")); type.Add(new KeyValuePair("4", "Modelbus")); type.Add(new KeyValuePair("5", "串口")); type.Add(new KeyValuePair("6", "MX-Compoment")); return type; } set { dirPlcLinkType = value; } } /// /// 数据组类型 /// public static List> dirDataGroupType { get { List> type = new List>(); type.Add(new KeyValuePair(1, "数据")); type.Add(new KeyValuePair(2, "信号")); return type; } set { dirDataGroupType = value; } } /// /// 类型 /// public static List> dirType { get { List> type = new List>(); type.Add(new KeyValuePair(1, "Bool")); type.Add(new KeyValuePair(2, "Short")); type.Add(new KeyValuePair(3, "UShort")); type.Add(new KeyValuePair(4, "Long")); type.Add(new KeyValuePair(5, "ULong")); type.Add(new KeyValuePair(6, "Double")); type.Add(new KeyValuePair(7, "String")); return type; } set { dirType = value; } } /// /// 是否为查询条件 /// public static List> dirRuleValueQuery { get { List> query = new List>(); query.Add(new KeyValuePair("是", "是")); query.Add(new KeyValuePair("否", "否")); return query; } set { dirRuleValueQuery = value; } } /// /// 本机IP地址 /// public static string Ip { get; set; } /// /// 本机Mac地址 /// public static string Mac { get; set; } #endregion } }