From 4e7c1dd0767d551ec3194ead9f3de0a219a802c3 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 25 九月 2023 17:24:37 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wxr-2.1 --- HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs index 525e5e4..5cfa50d 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs @@ -73,6 +73,56 @@ } /// <summary> + /// 鍒锋柊璁惧鐘舵�� + /// </summary> + /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param> + /// <returns></returns> + public bool RefreshDeviceStatus(List<string> functionIds, TipType tipType = TipType.flicker) + { + try + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("deviceIds", functionIds); + var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_RefreshDeviceStatus, "鍒锋柊璁惧鐘舵��"); + if (!this.DataChecking(responsePackNew, tipType)) + { + return false; + } + return true; + } + catch + { + return false; + } + } + + /// <summary> + /// 鑾峰彇璁惧璇︽儏 + /// </summary> + /// <param name="tipType">鏄惁闇�瑕佹彁绀�,榛樿鎻愮ず</param> + /// <returns></returns> + public Function GetDeviceInfo(string functionId, TipType tipType = TipType.flicker) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("deviceIds", new List<string>() { functionId }); + + var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GetDevcieInfoList, "鑾峰彇璁惧璇︽儏"); + if (!this.DataChecking(responsePackNew, tipType)) + { + return null; + } + var functionList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Function>>(responsePackNew.Data.ToString()); + if (functionList != null && functionList.Count > 0) + { + return functionList[0]; + } + return null; + + } + + /// <summary> ///鍒犻櫎璁惧 /// </summary> /// <param name="deviceId">璁惧id</param> -- Gitblit v1.8.0