From cc48110a814477bc0d01615f9844aea6ff2b609f Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 28 四月 2021 14:51:38 +0800
Subject: [PATCH] Merge branch 'WJC' into wxr4

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs |   74 +++++++++++-------------------------
 1 files changed, 23 insertions(+), 51 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
index 757f209..f8b2ea0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -129,8 +129,8 @@
             notification.btnText.TextID = StringId.notification;
             notification.btnLine.BackgroundColor = CSS.CSS_Color.textWhiteColor;
             viewLayout.AddChidren(notification.FLayoutView());
-           
-            if (Logic.currlogic.pushConfigs.Count > 0)
+            //鏄剧ず涔嬪墠鎺ㄩ�佸紑鍏崇姸鎬�
+            if (Logic.currlogic.noticeConfig.enable)
             {
                 push.btnNextIcon.IsSelected = true;
             }
@@ -141,7 +141,7 @@
             ///涓婁笅闂撮殧62鍍忕礌
             viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) });
             #endregion
-           
+
             #region  淇濆瓨
             ///淇濆瓨View
             LogicView.SaveView saveView = new LogicView.SaveView();
@@ -188,47 +188,25 @@
                 DateMethod(cyclicTitle.btnText);
             };
             ///鏄惁瑕佹帹閫佺偣鍑讳簨浠�
-            //鍒濆鍖栧璞�
-            PushConfigs pushConfigs = new PushConfigs();
-            if (Logic.currlogic.pushConfigs.Count > 0)
-            {
-                pushConfigs = Logic.currlogic.pushConfigs[0];
-            }
-            else
-            {
-                if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo))
-                {
-                    //榛樿鎺ㄩ�佸綋鍓嶈处鍙�
-                    pushConfigs.pushTarget.Add(UserInfo.Current.userMobileInfo);
-                }
-                else
-                {
-                    //榛樿鎺ㄩ�佸綋鍓嶈处鍙�
-                    pushConfigs.pushTarget.Add(UserInfo.Current.userEmailInfo);
-                }
-            }
             push.btnNextIcon.MouseUpEventHandler += (sender, e) =>
             {
-               push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected;
+                //璐﹀彿鍒楄〃涓虹┖榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+                if (Logic.currlogic.pushConfigs.Count == 0)
+                {
+                    //鍒濆鍖栧璞�
+                    PushConfigs pushConfigs = new PushConfigs();
+                    //榛樿娣诲姞鎺ㄩ�佸綋鍓嶈处鍙�
+                    pushConfigs.pushTarget.Add(UserInfo.Current.ID);
+                    Logic.currlogic.pushConfigs.Add(pushConfigs);
+                }
+                push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected;
                 if (push.btnNextIcon.IsSelected)
                 {
-                    if (Logic.currlogic.pushConfigs.Count > 0)
-                    {
-                        //娓呯┖涔嬪墠鏃ч厤缃暟鎹�
-                        Logic.currlogic.pushConfigs.Clear();
-                    }
-                    //澧炲姞閰嶇疆鏁版嵁
-                    Logic.currlogic.pushConfigs.Add(pushConfigs);
+                    Logic.currlogic.noticeConfig.enable = true;
                 }
                 else
                 {
-                    if (Logic.currlogic.pushConfigs.Count > 0)
-                    {
-                        //榛樿鍙栫涓�涓祴鍊�
-                        pushConfigs = Logic.currlogic.pushConfigs[0];
-                        //娓呯┖閰嶇疆鏁版嵁
-                        Logic.currlogic.pushConfigs.Clear();
-                    }
+                    Logic.currlogic.noticeConfig.enable = false;
                 }
             };
             ///杈撳叆鎺ㄩ�佹枃鏈�
@@ -236,18 +214,13 @@
             {
                 InputPushText inputPushText = new InputPushText();
                 MainPage.BasePageView.AddChidren(inputPushText);
-                inputPushText.Show(pushConfigs);
+                inputPushText.Show();
                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-                inputPushText.action += (pushConfigsIfon) =>
-                {
-                    //璧嬪��
-                    pushConfigs = pushConfigsIfon;
-                };
             };
             ///淇濆瓨鐐瑰嚮浜嬩欢
             saveView.btnClick.MouseUpEventHandler += (sender, e) =>
             {
-                if (Logic.currlogic.input.Count == 0&& Logic.currlogic.output.Count == 0)
+                if (Logic.currlogic.input.Count == 0 && Logic.currlogic.output.Count == 0)
                 {
                     new LogicView.TipPopView().TipBox(StringId.tip, StringId.conditioncNullOrtargetNull);
                     return;
@@ -272,7 +245,7 @@
                     {
                         list.Add(logic.name);
                     }
-                    new LogicView.TipPopView().InputBox(StringId.editName, InpOrOutLogicMethod.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName,view
+                    new LogicView.TipPopView().InputBox(StringId.editName, InpOrOutLogicMethod.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName, view
                         ) =>
                     {
                         Logic.currlogic.name = logicName;
@@ -336,7 +309,7 @@
                         })
                         { IsBackground = true }.Start();
 
-                    },()=> { });
+                    }, () => { });
 
                 }
                 else
@@ -366,7 +339,7 @@
                                 {
                                     new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline));
                                 }
-                                else 
+                                else
                                 {
                                     new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail));
                                 }
@@ -536,7 +509,7 @@
                 //鍔犺浇涔嬪墠淇濆瓨鐨勬暟鎹�
                 weekStateList.AddRange(list);
             }
-            var weekListStr= weekView.GetViewList("week");
+            var weekListStr = weekView.GetViewList("week");
             weekView.MultiSelectShow(fLayout, weekListStr, Language.StringByID(StringId.cyclic), weekStateList
                , (list) =>
                {
@@ -564,7 +537,7 @@
             weekView.MonSelectShow(fLayout, Logic.currlogic, (monList) =>
                 {
                     //閫変腑鏁版嵁澶勭悊
-                    string textStr= MainView.GetMonString(monList);
+                    string textStr = MainView.GetMonString(monList);
                     //鏄剧ず閫変腑鏁版嵁
                     button.Text = textStr;
                     //灏佽鏁版嵁
@@ -603,8 +576,7 @@
 
 
         }
-       
-       
+      
 
     }
 }

--
Gitblit v1.8.0