From f9f9b0030fdd2691632569b7dcad9d0ddca5e4cf Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 23 十二月 2020 09:28:54 +0800
Subject: [PATCH] 2020-12-23 1.调整mqtt挤下线,跑ui线程。2.LoadEvent_CheckLinkStatus方法调整
---
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 38 +++++++++++++++++++++++---------------
1 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
index 2b375d9..b5ba7b4 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -34,8 +34,8 @@
};
//鑾峰彇鑷姩鍖栧垪琛�
GetLogicList();
- // for (int i = Logic.LogicList.Count-1; i >= 0; i--)闄嶅簭鎺掑垪
- for (int i = 0; i < Logic.LogicList.Count; i++)
+ for (int i = Logic.LogicList.Count-1; i >= 0; i--)//闄嶅簭鎺掑垪
+ //for (int i = 0; i < Logic.LogicList.Count; i++)
{
var currLogic = Logic.LogicList[i];
///涓婁笅闂撮殧12鍍忕礌
@@ -52,6 +52,7 @@
addLogic.Show();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
};
+ //寮�鍏冲浘鏍囩殑鐐瑰嚮浜嬩欢
logicView.btnSwitchIcon.MouseUpEventHandler += (sender1, e1) =>
{
logicView.btnSwitchIcon.IsSelected = !logicView.btnSwitchIcon.IsSelected;
@@ -59,20 +60,29 @@
{
logicView.btnSwitchIcon.IsSelected = true;
currLogic.enable = "true";
-
-
}
else
{
logicView.btnSwitchIcon.IsSelected = false;
currLogic.enable = "false";
}
- Send.switchLogic(currLogic);
+ //Send.switchLogic(currLogic);
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ //閫昏緫浣胯兘鐨勫懡浠�
+ Send.switchLogic(currLogic);
+ }
+ catch { }
+
+ })
+ { IsBackground = true }.Start();
};
GetSelectIcon(logicView.frameLayout, currLogic);
- //if (i==0)闄嶅簭鎺掑垪
- if (Logic.LogicList.Count - 1 == i)
+ if (i==0)//闄嶅簭鎺掑垪
+ //if (Logic.LogicList.Count - 1 == i)
{
///鏈�鍚庝竴涓窛绂绘渶搴曢儴12,鐣岄潰鏄剧ず鏁堟灉浣滅敤;
vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
@@ -100,12 +110,12 @@
automationPage.AddChidren(btnTipNot);
Button btnTipNotText = new Button()
{
- Y = btnTipNot.Bottom,
- Height = Application.GetRealWidth(100),
- TextID = StringId.TipNotOpen,
+ Y = btnTipNot.Bottom + Application.GetRealHeight(16),
+ Height = Application.GetRealHeight(20),
+ TextID = StringId.logicnull,
TextAlignment = TextAlignment.Center,
- TextColor = CSS.CSS_Color.TextualColor,
- TextSize = CSS.CSS_FontSize.PromptFontSize_FirstLevel,
+ TextSize = LogicView.TextSize.text14,
+ TextColor = CSS.CSS_Color.textConfirmColor,
};
automationPage.AddChidren(btnTipNotText);
}
@@ -200,7 +210,6 @@
return weekTextName.TrimEnd(',');
}
-
/// <summary>
/// 鑾峰彇姣忔湀鐨勫瓧绗︿覆
/// </summary>
@@ -222,9 +231,8 @@
/// <summary>
/// 鑾峰彇閫昏緫鍒楄〃
/// </summary>
- private static void GetLogicList()
+ public static void GetLogicList()
{
-
if (Logic.LogicList.Count != 0)
{
//鑷姩鍖栧垪琛ㄤ负0鎵嶅幓鑾峰彇鑷姩鍖栧垪琛紱
--
Gitblit v1.8.0