From 0899b2c8a831527cedcd06658074046b13071ef6 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 24 四月 2024 09:54:25 +0800
Subject: [PATCH] 人脸采集协议地址改成全英文
---
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 272 +++++++++++++++++++++++++++++++----------------------
1 files changed, 158 insertions(+), 114 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
index 57848d1..d0a06bd 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -17,119 +17,152 @@
/// </summary>
public static void MainShow()
{
- automationPage.RemoveAll();
- VerticalRefreshLayout vv = new VerticalRefreshLayout();
- vv.Height = Application.GetRealHeight(667 - 64 - 49);//妯℃嫙楂樺害
- automationPage.AddChidren(vv);
- vv.BeginHeaderRefreshingAction += () =>
+
+ System.Threading.Tasks.Task.Run(() =>
{
- //娓呴櫎涔嬪墠鑷姩鍖栧垪琛�;
- Logic.LogicList.Clear();
- //鑾峰彇鑷姩鍒楄〃
- GetLogicList();
- //鍒锋柊鑷姩鍖栫晫闈�
- MainShow();
- //鍏抽棴鍒锋柊View锛�
- vv.EndHeaderRefreshing();
- };
- //鑾峰彇鑷姩鍖栧垪琛�
- GetLogicList();
- 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鍍忕礌
- vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
- LogicView.SingleLogicView logicView = new LogicView.SingleLogicView();
- vv.AddChidren(logicView.FLayoutView());
- logicView.btnLogicName.Text = currLogic.name;
- logicView.btnWeekText.Text = GetCyclicText(currLogic);
- logicView.btnclick.MouseUpEventHandler += (sen, e) =>
+ try
{
- //Logic.currlogic = currLogic;
- //var addLogic = new AddLogic();
- //MainPage.BasePageView.AddChidren(addLogic);
- //addLogic.Show();
- //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- new MainView { }.SkipAddLogicPage(currLogic);
- };
- //寮�鍏冲浘鏍囩殑鐐瑰嚮浜嬩欢
- logicView.btnSwitchIcon.MouseUpEventHandler += (sender1, e1) =>
+ //鑾峰彇鑷姩鍖栧垪琛�
+ GetLogicList();
+ }
+ catch { }
+ finally
{
- logicView.btnSwitchIcon.IsSelected = !logicView.btnSwitchIcon.IsSelected;
- if (logicView.btnSwitchIcon.IsSelected)
+ Application.RunOnMainThread(() =>
{
- logicView.btnSwitchIcon.IsSelected = true;
- currLogic.enable = "true";
- }
- else
- {
- logicView.btnSwitchIcon.IsSelected = false;
- currLogic.enable = "false";
- }
- new System.Threading.Thread(() =>
- {
- try
+
+ automationPage.RemoveAll();
+ VerticalRefreshLayout vv = new VerticalRefreshLayout();
+ vv.Height = Application.GetRealHeight(667 - 64 - 49);//妯℃嫙楂樺害
+ automationPage.AddChidren(vv);
+ vv.BeginHeaderRefreshingAction += () =>
{
- //閫昏緫浣胯兘鐨勫懡浠�
- Send.Current.EnableLogic(currLogic);
+ System.Threading.Tasks.Task.Run(() =>
+ {
+ try
+ {
+ //寮哄埗鏇存柊鑷姩鍖栧垪琛�;
+ Logic.LogicList.Clear();
+ //鑾峰彇鑷姩鍖栧垪琛�
+ GetLogicList();
+ }
+ catch { }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ //鍒锋柊鑷姩鍖栫晫闈�
+ MainShow();
+ //鍏抽棴鍒锋柊View锛�
+ vv.EndHeaderRefreshing();
+ });
+ }
+
+ });
+
+
+ };
+
+ for (int i = Logic.LogicList.Count - 1; i >= 0; i--)//闄嶅簭鎺掑垪
+ {
+ var currLogic = Logic.LogicList[i];
+ ///涓婁笅闂撮殧12鍍忕礌
+ vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
+ LogicView.SingleLogicView logicView = new LogicView.SingleLogicView();
+ vv.AddChidren(logicView.FLayoutView());
+ logicView.btnLogicName.Text = currLogic.name;
+ logicView.btnWeekText.Text = GetCyclicText(currLogic);
+ logicView.btnclick.MouseUpEventHandler += (sen, e) =>
+ {
+ //Logic.currlogic = currLogic;
+ //var addLogic = new AddLogic();
+ //MainPage.BasePageView.AddChidren(addLogic);
+ //addLogic.Show();
+ //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ new MainView { }.SkipAddLogicPage(currLogic);
+ };
+ //寮�鍏冲浘鏍囩殑鐐瑰嚮浜嬩欢
+ logicView.btnSwitchIcon.MouseUpEventHandler += (sender1, e1) =>
+ {
+ logicView.btnSwitchIcon.IsSelected = !logicView.btnSwitchIcon.IsSelected;
+ if (logicView.btnSwitchIcon.IsSelected)
+ {
+ logicView.btnSwitchIcon.IsSelected = true;
+ currLogic.enable = "true";
+ }
+ else
+ {
+ logicView.btnSwitchIcon.IsSelected = false;
+ currLogic.enable = "false";
+ }
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ //閫昏緫浣胯兘鐨勫懡浠�
+ Send.Current.EnableLogic(currLogic);
+
+ }
+ catch { }
+
+ })
+ { IsBackground = true }.Start();
+ };
+
+
+ GetSelectIcon(logicView.frameLayout, currLogic);
+ if (i == 0)//闄嶅簭鎺掑垪
+ {
+ ///鏈�鍚庝竴涓窛绂绘渶搴曢儴12,鐣岄潰鏄剧ず鏁堟灉浣滅敤;
+ vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(20) });
+ }
+ if (currLogic.enable == "true")
+ {
+ logicView.btnSwitchIcon.IsSelected = true;
+ }
+ else
+ {
+ logicView.btnSwitchIcon.IsSelected = false;
+ }
+ ///鏄剧ず鐗规畩鑷姩鍖栨爣蹇�
+ if (currLogic.tag == true)
+ {
+ logicView.btnIsDelTag.Visible = true;
+ }
+ else
+ {
+ logicView.btnIsDelTag.Visible = false;
+ }
}
- catch { }
- })
- { IsBackground = true }.Start();
- };
+ if (Logic.LogicList.Count == 0)
+ {
+ Button btnTipNot = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(120),
+ Width = Application.GetRealWidth(180),
+ Height = Application.GetRealWidth(180),
+ UnSelectedImagePath = "TipNot.png",
+ };
+ automationPage.AddChidren(btnTipNot);
+ Button btnTipNotText = new Button()
+ {
+ Y = btnTipNot.Bottom + Application.GetRealHeight(16),
+ Height = Application.GetRealHeight(20),
+ TextID = StringId.logicnull,
+ TextAlignment = TextAlignment.Center,
+ TextSize = LogicView.TextSize.text14,
+ TextColor = CSS.CSS_Color.textConfirmColor,
+ };
+ automationPage.AddChidren(btnTipNotText);
+ }
+ });
+ }
+ });
- GetSelectIcon(logicView.frameLayout, currLogic);
- if (i == 0)//闄嶅簭鎺掑垪
- //if (Logic.LogicList.Count - 1 == i)
- {
- ///鏈�鍚庝竴涓窛绂绘渶搴曢儴12,鐣岄潰鏄剧ず鏁堟灉浣滅敤;
- vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
- }
- if (currLogic.enable == "true")
- {
- logicView.btnSwitchIcon.IsSelected = true;
- }
- else
- {
- logicView.btnSwitchIcon.IsSelected = false;
- }
- ///鏄剧ず鐗规畩鑷姩鍖栨爣蹇�
- if (currLogic.tag == true)
- {
- logicView.btnIsDelTag.Visible = true;
- }
- else
- {
- logicView.btnIsDelTag.Visible = false;
- }
- }
-
- if (Logic.LogicList.Count == 0)
- {
- Button btnTipNot = new Button()
- {
- Gravity = Gravity.CenterHorizontal,
- Y = Application.GetRealHeight(120),
- Width = Application.GetRealWidth(180),
- Height = Application.GetRealWidth(180),
- UnSelectedImagePath = "TipNot.png",
- };
- automationPage.AddChidren(btnTipNot);
- Button btnTipNotText = new Button()
- {
- Y = btnTipNot.Bottom + Application.GetRealHeight(16),
- Height = Application.GetRealHeight(20),
- TextID = StringId.logicnull,
- TextAlignment = TextAlignment.Center,
- TextSize = LogicView.TextSize.text14,
- TextColor = CSS.CSS_Color.textConfirmColor,
- };
- automationPage.AddChidren(btnTipNotText);
- }
}
/// <summary>
/// 鎸�+璺宠浆鍒伴�昏緫鐣岄潰鐨勬柟娉�
@@ -265,13 +298,11 @@
//鑷姩鍖栧垪琛ㄤ负0鎵嶅幓鑾峰彇鑷姩鍖栧垪琛紱
return;
}
- List<string> logicIdList = new List<string>();
+ var logicIdList = new List<string>();
//鑾峰彇閫昏緫ID鍒楄〃
- var idStr = Send.Current.GetLogicIdList();
- if (idStr != null)
+ var dateList = Send.Current.GetLogicIdList();
+ if (dateList != null)
{
- var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data);
- var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicData>>(date);
for (int i = 0; i < dateList.Count; i++)
{
//娣诲姞閫昏緫ID
@@ -279,16 +310,15 @@
}
}
//鑾峰彇鑷姩鍖栧垪琛�
- var logicListStr = Send.Current.GetLogic(logicIdList);
- if (logicListStr != null)
+ var logicList = Send.Current.GetLogic(logicIdList);
+ if (logicList != null)
{
- var logicList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Logic>>(logicListStr.Data.ToString());
for (int j = 0; j < logicList.Count; j++)
{
var logic = logicList[j];
if (logic != null)
{
- //鏌ユ壘鏄惁宸茬粡瀛樺湪璇ラ�昏緫
+ //鍘婚噸
var if_logic = Logic.LogicList.Find((c) => c.userLogicId == logic.userLogicId);
if (if_logic == null)
{
@@ -366,6 +396,7 @@
//2-鍔熻兘鍥炬爣
//3-浜戠鍥炬爣
//4-鍦烘櫙鍥炬爣
+ //5-鍦扮悊鍥存爮
for (int i = 0; i < logic.input.Count; i++)
{
if (logic.input[i] == null)
@@ -395,12 +426,19 @@
}
break;
+ case 8:
+ {
+ iconInt = 5;
+
+ }
+ break;
case 10:
{
iconInt = 4;
}
break;
+
}
if (!iconIntValue.Contains(iconInt))
@@ -511,6 +549,12 @@
strIcon = "LogicIcon/selectTheScene.png";
}
break;
+ case 5:
+ {
+
+ strIcon = "LogicIcon/selectlocation.png";
+ }
+ break;
case 11:
{
//鍒嗗壊鏉′欢鍜岀洰鏍囩殑鍥炬爣
@@ -560,8 +604,8 @@
return false;
}
}
- }
- class LogicData
+ }
+ public class LogicIdData
{
/// <summary>
/// 浜戠鍞竴id
--
Gitblit v1.8.0