From 70be1c0029d72bcdddedf69aec9ae3c5a78615d2 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 22 十二月 2020 17:15:05 +0800
Subject: [PATCH] 2020-12-22-5

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs |   99 ++-----------------------------------------------
 1 files changed, 4 insertions(+), 95 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
index 268dd0f..7bebd3c 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -103,7 +103,7 @@
             LogicView.LogicTypeTitleView cyclicTitle = new LogicView.LogicTypeTitleView();
             cyclicTitle.frameLayout.Height = Application.GetRealHeight(50);
             cyclicTitle.frameLayout.Radius = (uint)Application.GetRealHeight(12);
-            cyclicTitle.btnText.Text = MainView.GetWeekText(Logic.currlogic);
+            cyclicTitle.btnText.Text = MainView.GetCyclicText(Logic.currlogic);
             viewLayout.AddChidren(cyclicTitle.FLayoutView());
 
             #endregion
@@ -477,7 +477,7 @@
             weekStateList.Clear();
             if (Logic.currlogic.cycle.type == "week")
             {
-                var list = GetWeekString(Logic.currlogic.cycle.value, "int");
+                var list = InterfaceDsplaysLogic.GetWeekString(Logic.currlogic.cycle.value, "int");
                 //鍔犺浇涔嬪墠淇濆瓨鐨勬暟鎹�
                 weekStateList.AddRange(list);
             }
@@ -485,7 +485,7 @@
             weekView.MultiSelectShow(fLayout, weekStr, Language.StringByID(StringId.cyclic), weekStateList
                , (list) =>
                {
-                   var statelist = GetWeekString(list, "str");
+                   var statelist = InterfaceDsplaysLogic.GetWeekString(list, "str");
                    Logic.currlogic.cycle.type = "week";
                    Logic.currlogic.cycle.value = statelist;
                    button.Text = MainView.GetWeekString(statelist);
@@ -541,98 +541,7 @@
 
 
         }
-        /// <summary>
-        /// 鏄熸湡鍛ㄦ湡杞崲鍊肩殑鏂规硶
-        /// </summary>
-        /// <param name="list"></param>
-        /// <param name="str_or_int"></param>
-        /// <returns></returns>
-        public 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