From eace7a4d75c0bea498253f524906c6ce326b80f2 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 14 三月 2023 11:33:03 +0800
Subject: [PATCH] 2023年03月14日11:32:57
---
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 91 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 84 insertions(+), 7 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index 2e237f6..4a885bc 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -466,7 +466,7 @@
};
}
break;
- //pm210
+ //pm10
case SPK.SensorPm10:
{
///pm210
@@ -618,7 +618,24 @@
}
}
break;
-
+ //钀ょ煶瑙嗛闂ㄩ攣
+ case SPK.VideoDoorLock:
+ {
+ LogicView.FunTypeView view1 = new LogicView.FunTypeView();
+ view1.btnText.Text = "鐢ㄦ埛浜哄憳";// StringId.shipintonghuahujiao;
+ view1.btnText.Name = Language.StringByID(StringId.shipinmensuo);
+ fLayout.AddChidren(view1.FLayoutView());
+ view1.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ this.VideoDoorLockAction(this, device, view1.btnState);
+ };
+ if (edit)
+ {
+ this.GetEditState(device, index, view1.btnState,null, null, null);
+ }
+ }
+ break;
+
}
#region 淇濆瓨
///淇濆瓨View
@@ -647,7 +664,7 @@
Input inputDevice = new Input();
inputDevice.condition_type = "3";
inputDevice.sid = device.sid;
- inputDevice.condition = dicSateteList;
+ inputDevice.condition.AddRange(dicSateteList);
if (device.spk == SPK.doorgate)
{
//鍙瀵硅
@@ -928,7 +945,7 @@
if (inputs.condition.Count != 0)
{
//鏈夋暟鎹噸鏂拌祴鍊�
- dicSateteList = inputs.condition;
+ dicSateteList.AddRange(inputs.condition);
}
}
new LogicView.TipPopView { }.InputBox(textInt, stateValue, (value) =>
@@ -990,7 +1007,7 @@
if (inputs.condition.Count != 0)
{
//鏈夋暟鎹噸鏂拌祴鍊�
- dicSateteList = inputs.condition;
+ dicSateteList.AddRange(inputs.condition);
}
}
PublicInterface view = new PublicInterface();
@@ -1016,6 +1033,7 @@
case SPK.SensorPm25:
case SPK.SensorTVOC:
case SPK.SensorHcho:
+ case SPK.SensorPm10:
{
if (!Is_SpkAttribute(key))
{
@@ -1043,7 +1061,7 @@
{
try
{
- var faceIDList = Send.Current.GetListHomeFace(device.deviceId,true);
+ var faceIDList = Send.Current.GetListHomeFace(device.deviceId, true);
List<string> faceNameList = new List<string>();
for (int i = 0; i < faceIDList.Count; i++)
{
@@ -1068,6 +1086,65 @@
});
}
catch { }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ loading.Hide();
+ });
+ }
+
+ });
+
+ }
+
+ /// <summary>
+ /// 钀ょ煶瑙嗛闂ㄩ攣涓撶敤
+ /// </summary>
+ /// <param name="frame">褰撳墠鐣岄潰</param>
+ /// <param name="device">褰撳墠璁惧</param>
+ /// <param name="btnState">鏃х姸鎬�</param>
+ public void VideoDoorLockAction(FrameLayout frame, Entity.Function device, Button btnState)
+ {
+ selectedState = device.spk + "_";
+ Loading loading = new Loading();
+ frame.AddChidren(loading);
+ loading.Start();
+ System.Threading.Tasks.Task.Run(() =>
+ {
+ try
+ {
+ var userList =FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetVideoDoorLockUserListInfo(device);
+ List<string> userNameList = new List<string>();
+ for (int i = 0; i < userList.Count; i++)
+ {
+ var user = userList[i];
+ userNameList.Add(user.extUserName);
+ }
+ Application.RunOnMainThread(() =>
+ {
+ loading.Hide();
+ PublicInterface publicInterface = new PublicInterface();//鐢ㄦ埛鐣岄潰
+ publicInterface.FrameOrVv(this, userNameList, new List<string> { btnState.Text }, device.name, (index) =>
+ {
+ var userId = userNameList[index];
+ //鐣岄潰鏄剧ず閫変腑鍊�
+ btnState.Text = userId;
+ //鏁版嵁灏佽
+ AddDictionary("open_user", userId, "string");
+
+ }, false);
+
+ });
+ }
+ catch { }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ loading.Hide();
+ });
+ }
});
@@ -1091,7 +1168,7 @@
if (dicList.Count != 0)
{
//鏈夋暟鎹噸鏂拌祴鍊�
- dicSateteList = dicList;
+ dicSateteList.AddRange(dicList);
}
InpOrOutLogicMethod.Current.EditDeviceState(device, dicList, button1, button2, button3, button4);
}
--
Gitblit v1.8.0