From 1d30484a8f9c8e6dcd3fb770309f32abb073d8fb Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 10 五月 2023 17:36:55 +0800
Subject: [PATCH] 兼容bus一端口RGB调色开关状态

---
 HDL-ON_Android/Properties/AndroidManifest.xml           |    2 +-
 HDL-ON_iOS/Info.plist                                   |    4 ++--
 HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs    |    7 +++++--
 HDL-ON_iOS/HDL-ON_iOS.csproj                            |    1 -
 HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs   |    5 ++++-
 HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs |    5 ++++-
 HDL_ON/UI/MainPage.cs                                   |    2 +-
 7 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index d9abbf9..57f0b3f 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.7.4" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202305081">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.7.5" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202305101">
 	<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
 	<!--鍙嬬洘-->
 	<!--<uses-sdk android:minSdkVersion="8"></uses-sdk>-->
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 7a64231..b4c94f0 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1572,7 +1572,6 @@
       <BundleResource Include="Resources\Phone\FunctionIcon\Icon\securitydoorezviz.png" />
       <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorlockClose1.png" />
       <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen1.png" />
-      <BundleResource Include="Resources\.DS_Store" />
     </ItemGroup>
     <ItemGroup>
       <ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index f7db100..af356b1 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -11,7 +11,7 @@
 	<key>CFBundleName</key>
 	<string>On Pro</string>
 	<key>CFBundleShortVersionString</key>
-	<string>1.7.4</string>
+	<string>1.7.5</string>
 	<key>CFBundleURLTypes</key>
 	<array>
 		<dict>
@@ -36,7 +36,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>1.7.4</string>
+	<string>1.7.5</string>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>weixinULAPI</string>
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 471abe3..9e6d8aa 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string VersionString = "1.7.4";
+        public static string VersionString = "1.7.5";
         ///// <summary>
         ///// 瀹㈡埛绔被鍨�
         ///// </summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
index 857de2f..1fd9624 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -179,7 +179,10 @@
                     function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                     System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                     d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
-                    d.Add(FunctionAttributeKey.FadeTime, barFadeTime.Progress.ToString());
+                    if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
+                    {
+                        d.Add(FunctionAttributeKey.FadeTime, barFadeTime.Progress.ToString());
+                    }
                     //if (btnSwitch.IsSelected)
                     //{
                     //    if(function.lastBrightness == 0)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
index 3bc557a..697f09c 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
@@ -185,6 +185,7 @@
                             lightTemp.SetRGBcolor(lastColor, function);
                             System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                             d.Add(FunctionAttributeKey.RGB, lightTemp.GetRGBcolorString(function));
+                            d.Add(FunctionAttributeKey.Brightness, dimmerBar.Progress.ToString());
                             Control.Ins.SendWriteCommand(function, d,false,0);
                             break;
                         }
@@ -305,8 +306,10 @@
                     function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                     System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                     d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
-                    d.Add(FunctionAttributeKey.FadeTime, barFadeTime.Progress.ToString());
-
+                    if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
+                    {
+                        d.Add(FunctionAttributeKey.FadeTime, barFadeTime.Progress.ToString());
+                    }
                     if (btnSwitch.IsSelected)
                     {
                         if(function.lastBrightness == 0)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs
index ecde5c8..e12b753 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs
@@ -307,7 +307,10 @@
                     function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                     System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                     d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
-                    d.Add(FunctionAttributeKey.FadeTime, barFadeTime.Progress.ToString());
+                    if (function.GetAttribute(FunctionAttributeKey.FadeTime) != null)
+                    {
+                        d.Add(FunctionAttributeKey.FadeTime, barFadeTime.Progress.ToString());
+                    }
                     if (btnSwitch.IsSelected)
                     {
                         if (function.lastBrightness == 0)

--
Gitblit v1.8.0