From 8407d6631ac8f5b65c4a14fa27babaa48026d4ca Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 30 三月 2023 16:13:40 +0800 Subject: [PATCH] Merge branch 'wjc' into Dev-Branch --- HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 87 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 85 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 6faca99..ef2c271 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -619,7 +619,25 @@ } } break; - + //钀ょ煶瑙嗛闂ㄩ攣 + case SPK.VideoDoorLock: + { + LogicView.FunTypeView view1 = new LogicView.FunTypeView(); + view1.btnText.TextID=StringId.yonghurenyuan; + view1.btnText.Name = Language.StringByID(StringId.shipinmensuo); + fLayout.AddChidren(view1.FLayoutView()); + view1.btnClick.MouseUpEventHandler += (sender, e) => + { + this.identifier = "open_door";//寮�閿佷簨浠� + this.VideoDoorLockAction(this, device, view1.btnState); + }; + if (edit) + { + this.GetEditState(device, index, view1.btnState,null, null, null); + } + } + break; + } #region 淇濆瓨 ///淇濆瓨View @@ -669,6 +687,12 @@ //condition榛樿[] inputDevice.condition = new List<Dictionary<string, string>>(); } + } + else if (device.spk == SPK.VideoDoorLock) + { + ////钀ょ煶瑙嗛闂ㄩ攣 + inputDevice.condition_type = "9"; + inputDevice.identifier = this.identifier; } @@ -1045,7 +1069,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++) { @@ -1070,6 +1094,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(); + }); + } }); -- Gitblit v1.8.0