From 18c8ba14183bf72fd01e595124a9614bc4c7d6a3 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 23 十月 2023 14:34:16 +0800 Subject: [PATCH] 2.3版本 --- HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL-ON_Android/Assets/Language.ini | 12 ++-- HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 6 + HDL-ON_iOS/AppDelegate.cs | 6 +- HDL-ON_Android/SplashActivity.cs | 8 +- HDL-ON_iOS/Resources/Language.ini | 12 ++-- HDL_ON/DAL/Server/HttpUtil.cs | 9 ++- HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 8 +- HDL-ON_Android/Resources/Resource.designer.cs | 2 HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 6 + HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs | 6 +- HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 93 +++++++++--------------------- SiriIntents/Server/HttpUtil.cs | 4 13 files changed, 73 insertions(+), 101 deletions(-) diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index e4f7f4b..e0ca4ee 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -1153,7 +1153,7 @@ 7098=Sunny day 7099=Cloudy 7100=Tain -7101=*Please set the value in this range (1 ~ 100). +7101=*Please set the value in this range ({0} ~ {1}). 7102=No set value. 7103=Excellent: 0 ~ 35ug/m3 7104=Good: 36 ~ 75ug/m3 @@ -2553,7 +2553,7 @@ 7098=鏅村ぉ 7099=澶氫簯 7100=涓嬮洦 -7101=*璇峰湪杩欎釜鑼冨洿(1~100)璁剧疆鍊笺�� +7101=*璇峰湪杩欎釜鑼冨洿({0}~{1})璁剧疆鍊笺�� 7102=杩樻病鏈夎缃�笺�� 7103=浼�:0~35ug/m鲁 7104=鑹�:36~75ug/m鲁 @@ -3941,7 +3941,7 @@ 7098=小芯谢薪械褔薪褘泄 写械薪褜 7099=袨斜谢邪褔薪芯 7100=袧械锌芯谐芯写邪 -7101=*袩芯卸邪谢褍泄褋褌邪, 褍褋褌邪薪芯胁懈褌械 蟹薪邪褔械薪懈械 胁 褝褌芯屑 写懈邪锌邪蟹芯薪械 (1 ~ 100). +7101=*袩芯卸邪谢褍泄褋褌邪, 褍褋褌邪薪芯胁懈褌械 蟹薪邪褔械薪懈械 胁 褝褌芯屑 写懈邪锌邪蟹芯薪械 ({0} ~ {1}). 7102=袟邪写邪薪薪芯械 蟹薪邪褔械薪懈械 芯褌褋褍褌褋褌胁褍械褌. 7103=袨褌谢懈褔薪芯: 0 ~ 35 屑泻谐/屑3 7104=啸芯褉芯褕芯: 36 ~ 75 屑泻谐/屑3 @@ -5322,7 +5322,7 @@ 7098=D铆a soleado 7099=Nublado 7100= -7101=*Establezca el valor en este rango (1 ~ 100). +7101=*Establezca el valor en este rango ({0} ~ {1}). 7102=Sin valor establecido 7103=Excelente: 0 ~ 35ug/m3 7104=Bueno: 36 ~ 75ug/m3 @@ -6709,7 +6709,7 @@ 7098=小谢褗薪褔械胁 写械薪 7099=袨斜谢邪褔薪芯 7100=袛褗卸写芯胁薪芯 -7101=*袦芯谢褟, 蟹邪写邪泄褌械 褋褌芯泄薪芯褋褌褌邪 胁 褌芯蟹懈 写懈邪锌邪蟹芯薪 (1 ~ 100). +7101=*袦芯谢褟, 蟹邪写邪泄褌械 褋褌芯泄薪芯褋褌褌邪 胁 褌芯蟹懈 写懈邪锌邪蟹芯薪 ({0} ~ {1}). 7102=袧褟屑邪 蟹邪写邪写械薪邪 褋褌芯泄薪芯褋褌. 7103=袨褌谢懈褔薪芯: 0 ~ 35ug/m3 7104=袛芯斜褗褉: 36 ~ 75ug/m3 @@ -8034,7 +8034,7 @@ 7098=小芯薪褟褔薪懈泄 写械薪褜 7099=啸屑邪褉薪芯 7100=袛芯褖 -7101=*袟邪写邪泄褌械 蟹薪邪褔械薪薪褟 胁 褑褜芯屑褍 写褨邪锌邪蟹芯薪褨 (1 ~ 100). +7101=*袟邪写邪泄褌械 蟹薪邪褔械薪薪褟 胁 褑褜芯屑褍 写褨邪锌邪蟹芯薪褨 ({0} ~ {1}). 7102=袧械 蟹邪写邪薪芯 蟹薪邪褔械薪薪褟. 7103=袙褨写屑褨薪薪芯: 0 ~ 35 屑泻谐/屑3 7104=袛芯斜褉械: 36 ~ 75 屑泻谐/屑3 diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index a4d7874..449a195 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/HDL-ON_Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202310201"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202310221"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="30" /> <uses-permission android:name="android.permission.RECEIVE_SMS" /> <!--鍙嬬洘--> diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs index 485dc4b..af7c4b4 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.0.99")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.1.111")] public partial class Resource { diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs index 096e3b3..ecdc3c4 100644 --- a/HDL-ON_Android/SplashActivity.cs +++ b/HDL-ON_Android/SplashActivity.cs @@ -85,10 +85,10 @@ { Language.CurrentLanguage = "斜褗谢谐邪褉褋泻懈"; } - else if (localeList.Language == "uk") - { - Language.CurrentLanguage = "Ukraine"; - } + //else if (localeList.Language == "uk") + //{ + // Language.CurrentLanguage = "Ukraine"; + //} else { Language.CurrentLanguage = "English"; diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs index f70d5d8..65119d7 100644 --- a/HDL-ON_iOS/AppDelegate.cs +++ b/HDL-ON_iOS/AppDelegate.cs @@ -289,9 +289,9 @@ { Language.CurrentLanguage = "Spanish"; } - else if(NSLocale.PreferredLanguages[0].Contains("uk-")){ - Language.CurrentLanguage = "Ukraine"; - } + //else if(NSLocale.PreferredLanguages[0].Contains("uk-")){ + // Language.CurrentLanguage = "Ukraine"; + //} else { Language.CurrentLanguage = "English"; diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index e4f7f4b..e0ca4ee 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -1153,7 +1153,7 @@ 7098=Sunny day 7099=Cloudy 7100=Tain -7101=*Please set the value in this range (1 ~ 100). +7101=*Please set the value in this range ({0} ~ {1}). 7102=No set value. 7103=Excellent: 0 ~ 35ug/m3 7104=Good: 36 ~ 75ug/m3 @@ -2553,7 +2553,7 @@ 7098=鏅村ぉ 7099=澶氫簯 7100=涓嬮洦 -7101=*璇峰湪杩欎釜鑼冨洿(1~100)璁剧疆鍊笺�� +7101=*璇峰湪杩欎釜鑼冨洿({0}~{1})璁剧疆鍊笺�� 7102=杩樻病鏈夎缃�笺�� 7103=浼�:0~35ug/m鲁 7104=鑹�:36~75ug/m鲁 @@ -3941,7 +3941,7 @@ 7098=小芯谢薪械褔薪褘泄 写械薪褜 7099=袨斜谢邪褔薪芯 7100=袧械锌芯谐芯写邪 -7101=*袩芯卸邪谢褍泄褋褌邪, 褍褋褌邪薪芯胁懈褌械 蟹薪邪褔械薪懈械 胁 褝褌芯屑 写懈邪锌邪蟹芯薪械 (1 ~ 100). +7101=*袩芯卸邪谢褍泄褋褌邪, 褍褋褌邪薪芯胁懈褌械 蟹薪邪褔械薪懈械 胁 褝褌芯屑 写懈邪锌邪蟹芯薪械 ({0} ~ {1}). 7102=袟邪写邪薪薪芯械 蟹薪邪褔械薪懈械 芯褌褋褍褌褋褌胁褍械褌. 7103=袨褌谢懈褔薪芯: 0 ~ 35 屑泻谐/屑3 7104=啸芯褉芯褕芯: 36 ~ 75 屑泻谐/屑3 @@ -5322,7 +5322,7 @@ 7098=D铆a soleado 7099=Nublado 7100= -7101=*Establezca el valor en este rango (1 ~ 100). +7101=*Establezca el valor en este rango ({0} ~ {1}). 7102=Sin valor establecido 7103=Excelente: 0 ~ 35ug/m3 7104=Bueno: 36 ~ 75ug/m3 @@ -6709,7 +6709,7 @@ 7098=小谢褗薪褔械胁 写械薪 7099=袨斜谢邪褔薪芯 7100=袛褗卸写芯胁薪芯 -7101=*袦芯谢褟, 蟹邪写邪泄褌械 褋褌芯泄薪芯褋褌褌邪 胁 褌芯蟹懈 写懈邪锌邪蟹芯薪 (1 ~ 100). +7101=*袦芯谢褟, 蟹邪写邪泄褌械 褋褌芯泄薪芯褋褌褌邪 胁 褌芯蟹懈 写懈邪锌邪蟹芯薪 ({0} ~ {1}). 7102=袧褟屑邪 蟹邪写邪写械薪邪 褋褌芯泄薪芯褋褌. 7103=袨褌谢懈褔薪芯: 0 ~ 35ug/m3 7104=袛芯斜褗褉: 36 ~ 75ug/m3 @@ -8034,7 +8034,7 @@ 7098=小芯薪褟褔薪懈泄 写械薪褜 7099=啸屑邪褉薪芯 7100=袛芯褖 -7101=*袟邪写邪泄褌械 蟹薪邪褔械薪薪褟 胁 褑褜芯屑褍 写褨邪锌邪蟹芯薪褨 (1 ~ 100). +7101=*袟邪写邪泄褌械 蟹薪邪褔械薪薪褟 胁 褑褜芯屑褍 写褨邪锌邪蟹芯薪褨 ({0} ~ {1}). 7102=袧械 蟹邪写邪薪芯 蟹薪邪褔械薪薪褟. 7103=袙褨写屑褨薪薪芯: 0 ~ 35 屑泻谐/屑3 7104=袛芯斜褉械: 36 ~ 75 屑泻谐/屑3 diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index b659327..3ca2243 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -4,9 +4,11 @@ using System.Net; using System.Security.Cryptography; using System.Text; +using Foundation; using HDL_ON.Entity; using RestSharp; using Shared; +using SiriKit; namespace HDL_ON.DAL.Server { @@ -18,8 +20,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"; @@ -319,12 +321,13 @@ UserInfo.Current.RefreshToken = revertData.refreshToken; UserInfo.Current.LastTime = DateTime.Now; UserInfo.Current.SaveUserInfo(); - return true; #if __IOS__ var sdm = new SiriKit.SceneDateManager(); sdm.AccessToken = UserInfo.Current.LoginTokenString; sdm.RefreshToken = UserInfo.Current.RefreshToken; + //var sss = NSUserDefaultsHelper.DataSuite.StringForKey(NSUserDefaultsHelper.StorageKeys.GLOBAL_GAccessToken); #endif + return true; } else if (revertObj.Code == StateCode.PasswrodError) { diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs index 512a64e..151ee2f 100644 --- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs +++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs @@ -777,9 +777,13 @@ sRange.Add(i); } sRange.Add(60); + + int curValus = 0; + int.TryParse(curItemKey, out curValus); + BottomTimeSelectControl timeControl = new BottomTimeSelectControl(mRange, sRange, 5, Language.StringByID(StringId.SceneDelay)); timeControl.RowHeight = Application.GetRealHeight(50); - timeControl.InitControl(0, 0, 262, false); + timeControl.InitControl(curValus / 60, curValus % 60, 262, false); //timeControl.ChangePickerEvent2(); timeControl.FinishEvent = (type, hours, min) => { diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs index 87f5585..f99b97c 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -1121,9 +1121,11 @@ } } int max = 100; + int min = 1; if (device.spk == SPK.SensorLight) { //鐓ф槑浼犳劅鍣� + min = 0; max =1200; } @@ -1171,12 +1173,12 @@ key = "illuminance"; comparator = "<"; } - break; + break ; } selectedState = device.spk + "_" + value; AddDictionary(key, value, data_type, comparator); SaveInput(device,index, edit); - },1,max); + },min,max); } /// PM2.5,Co2,Tvoc璁剧疆鍊� /// </summary> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index 094b08e..ebbfe22 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -377,10 +377,10 @@ //{ // return "LogicIcon/ganjiedian.png"; //} - else if (SPK.SensorLight == device.spk) - { - return "LogicIcon/lightloguc.png"; - } + //else if (SPK.SensorLight == device.spk) + //{ + // return "LogicIcon/lightloguc.png"; + //} //LogicIcon/heatlogic.png" return $"FunctionIcon/Icon/{device.IconName}.png"; diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs index 7943ef1..f26af22 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs @@ -550,7 +550,7 @@ } if (intValue < minValue || intValue > maxValue) { - errorId_IsNullOrEmpty = Language.StringByID(StringId.setvalue).Replace("1", minValue.ToString()).Replace("100", maxValue.ToString()); + errorId_IsNullOrEmpty = Language.StringByID(StringId.setvalue).Replace("{0}", minValue.ToString()).Replace("{1}", maxValue.ToString()); } } if (errorId_IsNullOrEmpty!="") @@ -564,8 +564,8 @@ btnTip.X = Application.GetRealWidth(53); btnTip.Y = editBjView.Bottom + Application.GetRealHeight(12); - btnTip.Width = Application.GetRealWidth(157);//200 - btnTip.Height = Application.GetRealHeight(17);//17 + btnTip.Width = Application.GetRealWidth(180);//200 + btnTip.Height = Application.GetRealHeight(20);//17 btnTip.Text = errorId_IsNullOrEmpty; btnTip.TextColor = CSS_Color.textRedColor; btnTip.TextSize = TextSize.text12; diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs index 440e8f2..4713ac2 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs @@ -32,7 +32,7 @@ bodyView = this; scene = s; - sceneFunction = fc.localFunction.ConvertSceneFunction(); + sceneFunction = fc;//.localFunction.ConvertSceneFunction(); foreach (var ll in sceneFunction.status) { try @@ -229,6 +229,7 @@ { sceneFunction.status.Clear(); sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.OnOff, value = "off" }); + sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.Delay, value = sceneFunction.delay }); } } } @@ -238,16 +239,6 @@ { if (temp != null) { - //temp.delay = sceneFunction.delay; - //foreach (var attr in sceneFunction.status) - //{ - // var keva = temp.status.Find((obj) => obj.key == attr.key); - // if (keva != null) - // { - // keva.value = attr.value; - // } - //} - //temp = sceneFunction; scene.functions.Remove(temp); } //else @@ -292,7 +283,14 @@ void UpdataFunctionRow() { - contentView.RemoveAll(); + try + { + contentView.RemoveAll(); + } + catch (Exception ex) + { + MainPage.Log(ex.Message); + } for (var i = 0; i < functionRowList.Count; i++) { try @@ -304,37 +302,39 @@ { if (view.Tag != null) { - if (view.Tag.ToString() == FunctionAttributeKey.OnOff) + if (view.Tag.ToString() == FunctionAttributeKey.OnOff || view.Tag.ToString() == "delay") { contentView.AddChidren(view); - } - if (isOnStatus) + else { - if (view.Tag.ToString() != FunctionAttributeKey.OnOff) + if (isOnStatus) { - if (isColorful && sceneFunction.localFunction.spk == SPK.LightRGB) + if (view.Tag.ToString() != FunctionAttributeKey.OnOff) { - if (view.Tag.ToString() != FunctionAttributeKey.Colorful) + if (isColorful && sceneFunction.localFunction.spk == SPK.LightRGB) { - view.RemoveFromParent(); + if (view.Tag.ToString() != FunctionAttributeKey.Colorful) + { + view.RemoveFromParent(); + } + else + { + contentView.AddChidren(view); + } } else { contentView.AddChidren(view); } } - else - { - contentView.AddChidren(view); - } } - } - else - { - if (view.Tag.ToString() != FunctionAttributeKey.OnOff) + else { - view.RemoveFromParent(); + if (view.Tag.ToString() != FunctionAttributeKey.OnOff && view.Tag.ToString() != "delay") + { + view.RemoveFromParent(); + } } } } @@ -674,43 +674,6 @@ btnFunctionName.MouseUpEventHandler = (sender, e) => { LoadEditDialog_OnOff(sceneStatus, btnFunctionText); - //var colorfulModePage = new SetSceneRgbColorfulModePage(); - //colorfulModePage.backAction = (selectedSerise,status) => { - // if (selectedSerise == null) - // { - // if (status == "on") - // { - // isColorful = true; - // } - // else - // { - // isColorful = false; - // } - // } - // else - // { - // isColorful = true; - // rgbColorful = selectedSerise.ConvertSceneFunction(); - // } - // if (isColorful) - // { - // btnFunctionText.TextID = StringId.On; - // if (selectedSerise != null) - // { - // btnFunctionText.Text = selectedSerise.name; - // } - // } - // else - // { - // btnFunctionText.TextID = StringId.OFF; - // } - // UpdataFunctionRow(); - //}; - //MainPage.BasePageView.AddChidren(colorfulModePage); - //colorfulModePage.LoadPage(sceneFunction.localFunction.sid.Substring(0,16)); - //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - - }; #endregion diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs index 8d4483c..dc7aca0 100644 --- a/SiriIntents/Server/HttpUtil.cs +++ b/SiriIntents/Server/HttpUtil.cs @@ -16,8 +16,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"; //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm -- Gitblit v1.8.0