From 4047f825119fd65a8ed41ade4b2324d8a7f94902 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 27 六月 2022 10:27:57 +0800 Subject: [PATCH] Merge branch 'release0123' into wxr0114 --- HDL_ON/Entity/Function/Scene.cs | 4 + HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs | 32 ++++--- HDL-ON_Android/Properties/AndroidManifest.xml | 4 HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs | 4 HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs | 22 +++++ HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs | 7 + HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPage.cs | 9 ++ HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 15 ++- HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs | 26 ++++++ HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs | 31 ++++--- HDL-ON_Android/SplashActivity.cs | 36 ++++++++ HDL-ON_iOS/Info.plist | 4 HDL_ON/Entity/Function/Function.cs | 14 +++ HDL_ON/DAL/Server/HttpUtil.cs | 4 HDL_ON/UI/MainPage.cs | 2 SiriIntents/Server/HttpUtil.cs | 4 16 files changed, 173 insertions(+), 45 deletions(-) diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index 3bcb874..fd2e74d 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="1.5.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202206082"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.8" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202206261"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <!--鍙嬬洘--> <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> @@ -88,7 +88,7 @@ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.READ_LOGS" /> <!-- 鏋佸厜鎺ㄩ�佺粨鏉� --> - <application android:allowBackup="true" android:debuggable="false" android:icon="@drawable/Icon" android:networkSecurityConfig="@xml/network_security_config" android:largeHeap="true" android:label="On Pro"> + <application android:allowBackup="true" android:debuggable="false" android:icon="@drawable/Icon" android:requestLegacyExternalStorage="true" android:networkSecurityConfig="@xml/network_security_config" android:largeHeap="true" android:label="On Pro"> <!--/鎵弿浜岀淮鐮乤ctivity--> <!--<activity android:name="com.journeyapps.barcodescanner.CaptureActivity" diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs index afcbe50..bed7401 100644 --- a/HDL-ON_Android/SplashActivity.cs +++ b/HDL-ON_Android/SplashActivity.cs @@ -1,4 +1,4 @@ -锘縰sing System; +锘縰sing System; using Android.App; using Android.Content; using Android.Content.PM; @@ -45,6 +45,8 @@ protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); + + //Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class); //StartActivityForResult(i, 1); @@ -107,6 +109,9 @@ BaseActivity.KeepScreenON = false; //闅愯棌铏氭嫙鎸夐敭 BaseActivity.IsHideVirualButtons = true; + + + //瀹炵幇瀹夊崜杩斿洖鎸夐敭 BaseActivity.BackKeyAction = () => { @@ -138,9 +143,18 @@ Language.CurrentLanguage = "Chinese"; Locale locale1 = Locale.Default; var localeList = Resources.Configuration.Locale; + Console.WriteLine("999999999999999999999999999999999999999999999"+ localeList.Language); if (localeList.Language == "zh") { Language.CurrentLanguage = "Chinese"; + } + else if(localeList.Language == "es") + { + Language.CurrentLanguage = "Spanish"; + } + else if (localeList.Language == "ru") + { + Language.CurrentLanguage = "russian"; } else { @@ -171,6 +185,26 @@ }; BaseActivity.RefreshUIAction += (activity) => { + Language.CurrentLanguage = "Chinese"; + Locale locale1 = Locale.Default; + var localeList = Resources.Configuration.Locale; + Console.WriteLine("999999999999999999999999999999999999999999999" + localeList.Language); + if (localeList.Language == "zh") + { + Language.CurrentLanguage = "Chinese"; + } + else if (localeList.Language == "es") + { + Language.CurrentLanguage = "Spanish"; + } + else if (localeList.Language == "ru") + { + Language.CurrentLanguage = "russian"; + } + else + { + Language.CurrentLanguage = "English"; + } MainPage.Show(); checkSomeInfo(); }; diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index 1b4e185..e0efd51 100644 --- a/HDL-ON_iOS/Info.plist +++ b/HDL-ON_iOS/Info.plist @@ -100,9 +100,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> - <string>1.5.502205241</string> + <string>1.5.502206241</string> <key>CFBundleVersion</key> - <string>1.5.505241</string> + <string>1.5.506241</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 72fa068..4917487 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -17,8 +17,8 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm + public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary> diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 9e45062..747df45 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -1196,14 +1196,19 @@ public string loopId; } - + /// <summary> + /// Tag 鍔熻兘SPK + /// </summary> public static class SPK { /// <summary> /// 闂ㄩ攣 /// </summary> public const string DoorLock = "security.door"; - + /// <summary> + /// 闂ㄩ攣spk鍒楄〃 + /// </summary> + /// <returns></returns> public static List<string> GetDoorLockSPKList() { var list = new List<string>(); @@ -1267,6 +1272,10 @@ /// 锛堝嵎甯橈級 /// </summary> public const string CurtainRoller = "curtain.roller"; + /// <summary> + /// 姊﹀够甯� + /// </summary> + public const string CurtainDream = "curtain.dream"; /// <summary> /// 绐楀笜spk鍒楄〃 @@ -1279,6 +1288,7 @@ spkList.Add(CurtainSwitch); spkList.Add(CurtainShades); spkList.Add(CurtainTrietex); + spkList.Add(CurtainDream); return spkList; } #endregion diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs index 86309f8..75742dc 100644 --- a/HDL_ON/Entity/Function/Scene.cs +++ b/HDL_ON/Entity/Function/Scene.cs @@ -540,6 +540,10 @@ public int min = 0; /// <summary> + /// 灞炴�х殑鍊煎垪琛� + /// </summary> + public List<string> valueList = new List<string>(); + /// <summary> /// 灞炴�у悕绉版樉绀烘枃鏈� /// 涓嫳鏂囨樉绀� /// </summary> diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index 3acd47a..bb3ee13 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -26,7 +26,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "1.5.5"; + public static string VersionString = "1.5.81"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs index ab3db01..2a48cc0 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs @@ -482,6 +482,13 @@ scene.functions.Remove(scenefunction); continue; } + //灏唖pk瀹炰綋閲岄潰鐨刴in max鍊兼斁鍏ュ満鏅姛鑳藉疄浣撻噷锛岃涓嶇劧鏁版嵁浼氫涪澶� 2022-06-21 16:06:45 + foreach (var tt in scenefunction.status) { + tt.min = scenefunction.localFunction.GetAttribute(tt.key).min; + tt.max = scenefunction.localFunction.GetAttribute(tt.key).max; + tt.valueList = scenefunction.localFunction.GetAttribute(tt.key).value; + } + i++; var row = new RowLayout() { diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs index 8f089d6..cc40903 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs @@ -165,22 +165,28 @@ else { var selectedRoom = Room.CurrentSpatial.RoomList.Find((obj) => obj.uid == DB_ResidenceData.Instance.sceneChooseRoomId); - - var listAllFun = new List<Function>(); - var listFun = new List<Function>(); - listAllFun.AddRange(unallocatedList); - listAllFun.AddRange(allocatedList); - - btnFloor.Text = selectedRoom.floorRoomName; - foreach(var funtion in listAllFun) + if (selectedRoom == null) { - if (funtion.roomIds.Contains(selectedRoom.roomId)) - { - listFun.Add(funtion); - } + LoadFunctionListRow(null); } - LoadFunctionListRow(listFun); + else + { + var listAllFun = new List<Function>(); + var listFun = new List<Function>(); + listAllFun.AddRange(unallocatedList); + listAllFun.AddRange(allocatedList); + + btnFloor.Text = selectedRoom.floorRoomName; + foreach (var funtion in listAllFun) + { + if (funtion.roomIds.Contains(selectedRoom.roomId)) + { + listFun.Add(funtion); + } + } + LoadFunctionListRow(listFun); + } } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs index 8cca07f..50de5e6 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs @@ -568,7 +568,9 @@ }) { IsBackground = true }.Start(); } - catch { } + catch (Exception ex) { + MainPage.Log(ex.Message); + } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPage.cs index 5608ce8..04f939c 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPage.cs @@ -84,6 +84,15 @@ public FloorHeatingPage(Function func) { bodyView = this; + var tempAttr = func.GetAttribute(FunctionAttributeKey.SetTemp); + if (tempAttr != null) + { + if(tempAttr.min == 0 && tempAttr.max == 0) + { + tempAttr.min = 16; + tempAttr.max = 30; + } + } function = func; } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs index a40ee00..90cadf6 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs @@ -349,6 +349,28 @@ { DriverLayer.Control.Ins.SendReadCommand(function); }) + { IsBackground = true }.Start(); + + new System.Threading.Thread(() => { + while (true) + { + System.Threading.Thread.Sleep(500); + System.Threading.Thread.Sleep(500); + if (curDimmerStatus) + { + continue; + } + if (onDimmerBar) + { + onDimmerBar = false; + continue; + } + else + { + DriverLayer.Control.Ins.SendReadCommand(function); + } + } + }) { IsBackground = true }.Start(); } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs index 47800c8..9fed03d 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs @@ -27,8 +27,11 @@ { bodyView.dimmerBar.Progress = Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness)); } - bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%"; - bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80); + if (updataTemp.GetAttrState(FunctionAttributeKey.Brightness) != "0") + { + bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%"; + bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80); + } } else { @@ -134,6 +137,7 @@ }; } + bool curDimmerStatus = false; /// <summary> /// 鐏厜璋冨厜浜嬩欢 /// </summary> @@ -141,17 +145,18 @@ { dimmerBar.OnStopTrackingTouchEvent = (sender, e) => { - if (!function.online) - { - new Tip() - { - CloseTime = 1, - Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - Direction = AMPopTipDirection.None, - }.Show(MainPage.BaseView); - return; - } - onDimmerBar = false; + //if (!function.online) + //{ + // new Tip() + // { + // CloseTime = 1, + // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), + // Direction = AMPopTipDirection.None, + // }.Show(MainPage.BaseView); + // return; + //} + //onDimmerBar = false; + curDimmerStatus = false; function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress); System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString()); diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs index 52f25af..6aca64f 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs @@ -262,9 +262,35 @@ DriverLayer.Control.Ins.SendReadCommand(function); }) { IsBackground = true }.Start(); + + + new System.Threading.Thread(() => { + while (true) + { + System.Threading.Thread.Sleep(500); + if (curDimmerStatus) + { + continue; + } + if ( onDimmerBar) + { + onDimmerBar = false; + continue; + } + else + { + DriverLayer.Control.Ins.SendReadCommand(function); + } + } + }) + { IsBackground = true }.Start(); + } } + + + } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs index 08fdc35..55bc4b3 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs @@ -21,13 +21,13 @@ if (updataTemp.spk == bodyView.function.spk && updataTemp.sid == bodyView.function.sid) { bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%"; - bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32( updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(288 - 16 - 16) / 100) + Application.GetRealWidth(40); if (updataTemp.trait_on_off.curValue.ToString() == "on") { bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1); if (!bodyView.onDimmerBar) { bodyView.dimmerBar.Progress = Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness)); + bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(288 - 16 - 16) / 100) + Application.GetRealWidth(40); } } else @@ -83,6 +83,8 @@ }; } + bool curDimmerStatus = false; + /// <summary> /// 鐏厜璋冨厜浜嬩欢 /// </summary> @@ -92,12 +94,13 @@ { dimmerBar.OnStartTrackingTouchEvent = (sender, e) => { - onDimmerBar = true; + curDimmerStatus = onDimmerBar = true; dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1); }; dimmerBar.OnStopTrackingTouchEvent = (sender, e) => { - onDimmerBar = false; + + curDimmerStatus = false; function.SetAttrState(FunctionAttributeKey.Brightness, dimmerBar.Progress); System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString()); @@ -133,9 +136,9 @@ function.refreshTime = DateTime.Now; new System.Threading.Thread(() => { - System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); - d.Add(FunctionAttributeKey.Brightness, e.ToString()); - Control.Ins.SendWriteCommand(function, d); + System.Collections.Generic.Dictionary<string, string> dic = new System.Collections.Generic.Dictionary<string, string>(); + dic.Add(FunctionAttributeKey.Brightness, e.ToString()); + Control.Ins.SendWriteCommand(function, dic); }) { IsBackground = true }.Start(); } diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs index 56a78a0..f61de04 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";//mmmm + public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary> -- Gitblit v1.8.0