From e66503d70f26a3109fbadf47abcb8ba31d619e3c Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期五, 10 三月 2023 16:56:03 +0800 Subject: [PATCH] 2023年03月10日16:56:00 --- HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 80 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 78 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs index 6094f4a..6ad66c0 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -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 @@ -1044,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++) { @@ -1069,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> userIdList = new List<string>(); + for (int i = 0; i < userList.Count; i++) + { + var user = userList[i]; + userIdList.Add(user.extUserId); + } + Application.RunOnMainThread(() => + { + loading.Hide(); + PublicInterface publicInterface = new PublicInterface();//鐢ㄦ埛鐣岄潰 + publicInterface.FrameOrVv(this, userIdList, new List<string> { btnState.Text }, device.name, (index) => + { + var userId = userIdList[index]; + //鐣岄潰鏄剧ず閫変腑鍊� + btnState.Text = userId; + //鏁版嵁灏佽 + AddDictionary("open_user", userId, "string"); + + }, false); + + }); + } + catch { } + finally + { + Application.RunOnMainThread(() => + { + loading.Hide(); + }); + } }); -- Gitblit v1.8.0