From 1f5d37fbca31293eff043f4a051be6f6876cea09 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 27 六月 2022 09:12:19 +0800 Subject: [PATCH] 跳动优化 --- HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs | 4 + HDL-ON_Android/Properties/AndroidManifest.xml | 4 + HDL-ON_iOS/Info.plist | 4 +- HDL_ON/Entity/Function/Function.cs | 14 ++++++- HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs | 4 + HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs | 22 +++++++++++ HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPage.cs | 9 ++++ HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 15 ++++--- HDL_ON/UI/MainPage.cs | 2 HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPage.cs | 26 +++++++++++++ 10 files changed, 90 insertions(+), 14 deletions(-) diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index 60e2068..e03dc67 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/HDL-ON_Android/Properties/AndroidManifest.xml @@ -88,7 +88,9 @@ <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_iOS/Info.plist b/HDL-ON_iOS/Info.plist index 971d629..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.502206231</string> + <string>1.5.502206241</string> <key>CFBundleVersion</key> - <string>1.5.506231</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/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/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index a69d1b8..950254a 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.7"; + public static string VersionString = "1.5.81"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs index 58570c9..e4382e4 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs @@ -573,7 +573,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 96565a2..6da0079 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs @@ -137,6 +137,7 @@ }; } + bool curDimmerStatus = false; /// <summary> /// 鐏厜璋冨厜浜嬩欢 /// </summary> @@ -154,7 +155,8 @@ // }.Show(MainPage.BaseView); // return; //} - onDimmerBar = false; + //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 ed7f296..519aec2 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(); } -- Gitblit v1.8.0