From d9894fc2e45d2521c78ad4c11dd9b549ec4f75ca Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期三, 23 十二月 2020 12:05:07 +0800 Subject: [PATCH] 2020-12-23-1 --- HDL_ON/UI/UI2/3-Intelligence/Automation/InterfaceDsplaysLogic.cs | 94 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 94 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InterfaceDsplaysLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InterfaceDsplaysLogic.cs index e2bd4b6..2950c36 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InterfaceDsplaysLogic.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InterfaceDsplaysLogic.cs @@ -165,5 +165,99 @@ catch { } return name; } + /// <summary> + /// 鏄熸湡int鍜宻tring浜掔浉杞崲鍊肩殑鏂规硶 + /// </summary> + /// <param name="list"></param> + /// <param name="str_or_int"></param> + /// <returns></returns> + public static List<string> GetWeekString(List<string> list, string str_or_int) + { + string weekTextName = ""; + List<string> stateList = new List<string>(); + for (int i = 0; i < list.Count; i++) + { + var s = list[i]; + if (str_or_int == "int") + { + switch (s) + { + case "1": + { + weekTextName = Language.StringByID(StringId.monday); + } + break; + case "2": + { + weekTextName = Language.StringByID(StringId.tuesday); + } + break; + case "3": + { + weekTextName = Language.StringByID(StringId.wednesday); + } + break; + case "4": + { + weekTextName = Language.StringByID(StringId.thursday); + } + break; + case "5": + { + weekTextName = Language.StringByID(StringId.friday); + } + break; + case "6": + { + weekTextName = Language.StringByID(StringId.saturday); + } + break; + case "0": + { + weekTextName = Language.StringByID(StringId.sunday); + } + break; + } + + } + else + { + if (Language.StringByID(StringId.monday) == s) + { + weekTextName = "1"; + } + else if (Language.StringByID(StringId.tuesday) == s) + { + weekTextName = "2"; + } + else if (Language.StringByID(StringId.wednesday) == s) + { + weekTextName = "3"; + } + else if (Language.StringByID(StringId.thursday) == s) + { + weekTextName = "4"; + } + else if (Language.StringByID(StringId.friday) == s) + { + weekTextName = "5"; + } + else if (Language.StringByID(StringId.saturday) == s) + { + weekTextName = "6"; + } + else if (Language.StringByID(StringId.sunday) == s) + { + weekTextName = "0"; + } + } + stateList.Add(weekTextName); + + } + + return stateList; + } + + } } -- Gitblit v1.8.0