From 8f9f20698e1256a58ee6894a9bc168a9dfb37861 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 14 九月 2023 13:32:14 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wxr-2.0 --- HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs | 50 ++++++++++ SiriIntents/SiriIntents.csproj | 3 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 46 +++++--- HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs | 6 HDL-ON_iOS/HDL-ON_iOS.csproj | 5 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 17 ++- HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs | 67 ++++++++++--- HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 38 +++++-- HDL_ON/Entity/FunctionList.cs | 2 HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs | 7 + HDL_ON/Entity/Function/Function.cs | 2 HDL_ON/UI/UI2/2-Classification/FunctionPage.cs | 4 HDL_ON/DAL/Server/HttpUtil.cs | 4 HDL-ON_Android/Resources/Resource.designer.cs | 2 SiriIntentsUI/SiriIntentsUI.csproj | 3 15 files changed, 194 insertions(+), 62 deletions(-) diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs index eab1586..6536465 100644 --- a/HDL-ON_Android/Resources/Resource.designer.cs +++ b/HDL-ON_Android/Resources/Resource.designer.cs @@ -15,7 +15,7 @@ { - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.1.111")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.0.99")] public partial class Resource { diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index a212a7d..323b079 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -55,7 +55,7 @@ <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <MtouchDebug>true</MtouchDebug> <MtouchI18n>cjk</MtouchI18n> - <MtouchLink>SdkOnly</MtouchLink> + <MtouchLink>None</MtouchLink> <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> <MtouchEnableSGenConc>false</MtouchEnableSGenConc> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> @@ -70,11 +70,12 @@ <WarningLevel>4</WarningLevel> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> <MtouchArch>ARM64</MtouchArch> - <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey> + <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <MtouchLink>SdkOnly</MtouchLink> <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> <MtouchI18n>cjk</MtouchI18n> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <CodesignProvision>OnPro2307291-Dev</CodesignProvision> </PropertyGroup> <ItemGroup> <Reference Include="System" /> diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 5235064..b659327 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -18,8 +18,8 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; + //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; const string APP_KEY = "HDL-HOME-APP-TEST"; const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index b8a2894..e07df39 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -451,7 +451,7 @@ public bool online { get { - if (spk == SPK.AirSwitchP3) + if (spk == SPK.AirSwitchP3|| spk == SPK.ElectricalTvHisense) { return _online; } diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index 2ee8ce7..919bfe1 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -228,7 +228,7 @@ /// </summary> public List<Function> GetElectricals() { - var spkList = SPK.ElectricalSpkList(); + var spkList = SPK.ElectricalSpkList(); return Functions.FindAll((obj) => spkList.Contains(obj.spk)); } diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs index 71742c1..66b07f4 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs @@ -717,9 +717,9 @@ functionCount = FunctionList.List.GetElectricals().Count; functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.spk!=SPK.ElectricalTvHisense&&obj.trait_on_off.curValue.ToString() == "on").Count; -#if DEBUG - functionCount = 1; -#endif +//#if DEBUG +// functionCount = 1; +//#endif #endregion break; case ShowFunction.EnergyMonitoring: @@ -834,8 +834,10 @@ TextAlignment = TextAlignment.CenterLeft, IsMoreLines = true, }; - functionView.AddChidren(btnName); + functionView.AddChidren(btnName); + //涓嶉渶瑕佹樉绀鸿澶囧紑鐘舵�佹暟閲�; + Button btnFunctionCount=null; if (item != ShowFunction.Aks && item != ShowFunction.VideoDoorLock && item != ShowFunction.Environmental @@ -849,7 +851,7 @@ && item != ShowFunction.Acst && item != ShowFunction.IpCam && functionCount != 0) { - Button btnFunctionCount = new Button() + btnFunctionCount = new Button() { X = Application.GetRealWidth(17) + Application.GetRealWidth(7 * functionCount.ToString().Length), Y = btnName.Bottom, @@ -1213,8 +1215,7 @@ { var list =CommonMethod.Current.GetVideoDoorLockList(); var form = new VideoDoorLockListPage(()=> { - functionContentView?.RemoveFromParent(); - this.RefreshFunctionView(); + UpdateBottomView(); }); form.AddForm(list); }; @@ -1226,8 +1227,7 @@ { var list = HDL_ON.UI.UI2.FuntionControlView.Aks.AksCommonMethod.Current.GetVideoControlsList(); var form = new HDL_ON.UI.UI2.FuntionControlView.Aks.AksListPage(() => { - functionContentView?.RemoveFromParent(); - this.RefreshFunctionView(); + UpdateBottomView(); }); form.AddForm(list); }; @@ -1249,10 +1249,16 @@ { btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { + var skipView = new FunctionPage(); MainPage.BasePageView.AddChidren(skipView); skipView.LoadPage(functionPageTitleId); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + skipView.DelAction += () => + { + + UpdateBottomView(); + }; }; } index++; @@ -1790,6 +1796,18 @@ { } -#endregion + #endregion + + /// <summary> + /// 鏇存柊搴曢儴鐣岄潰 + /// </summary> + void UpdateBottomView() + { + Application.RunOnMainThread(() => + { + functionContentView?.RemoveFromParent(); + this.RefreshFunctionView(); + }); + } } } diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs index d5bea34..c8891fe 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs @@ -30,6 +30,7 @@ List<Function> functionList; int titleId; + public Action DelAction; public FunctionPage() { bodyView = this; @@ -185,7 +186,9 @@ } else if (titleId == StringId.Electric) { + functionList.AddRange(FunctionList.List.GetElectricals()); + } else if (titleId == StringId.EnvironmentalScience) { @@ -320,6 +323,7 @@ functionListView.RemoveAll(); showList.Remove(function);//鍏堢Щ闄� ShowFunctionRow(showList,isAppend); + this.DelAction?.Invoke(); }; var functionDiv = new FunctionControlZone(function, deviceDelAction) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs index 78ef5ab..606c5b1 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using HDL_ON.Entity; using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; +using Com.Alibaba.Fastjson; namespace HDL_ON.UI.UI2.Intelligence.Automation { @@ -818,7 +819,7 @@ ////钀ょ煶瑙嗛闂ㄩ攣 inputDevice.condition_type = "9"; inputDevice.identifier = this.identifier; - inputDevice.condition = new List<Dictionary<string, string>>(); + //inputDevice.condition = new List<Dictionary<string, string>>(); } else if (device.spk == SPK.SensorPirHold) { @@ -1304,8 +1305,10 @@ if (indexeList.Count > 0) { dicSateteList.Clear(); - string s = string.Empty; + string seleTxet = string.Empty; string tag = string.Empty; + string[] array = new string[indexeList.Count]; + for (int i = 0; i < indexeList.Count; i++) { if (i > faceIdList.Count) @@ -1314,15 +1317,15 @@ } var indexe = indexeList[i]; var face = faceIdList[indexe]; - //鏁版嵁灏佽<楂樿儨璇磋悿鐭抽偅杈规槸鎺ㄩ�佺敤鎴峰悕> - AddDictionary("open_user", face.userName, "string"); - s += face.userName; - s += ","; tag += face.userId; tag += "_"; + array[i] = face.userName; } + seleTxet= JSON.ToJSONString(array); + //鏁版嵁灏佽<楂樿儨璇磋悿鐭抽偅杈规槸鎺ㄩ�佺敤鎴峰悕> + AddDictionary("open_user",seleTxet, "string", "[]"); //鐣岄潰鏄剧ず閫変腑鍊� - btnState.Text = s; + btnState.Text = InpOrOutLogicMethod.Current.RemoveLastStr(seleTxet); btnState.Tag = tag; } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs index 803d84e..c0a2216 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -48,7 +48,7 @@ { case "1": { - + inputView.btnIcon.UnSelectedImagePath = "LogicIcon/time.png"; foreach (var dic in dicList) { @@ -130,7 +130,7 @@ case "2": { inputView.btnIcon.UnSelectedImagePath = "LogicIcon/time.png"; - string value= this.GetKeyValue("timesection", dicList); + string value = this.GetKeyValue("timesection", dicList); inputView.btnText.Text = Language.StringByID(StringId.timeHorizon) + ": " + value; } break; @@ -418,7 +418,7 @@ break; case SPK.VideoDoorLock: { - string s = string.Empty; + string userName = string.Empty; string tag = string.Empty; for (int b = 0; b < dicList.Count; b++) { @@ -429,11 +429,9 @@ //s += ","; //tag += FaceItem.userId; //tag += "_"; - var userName = dic["value"].ToString(); - s += userName; - s += ","; + userName = dic["value"].ToString(); } - inputView.btnState.Text = s; + inputView.btnState.Text = RemoveLastStr(userName); } break; case SPK.doorgate: @@ -495,7 +493,7 @@ break; } - + inputView.btnState.Text = Language.StringByID(StringId.wuren); if (value == "true") { @@ -841,7 +839,7 @@ else if (device.spk == SPK.SensorTemperature) { - this.SensorView(thisView, device, "temperature", indexVulae); + this.SensorView(thisView, device, "temperature", indexVulae); } else if (device.spk == SPK.SensorHumidity) @@ -1502,7 +1500,8 @@ if (stateStr.StartsWith(";")) { stateStr = stateStr.Substring(1, stateStr.Length - 1); - } else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic))) + } + else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic))) { stateStr = stateStr.Substring(0, stateStr.Length - 3); } @@ -2460,7 +2459,7 @@ break; case SPK.VideoDoorLock: { - string s = string.Empty; + string userName = string.Empty; string tag = string.Empty; for (int b = 0; b < dicList.Count; b++) { @@ -2471,11 +2470,10 @@ //s += ","; //tag += FaceItem.userId; //tag += "_"; - var userName = dic["value"].ToString(); - s += userName; - s += ","; + userName = dic["value"].ToString(); + } - button1.Text = s; + button1.Text = RemoveLastStr(userName); button1.Tag = tag; } break; @@ -2542,7 +2540,7 @@ } } break; - + case "set_volume": { if (button2 == null) @@ -3005,7 +3003,7 @@ Input inputedit = Logic.currlogic.input[indexVulae]; ///鐘舵�佸�� string stateValue = ""; - for (int i=0;i<inputedit.condition.Count;i++) + for (int i = 0; i < inputedit.condition.Count; i++) { var dic = inputedit.condition[i]; string comparator = dic["comparator"]; @@ -3106,6 +3104,20 @@ return face; } + /// <summary> + /// 鍒犻櫎鏈�鍚庝竴涓� "," + /// </summary> + /// <param name="s">瀛楃涓�</param> + /// <returns></returns> + public string RemoveLastStr(string s) + { + if (string.IsNullOrEmpty(s)) + { + return string.Empty; + } + return s.Replace("[","").Replace("]","").Replace("\"","").TrimEnd(','); + } + } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs index c599ae8..8b4b089 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs @@ -14,7 +14,7 @@ { this.Width = Application.GetRealWidth(width); this.Height = Application.GetRealWidth(height); - this.Radius = (uint)Application.GetRealHeight(cornerValue); + this.Radius = (uint)Application.GetRealWidth(cornerValue); this.BackgroundColor = MusicColor.ViewColor; this.Gravity = Gravity.CenterHorizontal; } @@ -97,7 +97,7 @@ Gravity=Gravity.Center, Width = Application.GetRealWidth(76), Height = Application.GetRealWidth(76), - Radius = (uint)Application.GetRealHeight(38), + Radius = (uint)Application.GetRealWidth(38), BackgroundColor = MusicColor.WhiteColor, @@ -107,7 +107,7 @@ Gravity = Gravity.Center, Width = Application.GetRealWidth(28), Height = Application.GetRealWidth(28), - Radius = (uint)Application.GetRealHeight(14), + Radius = (uint)Application.GetRealWidth(14), BackgroundColor = 0xff1B2D4D, SelectedBackgroundColor = MusicColor.SelectedColor, Name = "纭畾" diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs index 4080a14..97c64ec 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs @@ -526,7 +526,12 @@ Radius = (uint)Application.GetRealWidth(22), BackgroundColor = CSS_Color.MainBackgroundColor, }; - contentView.AddChidren(delTextBtn); + //濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳� + if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) + { + contentView.AddChidren(delTextBtn); + } + EventHandler<MouseEventArgs> ClickEvent = (sener, e) => { diff --git a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs index a2dfbb0..83623d5 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs @@ -93,7 +93,7 @@ this.btnRoomName = btnRoomName; this.btnCollectionIcon = btnCollectionIcon; this.comerom = comerom; - this.action = action; + this.action = action; } @@ -105,7 +105,7 @@ //鍒濆鍖栦簨浠� this.EventListener(); //璇诲彇鏁版嵁 - //this.ReadData(); + this.ReadData(); } @@ -192,11 +192,11 @@ ControlCommand(HisenseTVFunctionalAttributeConstant.volume_subtract, ""); }; //鑿滃崟 - caidanBtn.SetClickListener((btn) => - { - ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "11"); + caidanBtn.SetClickListener((btn) => + { + ControlCommand(HisenseTVFunctionalAttributeConstant.operation, "11"); - }); + }); //鎾斁 bofangBtn.SetClickListener((btn) => { @@ -293,6 +293,26 @@ { try { + if (this.device == null) + { + //璁惧涓嶅湪绾挎帶鍒跺け璐� + Application.RunOnMainThread(() => + { + CommonMethod.Current.ShowTip(Language.StringByID(StringId.shebeibuzaixian), 3); + }); + return; + } + + if (!this.device.online) + { + //璁惧涓嶅湪绾挎帶鍒跺け璐� + Application.RunOnMainThread(() => + { + CommonMethod.Current.ShowTip(Language.StringByID(StringId.shebeibuzaixian), 3); + }); + return; + } + Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add(key, value); Send.Current.SendControlCommand(this.device, dic, action); @@ -304,14 +324,27 @@ /// </summary> private void ReadData() { + if (this.device == null) + { + return; + } CommonMethod.Current.Loading.Start(); CommonMethod.Current.SunThread(() => { try { - CommonMethod.Current.MainThread(() => + + var isRefreshDeviceStatus = Send.Current.RefreshDeviceStatus(new List<string> { this.device.deviceId }); + if (isRefreshDeviceStatus) { - }); + var fun = Send.Current.GetDeviceInfo(this.device.deviceId); + if (fun != null) + { + //鏇存柊鐪熷疄鍦ㄧ嚎鐘舵�� + this.device.online = fun.online; + } + + } } catch { } finally @@ -413,7 +446,7 @@ kaijiFL.GetImageButton().SelectedImagePath = "HisenseTv/kaiguanSelected.png"; kaijiFL.GetTextButton().TextID = StringId.kaiji; - guanFL = new CustomFrameLayout(); + guanFL = new CustomFrameLayout(); backgroundOpenFl.AddChidren(guanFL); guanFL.X = kaijiFL.Right + Application.GetRealWidth(37); guanFL.Y = yHeight; @@ -431,7 +464,7 @@ yinliangFL.Y = Application.GetRealHeight(260); yinliangFL.X = shouyeFL.X; yinliangFL.BackgroundColor = 0xffF2F3F7; - yinliangFL.Radius = (uint)Application.GetRealHeight(34); + yinliangFL.Radius = (uint)Application.GetRealWidth(34); btn_jia = new Button { @@ -580,7 +613,7 @@ #endregion } - + /// <summary> /// 鍒濆鍖栧ご閮� /// </summary> @@ -592,7 +625,7 @@ this.topView.topNameBtn.TextID = StringId.dianshi; this.AddChidren(topView.TopFLayoutView()); } - + /// <summary> /// 閲嶆柊璁$畻瀹藉害(璁惧鍚嶇О,鎴块棿鎺т欢) @@ -650,7 +683,7 @@ TextID = StringId.dangqianmenweiguan, TextSize = TextSize.Text14, TextColor = MusicColor.TextColor, - SelectedTextColor= MusicColor.MusicTxet14SelectedColor, + SelectedTextColor = MusicColor.MusicTxet14SelectedColor, TextAlignment = TextAlignment.Center, Gravity = Gravity.CenterHorizontal, Name = "btnText", @@ -723,8 +756,10 @@ this.IsMoreLines = true; this.BackgroundColor = 0xffECEDEE; this.SelectedBackgroundColor = 0xFFF2F3F7; - this.Radius = (uint)Application.GetRealHeight(30); + this.Radius = (uint)Application.GetRealHeight(19); + this.Padding = new Padding(0, 0, 0, 0); } + /// <summary> /// 浜嬩欢鐩戝惉鏂规硶 @@ -781,6 +816,7 @@ SelectedTextColor = MusicColor.MusicTxet14SelectedColor, TextSize = TextSize.Text16, TextID = StringId.kongzhi, + Padding = new Padding(0, 0, 0, 0), IsBold = true, }; @@ -814,7 +850,8 @@ TextColor = MusicColor.TextColor, SelectedTextColor = MusicColor.MusicTxet14SelectedColor, TextSize = TextSize.Text16, - Text = "淇″彿婧�", + TextID = StringId.xinhaoyuan, + Padding = new Padding(0, 0, 0, 0), IsBold = true, }; 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> diff --git a/SiriIntents/SiriIntents.csproj b/SiriIntents/SiriIntents.csproj index 79a1208..57075e1 100644 --- a/SiriIntents/SiriIntents.csproj +++ b/SiriIntents/SiriIntents.csproj @@ -37,7 +37,7 @@ <DefineConstants></DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <CodesignKey>iPhone Distribution</CodesignKey> + <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <MtouchUseLlvm>true</MtouchUseLlvm> <MtouchFloat32>true</MtouchFloat32> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> @@ -45,6 +45,7 @@ <MtouchArch>ARM64</MtouchArch> <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> + <CodesignProvision>OnProSiri230729-1-Dev</CodesignProvision> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> <DebugType>pdbonly</DebugType> diff --git a/SiriIntentsUI/SiriIntentsUI.csproj b/SiriIntentsUI/SiriIntentsUI.csproj index 87fa8fa..8331b8d 100644 --- a/SiriIntentsUI/SiriIntentsUI.csproj +++ b/SiriIntentsUI/SiriIntentsUI.csproj @@ -38,7 +38,7 @@ <DefineConstants></DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <CodesignKey>iPhone Distribution</CodesignKey> + <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <MtouchUseLlvm>true</MtouchUseLlvm> <MtouchFloat32>true</MtouchFloat32> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> @@ -47,6 +47,7 @@ <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <CodesignProvision>OnProSiriUI230729-1-Dev</CodesignProvision> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> <DebugType>pdbonly</DebugType> -- Gitblit v1.8.0