From 6b6a3fd9c292a75196c4cc15c6d9bf52537efbd4 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 07 九月 2021 10:12:20 +0800
Subject: [PATCH] 1.窗帘问题。2.智能空开。3.组合调光部分。

---
 HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs       |  202 +++++++++
 HDL_ON/Entity/Function/Light.cs                                    |    7 
 HDL-ON_Android/Assets/Language.ini                                 |    3 
 HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs        |   18 
 HDL-ON_iOS/HDL-ON_iOS.csproj                                       |    4 
 HDL-ON_Android/Assets/Phone/Public/HookIcon.png                    |    0 
 HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs     |  131 +++--
 HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs          |    5 
 HDL-ON_Android/HDL-ON_Android.csproj                               |    1 
 HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs |  620 +++++++++++++++++++++++++++++
 HDL-ON_iOS/Info.plist                                              |    4 
 HDL-ON_iOS/Resources/Language.ini                                  |    3 
 HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs     |    6 
 HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs  |   83 ++-
 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs     |   10 
 .vs/HDL_APP_Project/xs/UserPrefs.xml                               |   69 ++
 HDL_ON/UI/UI1-Login/LoginPage.cs                                   |    4 
 HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs       |   17 
 HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs    |    9 
 HDL_ON/UI/UI0-Public/TopViewDiv.cs                                 |   28 +
 HDL-ON_iOS/Resources/Phone/Public/HookIcon.png                     |    0 
 HDL_ON/Entity/Function/Function.cs                                 |    2 
 HDL_ON/UI/UI2/2-Classification/FunctionPage.cs                     |   16 
 HDL_ON/DAL/Server/HttpUtil.cs                                      |    4 
 HDL_ON/Common/R.cs                                                 |    6 
 25 files changed, 1,098 insertions(+), 154 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 28b8041..694cda0 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,25 +1,67 @@
 锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL-ON_iOS/Info.plist">
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs">
     <Files>
-      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="21" Column="89" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs" Line="304" Column="119" />
-      <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="976" Column="47" />
-      <File FileName="HDL_ON/DAL/DriverLayer/Packet.cs" Line="605" Column="54" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" Line="288" Column="103" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs" Line="8" Column="31" />
-      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="208" Column="54" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" Line="895" Column="68" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs" Line="62" Column="49" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPage.cs" Line="142" Column="2" />
+      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="27" Column="19" />
       <File FileName="HDL-ON_iOS/Info.plist" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs" Line="383" Column="53" />
+      <File FileName="HDL_ON/Common/R.cs" Line="9" Column="34" />
+      <File FileName="HDL-ON_iOS/Resources/Language.ini" Line="1616" Column="9" />
+      <File FileName="HDL-ON_Android/Assets/Language.ini" Line="2217" Column="1" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs" Line="640" Column="26" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs" Line="170" Column="14" />
+      <File FileName="HDL_ON/Entity/Function/Light.cs" Line="14" Column="49" />
+      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="225" Column="23" />
+      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionPage.cs" Line="36" Column="10" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePage.cs" Line="1" Column="1" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs" Line="152" Column="1" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs" Line="234" Column="66" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs" Line="148" Column="74" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" Line="261" Column="28" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs" Line="70" Column="30" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="HDL_APP_Project" expanded="True">
+            <Node name="HDL_ON" expanded="True">
+              <Node name="Common" expanded="True" />
+              <Node name="DAL" expanded="True">
+                <Node name="Server" expanded="True" />
+              </Node>
+              <Node name="UI" expanded="True">
+                <Node name="UI0-Public" expanded="True" />
+                <Node name="UI1-Login" expanded="True" />
+                <Node name="UI2" expanded="True">
+                  <Node name="1-HomePage" expanded="True" />
+                  <Node name="2-Classification" expanded="True" />
+                  <Node name="FuntionControlView" expanded="True">
+                    <Node name="Curtain" expanded="True" />
+                    <Node name="Electrical" expanded="True" />
+                    <Node name="Light" expanded="True">
+                      <Node name="LightScene" expanded="True" />
+                    </Node>
+                    <Node name="FunctionBaseInfoSetPageBLL.cs" selected="True" />
+                  </Node>
+                </Node>
+              </Node>
+            </Node>
+            <Node name="HDL-ON_Android" expanded="True">
+              <Node name="Assets" expanded="True">
+                <Node name="Phone" expanded="True" />
+              </Node>
+            </Node>
             <Node name="HDL-ON_iOS" expanded="True">
-              <Node name="Info.plist" selected="True" />
+              <Node name="Resources" expanded="True">
+                <Node name="Phone" expanded="True">
+                  <Node name="FunctionIcon" expanded="True">
+                    <Node name="Light" expanded="True">
+                      <Node name="LightScene" expanded="True" />
+                    </Node>
+                  </Node>
+                  <Node name="Public" expanded="True" />
+                </Node>
+              </Node>
             </Node>
           </Node>
         </State>
@@ -32,7 +74,7 @@
     <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
     <String>Shared.IOS/Shared.IOS.csproj</String>
   </DisabledProjects>
-  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
   <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
     <BreakpointStore>
@@ -49,6 +91,7 @@
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" line="153" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/Function/Scene.cs" relfile="HDL_ON/Entity/Function/Scene.cs" line="338" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="2144" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs" line="244" column="1" />
     </BreakpointStore>
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 5bbb86e..76f8b23 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -496,6 +496,7 @@
 508=Formaldehyde
 509=Please enter security name.
 510=Please select the deployment target.
+511=Combined dimming
 
  
 1000=Room Humidity
@@ -1612,7 +1613,7 @@
 508=鐢查啗
 509=璇疯緭鍏ュ畨闃插悕绉般��
 510=璇烽�夋嫨甯冮槻鐩爣銆�
-
+511=缁勫悎璋冨厜
 
  
 1000=瀹ゅ唴婀垮害
diff --git a/HDL-ON_Android/Assets/Phone/Public/HookIcon.png b/HDL-ON_Android/Assets/Phone/Public/HookIcon.png
new file mode 100644
index 0000000..7296f07
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/Public/HookIcon.png
Binary files differ
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 4df5f13..6ede0c4 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -462,6 +462,7 @@
     <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_blue.png" />
     <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" />
     <AndroidAsset Include="Assets\Phone\LogicIcon\security.png" />
+    <AndroidAsset Include="Assets\Phone\Public\HookIcon.png" />
   </ItemGroup>
   <ItemGroup>
     <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\BindScene.png" />
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 0fc2a6b..ed33212 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -130,9 +130,6 @@
       <PackageReference Include="Xamarin.Essentials">
         <Version>1.7.0</Version>
       </PackageReference>
-      <PackageReference Include="Xamarin.Swift">
-        <Version>1.0.8</Version>
-      </PackageReference>
     </ItemGroup>
     <ItemGroup>
         <ImageAsset Include="Assets.xcassets\add_server1.imageset\add_server1.png" />
@@ -1353,6 +1350,7 @@
       <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_blue.png" />
       <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" />
       <BundleResource Include="Resources\Phone\LogicIcon\security.png" />
+      <BundleResource Include="Resources\Phone\Public\HookIcon.png" />
     </ItemGroup>
     <ItemGroup>
       <ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index c7e7475..fa61411 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.2.202109022</string>
+	<string>1.2.202109024</string>
 	<key>CFBundleVersion</key>
-	<string>1.2.09022</string>
+	<string>1.2.09024</string>
 	<key>NSLocationWhenInUseUsageDescription</key>
 	<string>Use geographic location to provide services such as weather</string>
 	<key>NSAppleMusicUsageDescription</key>
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 5bbb86e..76f8b23 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -496,6 +496,7 @@
 508=Formaldehyde
 509=Please enter security name.
 510=Please select the deployment target.
+511=Combined dimming
 
  
 1000=Room Humidity
@@ -1612,7 +1613,7 @@
 508=鐢查啗
 509=璇疯緭鍏ュ畨闃插悕绉般��
 510=璇烽�夋嫨甯冮槻鐩爣銆�
-
+511=缁勫悎璋冨厜
 
  
 1000=瀹ゅ唴婀垮害
diff --git a/HDL-ON_iOS/Resources/Phone/Public/HookIcon.png b/HDL-ON_iOS/Resources/Phone/Public/HookIcon.png
new file mode 100644
index 0000000..7296f07
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/Public/HookIcon.png
Binary files differ
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 3eef3cc..a743284 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -5,6 +5,12 @@
     public static class StringId
     {
 
+
+        //public const int SaveAs
+        /// <summary>
+        /// 缁勫悎璋冨厜
+        /// </summary>
+        public const int CombinedDimming = 511;
         /// <summary>
         /// 
         /// </summary>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 67c665d..48d5724 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 143cc90..a76836c 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -695,7 +695,7 @@
     /// 鍔熻兘灞炴��
     /// 灞炴�у瓧娈佃В鏋愶細attri :灞炴�у唴瀹癸紝value 灞炴�х殑鍊硷紝max 鏈�澶у�� min 鏈�灏忓��
     /// </summary>
-    [System.Serializable]
+    [Serializable]
     public class FunctionAttributes
     {
         /// <summary>
diff --git a/HDL_ON/Entity/Function/Light.cs b/HDL_ON/Entity/Function/Light.cs
index bb19c2f..44ee714 100644
--- a/HDL_ON/Entity/Function/Light.cs
+++ b/HDL_ON/Entity/Function/Light.cs
@@ -11,10 +11,13 @@
         /// 鑾峰彇rgb棰滆壊
         /// </summary>
         /// <returns></returns>
-        public int GetRGBcolor(Function function )
+        public int GetRGBcolor(Function function ,string rgbString ="")
         {
             var color = function.GetAttrState(FunctionAttributeKey.RGB).Split(",");
-
+            if(!string.IsNullOrEmpty(rgbString))
+            {
+                color = rgbString.Split(",");
+            }
             if(color.Length!= 3)
             {
                 color = new string[] {"100", "100", "100" };
diff --git a/HDL_ON/UI/UI0-Public/TopViewDiv.cs b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
index 1de2e9b..688ede5 100644
--- a/HDL_ON/UI/UI0-Public/TopViewDiv.cs
+++ b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -158,6 +158,34 @@
         }
 
         /// <summary>
+        /// 鐏厜鍔熻兘鍒楄〃鐣岄潰
+        /// 甯︾粍鍚堣皟鍏夌紪杈�
+        /// </summary>
+        /// <param name="backAction"></param>
+        /// <param name="editAction"></param>
+        public void LoadTopView_LightFunction( Action editAction)
+        {
+            LoadTopView();
+
+            var btnSetting = new Button()
+            {
+                X = Application.GetRealWidth(337),
+                Y = Application.GetRealHeight(29),
+                Width = Application.GetMinRealAverage(28),
+                Height = Application.GetMinRealAverage(28),
+                UnSelectedImagePath = "FunctionIcon/Light/LightScene/SetLightSceneIcon.png",
+            };
+
+            contentView.AddChidren(btnSetting);
+            btnSetting.MouseUpEventHandler = (sender, e) =>
+            {
+                editAction();
+            };
+        }
+
+
+
+        /// <summary>
         /// 鍚慺ramelayout娣诲姞椤堕儴鍖哄煙,鎷ユ湁閰嶇疆鍥炬爣鎸夐挳
         /// </summary>
         /// <param name="frame"></param>
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 24c5e09..6c6176d 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -211,8 +211,8 @@
                     etAccount.Text = "13226233133";//璞嗚眴
                     //etAccount.Text = "18316672920";
                     //etAccount.Text = "18316120654";//tujie
-                    //etAccount.Text = "15626203746";
-                    etAccount.Text = "13450425807";//榛勭婧� knx椤圭洰
+                    etAccount.Text = "15626203746";
+                    //etAccount.Text = "13450425807";//榛勭婧� knx椤圭洰
                 }
                 else
                 {
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
index 47a64cc..cb6b25a 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -38,8 +38,20 @@
         public void LoadPage(int titleId)
         {
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
-
+            //if (titleId == StringId.Lights)
+            //{
+            //    Action action = () => {
+            //        var skipView = new AddLightScene(new List<Function>(),new Scene() { sceneType = SceneType.LightScene});
+            //        MainPage.BasePageView.AddChidren(skipView);
+            //        skipView.LoadPage();
+            //        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            //    };
+            //    new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView_LightFunction(action);
+            //}
+            //else
+            {
+                new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
+            }
             /// <summary>
             /// 鎴块棿鍐呭鏄剧ず鍖哄煙
             /// </summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
index bfa25c1..57fe38e 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/FhControlPage.cs
@@ -183,11 +183,13 @@
                     UnSelectedImagePath = fhTemp.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode))
                 };
                 FrameWhiteCentet1.AddChidren(btnMode);
-
-                btnMode.MouseUpEventHandler = (sender, e) =>
+                if (device.GetAttribute(FunctionAttributeKey.Mode).value.Count > 1)
                 {
-                    LoadDiv_ChangeModeView();
-                };
+                    btnMode.MouseUpEventHandler = (sender, e) =>
+                    {
+                        LoadDiv_ChangeModeView();
+                    };
+                }
             }
 
             btnSwitch = new Button()
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs
index 0607b30..7c9b864 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs
@@ -25,6 +25,12 @@
         /// 绐楀笜鍔ㄦ�佹帶浠�
         /// </summary>
         CurtainSeekBarOn curtainSeekBar;
+        /// <summary>
+        /// 杩涘害鍊�
+        /// </summary>
+        Button btnProgress;
+
+
         ///// <summary>
         ///// 绐楀笜杩涘害鍑忓皯鎸夐挳
         ///// </summary>
@@ -134,6 +140,17 @@
             //    controlView.AddChidren(btnCollection);
             //}
 
+
+            btnProgress = new Button() {
+                Y = Application.GetRealHeight(80),
+                Height = Application.GetRealHeight(50),
+                TextSize = CSS_FontSize.TextFontSize,
+                TextColor = CSS_Color.PromptingColor1,
+                Text = curtainTemp.GetPercent(function).ToString() + "%",
+            };
+            controlView.AddChidren(btnProgress);
+
+
             curtainSeekBar = new CurtainSeekBarOn()
             {
                 Gravity = Gravity.CenterHorizontal,
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
index 95a00e3..af394c5 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -53,6 +53,7 @@
             //杩愯鏂瑰悜 鎵撳紑锛堝姞杩涘害锛夛細鍏抽棴锛堝噺杩涘害锛�
             bool runningDirection = progress > curtainSeekBar.Progress;
             int curBarProgress = curtainSeekBar.Progress;
+            btnProgress.Text = progress + "%";
             new System.Threading.Thread(() =>
             {
                 try
@@ -228,8 +229,9 @@
             //    DriverLayer.Control.Ins.SendWriteCommand(function, d);
             //};
 
-            //curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
-            //{
+            curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
+            {
+                btnProgress.Text = curtainSeekBar.Progress + "%";
             //    controlBar.Progress = curtainSeekBar.Progress;
             //    new System.Threading.Thread(() =>
             //    {
@@ -243,9 +245,10 @@
             //        }
             //    })
             //    { IsBackground = true }.Start();
-            //};
+            };
             curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
             {
+            btnProgress.Text = curtainSeekBar.Progress + "%";
                 //controlBar.Progress = curtainSeekBar.Progress;
                 new System.Threading.Thread(() =>
                 {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
index 933ffc9..3bbabed 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
@@ -26,18 +26,18 @@
         /// 绐楀笜鍔ㄦ�佹帶浠�
         /// </summary>
         CurtainRollSeekBarOn curtainSeekBar;
-        /// <summary>
-        /// 绐楀笜杩涘害鍑忓皯鎸夐挳
-        /// </summary>
-        Button btnMinusSignIcon;
-        /// <summary>
-        /// 绐楀笜杩涘害澧炲姞鎸夐挳
-        /// </summary>
-        Button btnPlusSgnIcon;
-        /// <summary>
-        /// 绐楀笜婊戝姩鎺у埗
-        /// </summary>
-        DiyImageSeekBar controlBar;
+        ///// <summary>
+        ///// 绐楀笜杩涘害鍑忓皯鎸夐挳
+        ///// </summary>
+        //Button btnMinusSignIcon;
+        ///// <summary>
+        ///// 绐楀笜杩涘害澧炲姞鎸夐挳
+        ///// </summary>
+        //Button btnPlusSgnIcon;
+        ///// <summary>
+        ///// 绐楀笜婊戝姩鎺у埗
+        ///// </summary>
+        //DiyImageSeekBar controlBar;
         /// <summary>
         /// 绐楀笜鍏抽棴鎸夐挳
         /// </summary>
@@ -50,6 +50,10 @@
         /// 绐楀笜鎵撳紑鎸夐挳
         /// </summary>
         Button btnCurtainOpen;
+        /// <summary>
+        /// 杩涘害鍊�
+        /// </summary>
+        Button btnProgress;
         #endregion
 
         #region 鍖哄煙鍙橀噺
@@ -134,6 +138,17 @@
             //    controlView.AddChidren(btnCollection);
             //}
 
+
+            btnProgress = new Button()
+            {
+                Y = Application.GetRealHeight(80),
+                Height = Application.GetRealHeight(50),
+                TextSize = CSS_FontSize.TextFontSize,
+                TextColor = CSS_Color.PromptingColor1,
+                Text = curtainTemp.GetPercent(function).ToString() + "%",
+            };
+            controlView.AddChidren(btnProgress);
+
             curtainSeekBar = new CurtainRollSeekBarOn()
             {
                 Gravity = Gravity.CenterHorizontal,
@@ -146,54 +161,54 @@
             };
             controlView.AddChidren(curtainSeekBar);
 
-            btnMinusSignIcon = new Button()
-            {
-                Y = Application.GetRealHeight(406),
-                Width = Application.GetRealWidth(52),
-                Height = Application.GetMinRealAverage(24),
-                TextAlignment = TextAlignment.CenterRight,
-                TextID = StringId.PullOpen,
-                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
-                TextColor = CSS_Color.PromptingColor1,
-                Visible = false,
-                Enable = false,
-            };
-            controlView.AddChidren(btnMinusSignIcon);
+            //btnMinusSignIcon = new Button()
+            //{
+            //    Y = Application.GetRealHeight(406),
+            //    Width = Application.GetRealWidth(52),
+            //    Height = Application.GetMinRealAverage(24),
+            //    TextAlignment = TextAlignment.CenterRight,
+            //    TextID = StringId.PullOpen,
+            //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+            //    TextColor = CSS_Color.PromptingColor1,
+            //    Visible = false,
+            //    Enable = false,
+            //};
+            //controlView.AddChidren(btnMinusSignIcon);
 
-            controlBar = new DiyImageSeekBar()
-            {
-                X = btnMinusSignIcon.Right,
-                Y = Application.GetRealHeight(391),//414,璁捐鏁版嵁
-                Width = Application.GetRealWidth(220),
-                Height = Application.GetRealHeight(54),
-                SeekBarViewHeight = Application.GetRealHeight(8),
-                ThumbImagePath = "Public/ThumbImage.png",
-                ThumbImageHeight = Application.GetRealHeight(54),
-                ProgressBarColor = CSS_Color.MainColor,
-                ProgressTextColor = CSS_Color.FirstLevelTitleColor,
-                ProgressTextSize = 0x00000000,
-                MaxValue = 100,
-                SeekBarPadding = Application.GetRealWidth(20),
-                Progress = curtainTemp.GetPercent(function),
-                Visible = false,
-                Enable = false,
-            };
-            controlView.AddChidren(controlBar);
+            //controlBar = new DiyImageSeekBar()
+            //{
+            //    X = btnMinusSignIcon.Right,
+            //    Y = Application.GetRealHeight(391),//414,璁捐鏁版嵁
+            //    Width = Application.GetRealWidth(220),
+            //    Height = Application.GetRealHeight(54),
+            //    SeekBarViewHeight = Application.GetRealHeight(8),
+            //    ThumbImagePath = "Public/ThumbImage.png",
+            //    ThumbImageHeight = Application.GetRealHeight(54),
+            //    ProgressBarColor = CSS_Color.MainColor,
+            //    ProgressTextColor = CSS_Color.FirstLevelTitleColor,
+            //    ProgressTextSize = 0x00000000,
+            //    MaxValue = 100,
+            //    SeekBarPadding = Application.GetRealWidth(20),
+            //    Progress = curtainTemp.GetPercent(function),
+            //    Visible = false,
+            //    Enable = false,
+            //};
+            //controlView.AddChidren(controlBar);
 
-            btnPlusSgnIcon = new Button()
-            {
-                X = Application.GetRealWidth(286),
-                Y = Application.GetRealHeight(406),
-                Width = Application.GetRealWidth(62),
-                Height = Application.GetRealWidth(24),
-                TextID = StringId.Shut,
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
-                TextColor = CSS_Color.PromptingColor1,
-                Visible = false,
-                Enable = false,
-            };
-            controlView.AddChidren(btnPlusSgnIcon);
+            //btnPlusSgnIcon = new Button()
+            //{
+            //    X = Application.GetRealWidth(286),
+            //    Y = Application.GetRealHeight(406),
+            //    Width = Application.GetRealWidth(62),
+            //    Height = Application.GetRealWidth(24),
+            //    TextID = StringId.Shut,
+            //    TextAlignment = TextAlignment.CenterLeft,
+            //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+            //    TextColor = CSS_Color.PromptingColor1,
+            //    Visible = false,
+            //    Enable = false,
+            //};
+            //controlView.AddChidren(btnPlusSgnIcon);
 
             btnCurtainClose = new Button()
             {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
index 3405938..a1a2aa8 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
@@ -50,6 +50,7 @@
             //杩愯鏂瑰悜 鎵撳紑锛堝姞杩涘害锛夛細鍏抽棴锛堝噺杩涘害锛�
             bool runningDirection = progress > curtainSeekBar.Progress;
             int curBarProgress = curtainSeekBar.Progress;
+            btnProgress.Text = progress + "%";
             new System.Threading.Thread(() =>
             {
                 try
@@ -185,23 +186,23 @@
                 CurtainAnimation(100);
             };
 
-            btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
-            {
-                controlBar.Progress -= 1;
-                function.SetAttrState(FunctionAttributeKey.Percent, controlBar.Progress);
-                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
-                d.Add(FunctionAttributeKey.Percent, controlBar.Progress.ToString());
-                DriverLayer.Control.Ins.SendWriteCommand(function, d);
-            };
+            //btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
+            //{
+            //    controlBar.Progress -= 1;
+            //    function.SetAttrState(FunctionAttributeKey.Percent, controlBar.Progress);
+            //    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+            //    d.Add(FunctionAttributeKey.Percent, controlBar.Progress.ToString());
+            //    DriverLayer.Control.Ins.SendWriteCommand(function, d);
+            //};
 
-            btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
-            {
-                controlBar.Progress += 1;
-                function.SetAttrState(FunctionAttributeKey.Percent, controlBar.Progress);
-                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
-                d.Add(FunctionAttributeKey.Percent, controlBar.Progress.ToString());
-                DriverLayer.Control.Ins.SendWriteCommand(function, d);
-            };
+            //btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
+            //{
+            //    controlBar.Progress += 1;
+            //    function.SetAttrState(FunctionAttributeKey.Percent, controlBar.Progress);
+            //    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+            //    d.Add(FunctionAttributeKey.Percent, controlBar.Progress.ToString());
+            //    DriverLayer.Control.Ins.SendWriteCommand(function, d);
+            //};
 
 
             btnCurtainStop.MouseDownEventHandler = (sender, e) =>
@@ -242,7 +243,8 @@
             //};
             curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
             {
-                controlBar.Progress = curtainSeekBar.Progress;
+                //controlBar.Progress = curtainSeekBar.Progress;
+                btnProgress.Text = curtainSeekBar.Progress + "%";
                 new System.Threading.Thread(() =>
                 {
                     function.SetAttrState(FunctionAttributeKey.Percent, e);
@@ -254,36 +256,37 @@
                 { IsBackground = true }.Start();
             };
 
-            //controlBar.OnProgressChangedEvent = (sender, e) =>
+            curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
+            {
+                btnProgress.Text = curtainSeekBar.Progress + "%";
+                //    new System.Threading.Thread(() =>
+                //    {
+                //        if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
+                //        {
+                //            function.percent = e;
+                //            function.refreshTime = DateTime.Now;
+                //            System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+                //            d.Add("percent", function.percent.ToString());
+                //            Control.SendWriteCommand(function, d);
+                //        }
+                //    })
+                //    { IsBackground = true }.Start();
+            };
+
+            //controlBar.OnStopTrackingTouchEvent = (sender, e) =>
             //{
             //    curtainSeekBar.Progress = controlBar.Progress;
+            //    btnProgress.Text = curtainSeekBar.Progress + "%";
             //    new System.Threading.Thread(() =>
             //    {
-            //        if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
-            //        {
-            //            function.percent = e;
-            //            function.refreshTime = DateTime.Now;
-            //            System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
-            //            d.Add("percent", function.percent.ToString());
-            //            Control.SendWriteCommand(function, d);
-            //        }
+            //        function.SetAttrState(FunctionAttributeKey.Percent, e);
+            //        function.refreshTime = DateTime.Now;
+            //        System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+            //        d.Add("percent", e.ToString());
+            //        DriverLayer.Control.Ins.SendWriteCommand(function, d);
             //    })
             //    { IsBackground = true }.Start();
             //};
-
-            controlBar.OnStopTrackingTouchEvent = (sender, e) =>
-            {
-                curtainSeekBar.Progress = controlBar.Progress;
-                new System.Threading.Thread(() =>
-                {
-                    function.SetAttrState(FunctionAttributeKey.Percent, e);
-                    function.refreshTime = DateTime.Now;
-                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
-                    d.Add("percent", e.ToString());
-                    DriverLayer.Control.Ins.SendWriteCommand(function, d);
-                })
-                { IsBackground = true }.Start();
-            };
 
         }
     }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
index 8137029..0afbced 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchPage.cs
@@ -34,6 +34,13 @@
         /// 寮�鍏虫寜閽�
         /// </summary>
         Button btnSwitch;
+
+
+        /// <summary>
+        /// 杩愯鐘舵��-鍔ㄦ�佸姞杞�
+        /// </summary>
+        Button btnRunStatus;
+
         #endregion
 
         #region 鍖哄煙鍙橀噺
@@ -74,7 +81,6 @@
                 btnFromFloor_Out = btnFromFloorOut;
             }
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-            //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), function);
 
             controlView = new FrameLayout()
             {
@@ -136,6 +142,62 @@
             };
             controlView.AddChidren(btnSwitchIcon);
 
+            //杩愯鐘舵��
+            if(function.GetAttribute("run_status")!= null)
+            {
+
+                btnRunStatus = new Button()
+                {
+                    Y = Application.GetRealHeight(300),
+                    Height = Application.GetRealHeight(58),
+                    TextAlignment = TextAlignment.Center,
+                    TextSize = CSS_FontSize.TextFontSize,
+                };
+                controlView.AddChidren(btnRunStatus);
+                UpdataRunStatus();
+            }
+
+            if (function.GetAttribute("power")!= null)
+            {
+                Button btnEnergyIcon = new Button()
+                {
+                    Y = Application.GetRealHeight(377),
+                    Gravity = Gravity.CenterHorizontal,
+                    Width = Application.GetRealWidth(32),
+                    Height = Application.GetRealWidth(32),
+                    UnSelectedImagePath = "FunctionIcon/Electrical/AirSwitch/EnergyIcon.png"
+                };
+                controlView.AddChidren(btnEnergyIcon);
+
+
+                Button btnEnergyText = new Button()
+                {
+                    Y = Application.GetRealHeight(400),
+                    Gravity = Gravity.CenterHorizontal,
+                    Height = Application.GetRealWidth(47),
+                    TextAlignment = TextAlignment.Center,
+                    TextID = StringId.EnergyMonitoring,
+                    TextColor = CSS_Color.TextualColor,
+                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                };
+                controlView.AddChidren(btnEnergyText);
+
+                EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
+                    var skipView = new EnergyMainPage();
+                    MainPage.BasePageView.AddChidren(skipView);
+                    skipView.LoadPage();
+                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                };
+                btnEnergyIcon.MouseUpEventHandler = eventHandler;
+                btnEnergyText.MouseUpEventHandler = eventHandler;
+
+
+
+            }
+
+
+
+
             btnSwitch = new Button()
             {
                 Gravity = Gravity.CenterHorizontal,
@@ -148,7 +210,7 @@
             };
             controlView.AddChidren(btnSwitch);
 
-            new TopViewDiv(bodyView, Language.StringByID(StringId.Electric)).LoadTopView_FunctionTop(function, actionRefresh);
+            new TopViewDiv(bodyView, Language.StringByID(StringId.Electric)).LoadTopView_FunctionTop(function, actionRefresh,false);
             new System.Threading.Thread(() =>
             {
                 DriverLayer.Control.Ins.SendReadCommand(function);
@@ -177,6 +239,10 @@
                     {
                         bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on";
                     }
+                    if(updataTemp.GetAttribute("run_status")!=null)
+                    {
+                        bodyView.UpdataRunStatus();
+                    }
                 }
                 catch (Exception ex)
                 {
@@ -185,6 +251,138 @@
             });
         }
         /// <summary>
+        /// 鏇存柊杩愯鐘舵��
+        /// </summary>
+        void UpdataRunStatus()
+        {
+            if (btnRunStatus == null)
+                return;
+            var runStatus = function.GetAttrState("run_status");
+            if (Language.CurrentLanguage == "Chinese")
+            {
+                switch (runStatus)
+                {
+                    //* RUN:姝e父宸ヤ綔涓�
+                    case "RUN":
+                        btnRunStatus.Text = "宸ヤ綔涓�";
+                        btnRunStatus.TextColor = CSS_Color.MainColor;
+                        break;
+                    //* HV:杩囧帇棰勮
+                    case "HV":
+                        btnRunStatus.Text = "杩囧帇棰勮";
+                        btnRunStatus.TextColor = 0xFFFC9C04;
+                        break;
+                    //* LV:娆犲帇棰勮
+                    case "LV":
+                        btnRunStatus.Text = "娆犲帇棰勮";
+                        btnRunStatus.TextColor = 0xFFFC9C04;
+                        break;
+                    //* HC:杩囨祦棰勮
+                    case "HC":
+                        btnRunStatus.Text = "杩囨祦棰勮";
+                        btnRunStatus.TextColor = 0xFFFC9C04;
+                        break;
+                    //* HT:杩囨俯棰勮
+                    case "HT":
+                        btnRunStatus.Text = "杩囨俯棰勮";
+                        btnRunStatus.TextColor = 0xFFFC9C04;
+                        break;
+                    //* LEAK:婕忕數棰勮
+                    case "LEAK":
+                        btnRunStatus.Text = "婕忕數棰勮";
+                        btnRunStatus.TextColor = 0xFFFC9C04;
+                        break;
+                    //* ERR_HV:杩囧帇鎶ヨ
+                    case "ERR_HV":
+                        btnRunStatus.Text = "杩囧帇鎶ヨ";
+                        btnRunStatus.TextColor = 0xFFFF8080;
+                        break;
+                    //* ERR_LV:娆犲帇鎶ヨ
+                    case "ERR_LV":
+                        btnRunStatus.Text = "娆犲帇鎶ヨ";
+                        btnRunStatus.TextColor = 0xFFFF8080;
+                        break;
+                    //* ERR_HC:杩囨祦鎶ヨ
+                    case "ERR_HC":
+                        btnRunStatus.Text = "杩囨祦鎶ヨ";
+                        btnRunStatus.TextColor = 0xFFFF8080;
+                        break;
+                    //* ERR_HT:杩囨俯鎶ヨ
+                    case "ERR_HT":
+                        btnRunStatus.Text = "杩囨俯鎶ヨ";
+                        btnRunStatus.TextColor = 0xFFFF8080;
+                        break;
+                    //* ERR_LEAK:婕忕數鎶ヨ
+                    case "ERR_LEAK":
+                        btnRunStatus.Text = "婕忕數鎶ヨ";
+                        btnRunStatus.TextColor = 0xFFFF8080;
+                        break;
+                }
+            }
+            else
+            {
+                switch (runStatus)
+                {
+                    //* RUN:姝e父宸ヤ綔涓�
+                    case "RUN":
+                        btnRunStatus.Text = "At work";
+                        btnRunStatus.TextColor = CSS_Color.MainColor;
+                        break;
+                    //* HV:杩囧帇棰勮
+                    case "HV":
+                        btnRunStatus.Text = "Overvoltage warning";
+                        btnRunStatus.TextColor = 0xFFFC9C04;
+                        break;
+                    //* LV:娆犲帇棰勮
+                    case "LV":
+                        btnRunStatus.Text = "Undervoltage warning";
+                        btnRunStatus.TextColor = 0xFFFC9C04;
+                        break;
+                    //* HC:杩囨祦棰勮
+                    case "HC":
+                        btnRunStatus.Text = "Overcurrent warning";
+                        btnRunStatus.TextColor = 0xFFFC9C04;
+                        break;
+                    //* HT:杩囨俯棰勮
+                    case "HT":
+                        btnRunStatus.Text = "Overtemperature warning";
+                        btnRunStatus.TextColor = 0xFFFC9C04;
+                        break;
+                    //* LEAK:婕忕數棰勮
+                    case "LEAK":
+                        btnRunStatus.Text = "Leakage warning";
+                        btnRunStatus.TextColor = 0xFFFC9C04;
+                        break;
+                    //* ERR_HV:杩囧帇鎶ヨ
+                    case "ERR_HV":
+                        btnRunStatus.Text = "Overvoltage alarm";
+                        btnRunStatus.TextColor = 0xFFFF8080;
+                        break;
+                    //* ERR_LV:娆犲帇鎶ヨ
+                    case "ERR_LV":
+                        btnRunStatus.Text = "Undervoltage alarm";
+                        btnRunStatus.TextColor = 0xFFFF8080;
+                        break;
+                    //* ERR_HC:杩囨祦鎶ヨ
+                    case "ERR_HC":
+                        btnRunStatus.Text = "Overcurrent alarm";
+                        btnRunStatus.TextColor = 0xFFFF8080;
+                        break;
+                    //* ERR_HT:杩囨俯鎶ヨ
+                    case "ERR_HT":
+                        btnRunStatus.Text = "Overtemperature alarm";
+                        btnRunStatus.TextColor = 0xFFFF8080;
+                        break;
+                    //* ERR_LEAK:婕忕數鎶ヨ
+                    case "ERR_LEAK":
+                        btnRunStatus.Text = "Leakage alarm";
+                        btnRunStatus.TextColor = 0xFFFF8080;
+                        break;
+                }
+            }
+        }
+
+        /// <summary>
         /// 鍔犺浇浜嬩欢鍒楄〃
         /// </summary>
         void LoadEventList()
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
index a728cbc..aca8e0a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -83,7 +83,10 @@
         public EnergyMainPage()
         {
             bodyView = this;
-            energyList = FunctionList.List.GetEnergyList(); 
+            energyList = FunctionList.List.GetEnergyList();
+            var breaker = FunctionList.List.Functions.FindAll((obj) => obj.spk == SPK.AirSwitch);
+            var energyBreker = breaker.FindAll((obj) => obj.GetAttribute("power") != null);
+            energyList.AddRange(energyBreker);
         }
 
         /// <summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
index b5d660b..7c78d90 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
@@ -67,7 +67,11 @@
             {
                 btnLocationInfoRight.MouseUpEventHandler = eventHandler;
             }
-            btnLocationValues.MouseUpEventHandler = eventHandler;
+            if (btnLocationValues != null)
+            {
+                btnLocationValues.MouseUpEventHandler = eventHandler;
+            }
+                
         }
     }
 }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
index c0e7a94..bee290a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPage.cs
@@ -41,7 +41,7 @@
         /// <summary>
         /// 鑹叉俯鐨勬粦鍔ㄦ帶浠�
         /// </summary>
-        SeekBarControl barColorTemplatrue;
+        CCTSeekBarControl barColorTemplatrue;
         /// <summary>
         /// 寮�鍏虫寜閽�
         /// </summary>
@@ -205,7 +205,7 @@
             btnColorTemplatrueBack.UnSelectedImagePath = "FunctionIcon/Light/ColorTemperatureBar.png";
             controlView.AddChidren(btnColorTemplatrueBack);
             //婊戝姩鏉℃帶浠�
-            barColorTemplatrue = new SeekBarControl();
+            barColorTemplatrue = new CCTSeekBarControl();
             barColorTemplatrue.X = btnTempClolorMin.Right;
             barColorTemplatrue.Y = Application.GetRealHeight(340);
             barColorTemplatrue.MinValue = 27;
@@ -537,11 +537,12 @@
                 btnReadIcon.IsSelected = true;
             }
         }
-
-        /// <summary>
-        /// 宸﹀彸婊戝姩鐨勮繘搴︽潯鎺т欢
-        /// </summary>
-        private class SeekBarControl : DiyImageSeekBar
+    }
+
+    /// <summary>
+    /// 宸﹀彸婊戝姩鐨勮繘搴︽潯鎺т欢
+    /// </summary>
+    public class CCTSeekBarControl : DiyImageSeekBar
         {
             #region 鈻� 鍙橀噺澹版槑___________________________
 
@@ -649,7 +650,7 @@
             /// 宸﹀彸婊戝姩鐨勮繘搴︽潯鎺т欢
             /// </summary>
             /// <param name="i_width">瀹藉害,闈炵湡瀹炲��</param>
-            public SeekBarControl(int i_width = 210)
+            public CCTSeekBarControl(int i_width = 210)
             {
                 this.Width = Application.GetRealWidth(i_width);
                 this.Height = Application.GetRealHeight(54);
@@ -773,5 +774,4 @@
 
             #endregion
         }
-    }
 }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
index e5aba0b..3822475 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
@@ -27,18 +27,19 @@
         static VerticalScrolViewLayout functionListView;
         #endregion
 
-        List<Function> functionList;
-
-        public AddLightScene()
+        List<Function> sceneLishtList;
+        Scene lightScene;
+        public AddLightScene(List<Function> functions,Scene scene)
         {
             bodyView = this;
-            functionList = new List<Function>();
+            sceneLishtList = functions;
+            lightScene = scene;
         }
 
-        public void LoadPage(int titleId)
+        public void LoadPage()
         {
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
+            new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView();
 
             /// <summary>
             /// 鎴块棿鍐呭鏄剧ず鍖哄煙
@@ -81,10 +82,615 @@
             };
             bodyView.AddChidren(functionListView);
 
-                functionList.AddRange(FunctionList.List.GetLightList());
+            var lightList = FunctionList.List.GetLightList();
+
+            foreach (var function in lightList)
+            {
+                var functionDiv = new LightRow(function)
+                {
+                    Gravity = Gravity.CenterHorizontal,
+                    Width = Application.GetRealWidth(343),
+                    Height = Application.GetRealHeight(62),
+                    Radius = (uint)Application.GetMinRealAverage(12),
+                    BorderColor = 0x00FFFFFF,
+                    BorderWidth = 1,
+                    BackgroundColor = CSS_Color.MainBackgroundColor,
+                    Tag = function.spk + function.sid
+                };
+                functionDiv.LoadDiv(sceneLishtList);
+                functionListView.AddChidren(functionDiv);
+
+                functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(12) });
+            }
 
 
+            #region 搴曢儴view
+            var bottomView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(591),
+                Height = Application.GetRealHeight(100),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+                Radius = (uint)Application.GetRealWidth(12),
+            };
+            this.AddChidren(bottomView);
+
+            var btnConfrim = new Button()
+            {
+                Y = Application.GetRealHeight(12),
+                Gravity = Gravity.CenterHorizontal,
+                Width = Application.GetRealWidth(220),
+                Height = Application.GetRealHeight(44),
+                Radius = (uint)Application.GetRealHeight(22),
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS_Color.MainBackgroundColor,
+                BackgroundColor = CSS_Color.MainColor,
+                TextID = StringId.Confirm,
+            };
+            bottomView.AddChidren(btnConfrim);
+            btnConfrim.MouseUpEventHandler = (sender, e) => {
+                var lightSceneDialog = new LightSceneEditDialog(sceneLishtList,lightScene);
+                lightSceneDialog.ShowDialog();
+            };
+
+            #endregion
         }
 
     }
+
+
+    public class LightRow : FrameLayout
+    {
+        #region 鍖哄煙鎺т欢
+        static FrameLayout bodyDiv;
+        /// <summary>
+        /// 鍔熻兘/鍦烘櫙icon
+        /// </summary>
+        Button btnIcon;
+        /// <summary>
+        /// 鍔熻兘鍚嶇О/鍦烘櫙鍚嶇О
+        /// </summary>
+        Button btnName;
+        /// <summary>
+        /// 妤煎眰淇℃伅鏄剧ず鎸夐挳
+        /// </summary>
+        Button btnFromFloor;
+        /// <summary>
+        /// 閫変腑鎸夐挳
+        /// </summary>
+        Button btnSelect;
+        #endregion
+
+        #region 鍖哄煙鍙橀噺
+        Function function;
+        #endregion
+        public LightRow(Function func)
+        {
+            bodyDiv = this;
+            bodyDiv.Tag = func.sid;
+            function = func;
+        }
+
+
+        /// <summary>
+        /// 鍔犺浇鎺у埗鍗$墖鍖哄煙
+        /// </summary>
+        public void LoadDiv(List<Function> functions)
+        {
+            btnIcon = new Button()
+            {
+                X = Application.GetRealWidth(10),
+                Y = Application.GetRealHeight(15),
+                Width = Application.GetRealWidth(32),
+                Height = Application.GetRealWidth(32),
+                UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"
+            };
+            bodyDiv.AddChidren(btnIcon);
+
+            btnName = new Button()
+            {
+                X = Application.GetRealWidth(8 + 10 + 32),
+                Y = Application.GetRealHeight(10),
+                Width = Application.GetRealWidth(200),
+                Height = Application.GetRealHeight(24),
+                Text = function.name,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.TextFontSize,
+            };
+            bodyDiv.AddChidren(btnName);
+
+            btnFromFloor = new Button()
+            {
+                X = Application.GetRealWidth(8 + 10 + 32),
+                Y = Application.GetRealHeight(10 + 24),
+                Width = Application.GetRealWidth(200),
+                Height = Application.GetRealHeight(18),
+                Text = function.GetRoomListName(),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.PromptingColor1,
+                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+            };
+            bodyDiv.AddChidren(btnFromFloor);
+
+            btnSelect = new Button()
+            {
+                X = Application.GetRealWidth(303),
+                Gravity = Gravity.CenterVertical,
+                Width = Application.GetRealWidth(32),
+                Height = Application.GetRealWidth(32),
+                UnSelectedImagePath = "FunctionIcon/Light/LightScene/CheckIcon.png",
+                SelectedImagePath = "FunctionIcon/Light/LightScene/CheckOnIcon.png",
+                IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null
+            };
+            bodyDiv.AddChidren(btnSelect);
+            
+            btnSelect.MouseUpEventHandler = (sender, e) => {
+                btnSelect.IsSelected = !btnSelect.IsSelected;
+                if(btnSelect.IsSelected)
+                {
+                    var addTemp = functions.Find((obj) => obj.deviceId == function.deviceId);
+                    if (addTemp == null)
+                    {
+                        functions.Add(function);
+                    }
+                }
+                else
+                {
+                    var removeTemp = functions.Find((obj) => obj.deviceId == function.deviceId);
+                    if (removeTemp != null)
+                    {
+                        functions.Remove(removeTemp);
+                    }
+                }
+            };
+
+        }
+
+
+    }
+
+    /// <summary>
+    /// 鐏厜鍦烘櫙缂栬緫寮圭獥
+    /// </summary>
+    public class LightSceneEditDialog :Dialog
+    {
+        List<Function> lights;
+
+        Scene editScene;
+
+        public LightSceneEditDialog(List<Function> functions,Scene scene)
+        {
+            lights = functions;
+            editScene = scene;
+        }
+
+
+        public void ShowDialog()
+        {
+            var hadDimming = lights.Find((obj) => obj.spk == SPK.LightDimming) != null;
+            var hadCCT = lights.Find((obj) => obj.spk == SPK.LightCCT) != null;
+            var hadRGB = lights.Find((obj) => obj.spk == SPK.LightRGB) != null;
+
+            var bodyView = new FrameLayout();
+            this.AddChidren(bodyView);
+            bodyView.MouseUpEventHandler = (sender, e) => {
+                this.Close();
+            };
+
+            var contentView = new FrameLayout() {
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+                Width = Application.GetRealWidth(343),
+                Radius = (uint)Application.GetRealWidth(12),
+            };
+            bodyView.AddChidren(contentView);
+
+            #region 鏍囬鍖�
+            bool inEdit = false;//鏄惁鍦ㄧ紪杈戞爣棰�
+            var titleView = new FrameLayout()
+            {
+                Width = Application.GetRealWidth(343),
+                Height = Application.GetRealHeight(52),
+            };
+            contentView.AddChidren(titleView);
+
+            var btnTitle = new Button()
+            {
+                Height = Application.GetRealHeight(52),
+                Gravity = Gravity.Center,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                TextColor = CSS_Color.MainColor,
+                TextID = StringId.CombinedDimming,
+                TextAlignment = TextAlignment.Center,
+            };
+            if (btnTitle.GetTextWidth() > Application.GetRealWidth(197))//247
+            {
+                btnTitle.Width = Application.GetRealWidth(197);
+                btnTitle.IsMoreLines = true;
+            }
+            else
+            {
+                btnTitle.Width = btnTitle.GetTextWidth()+ Application.GetRealWidth(10);
+                btnTitle.IsMoreLines = false;
+            }
+            titleView.AddChidren(btnTitle);
+
+            var btnEditIcon = new Button()
+            {
+                Width = Application.GetRealWidth(24),
+                Height = Application.GetRealWidth(24),
+                X = Application.GetRealWidth(12) + btnTitle.Right,
+                Gravity = Gravity.CenterVertical,
+                UnSelectedImagePath = "Public/Edit.png",
+                SelectedImagePath = "Public/HookIcon.png"
+            };
+            titleView.AddChidren(btnEditIcon);
+
+            EventHandler<MouseEventArgs> dd = (sender, e) =>
+            {
+                inEdit = !inEdit;
+                btnEditIcon.IsSelected = inEdit;
+
+                if (inEdit)
+                {
+                    btnTitle.Width = btnTitle.GetTextWidth();
+                }
+                else
+                {
+                    if (btnTitle.GetTextWidth() > Application.GetRealWidth(197))//247
+                    {
+                        btnTitle.Width = Application.GetRealWidth(197);
+                    }
+                    else
+                    {
+                        btnTitle.Width = btnTitle.GetTextWidth();
+                    }
+                    editScene.name = btnTitle.Text.Trim();
+                }
+            };
+            btnTitle.MouseUpEventHandler = dd;
+            btnEditIcon.MouseUpEventHandler = dd;
+
+            titleView.AddChidren(new Button() { Height = 1, BackgroundColor = CSS_Color.DividingLineColor, Y = Application.GetRealHeight(51) });
+
+            #endregion
+
+
+            var dimmingLight = editScene.functions.Find((obj) => obj.localFunction.spk == SPK.LightDimming);
+            var cctLight = editScene.functions.Find((obj) => obj.localFunction.spk == SPK.LightCCT);
+            var rgbLight = editScene.functions.Find((obj) => obj.localFunction.spk == SPK.LightRGB);
+            var brightnessValue = 0;
+            var cctValue = 27;
+            if (cctLight != null)
+            {
+                int.TryParse(cctLight.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness).value, out brightnessValue);
+                int.TryParse(cctLight.status.Find((obj) => obj.key == FunctionAttributeKey.CCT).value, out cctValue);
+            }
+
+
+            //灞炴�ц缃尯鍩�
+            var attrView = new VerticalScrolViewLayout()
+            {
+                Y = Application.GetRealHeight(52),
+                Width = Application.GetRealWidth(343),
+            };
+            //灞炴�ц缃尯鍩熼珮搴�
+            int attrViewHight = Application.GetRealHeight(27 + 22);
+            attrView.AddChidren(new Button() { Height = Application.GetRealHeight(27) });
+
+            if (hadDimming)
+            {
+                attrViewHight += Application.GetRealHeight(54 + 11);
+                var dimmingView = new FrameLayout();
+                attrView.AddChidren(dimmingView);
+
+
+                #region 浜害璋冭妭
+                var btnBrightnessText = new Button()
+                {
+                    X = Application.GetRealWidth(35),
+                    Y = Application.GetRealHeight(1),
+                    Width = Application.GetRealWidth(224),
+                    Height = Application.GetRealHeight(21),
+                    TextAlignment = TextAlignment.CenterLeft,
+                    TextColor = CSS_Color.FirstLevelTitleColor,
+                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                    TextID = StringId.Brightness,
+                    BackgroundColor = 0xFFFF0000
+                };
+                dimmingView.AddChidren(btnBrightnessText);
+
+                var btnMinValuesText = new Button()
+                {
+                    X = Application.GetRealWidth(35),
+                    Y = btnBrightnessText.Bottom,
+                    Width = Application.GetRealWidth(30),
+                    Height = Application.GetRealHeight(21),
+                    Text = "0%",
+                    TextAlignment = TextAlignment.CenterLeft,
+                    TextColor = CSS_Color.PromptingColor1,
+                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                };
+                dimmingView.AddChidren(btnMinValuesText);
+
+                var dimmerBar = new DiyImageSeekBar()
+                {
+                    X = Application.GetRealWidth(35 + 22),
+                    Y = Application.GetRealHeight(11),
+                    Width = Application.GetRealWidth(210),
+                    Height = Application.GetRealHeight(54),
+                    SeekBarViewHeight = Application.GetRealHeight(8),
+                    ThumbImagePath = "Public/ThumbImage.png",
+                    ThumbImageHeight = Application.GetRealHeight(54),
+                    ProgressTextColor = CSS_Color.FirstLevelTitleColor,
+                    ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                    ProgressBarColor = CSS_Color.AuxiliaryColor1,
+                    MaxValue = 100,
+                    Progress = brightnessValue,
+                    SeekBarPadding = Application.GetRealWidth(20),
+                };
+                //dimmingView.AddChidren(dimmerBar);
+
+                var btnMaxValuesText = new Button()
+                {
+                    X = dimmerBar.Right,
+                    Y = btnBrightnessText.Bottom,
+                    Width = Application.GetRealWidth(45),
+                    Height = Application.GetRealHeight(21),
+                    Text = "100%",
+                    TextAlignment = TextAlignment.CenterLeft,
+                    TextColor = CSS_Color.PromptingColor1,
+                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                };
+                dimmingView.AddChidren(btnMaxValuesText);
+                #endregion
+
+
+            }
+
+            attrView.Height = attrViewHight;
+            contentView.AddChidren(attrView);
+            contentView.Height = Application.GetRealHeight(52 + 44) + attrViewHight;
+            contentView.Gravity = Gravity.Center;
+
+
+
+
+            #region bottom View
+            var bottomView = new FrameLayout()
+            {
+                Y = Application.GetRealHeight(52) + attrViewHight,
+                Height = Application.GetRealHeight(44),
+            };
+            contentView.AddChidren(bottomView);
+
+            var btnSave = new Button()
+            {
+                Width = Application.GetRealWidth(172),
+                Height = Application.GetRealHeight(44),
+                TextAlignment = TextAlignment.Center,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                TextColor = CSS_Color.TextualColor,
+                TextID = StringId.Save,
+            };
+            bottomView.AddChidren(btnSave);
+
+            var btnComplete = new Button()
+            {
+                X = Application.GetRealWidth(172),
+                Width = Application.GetRealWidth(172),
+                Height = Application.GetRealHeight(44),
+                BackgroundColor = CSS_Color.MainColor,
+                TextColor = CSS_Color.MainBackgroundColor,
+                TextAlignment = TextAlignment.Center,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                TextID = StringId.Complete
+            };
+            bottomView.AddChidren(btnComplete);
+
+            bottomView.AddChidren(new Button() { Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
+
+
+            btnSave.MouseUpEventHandler = (sender, e) => {
+                this.Close();
+
+
+            };
+
+            btnComplete.MouseUpEventHandler = (sender, e) => {
+                this.Close();
+
+            };
+
+
+            #endregion
+
+
+            this.Show();
+            return;
+            //鍙湁璋冨厜鍣�
+            if (!hadDimming&&!hadCCT&&!hadRGB)
+            {
+                contentView.Height = Application.GetRealHeight(520);
+                contentView.Width = Application.GetRealWidth(343);
+                contentView.Gravity = Gravity.Center;
+                contentView.Radius = (uint)Application.GetRealWidth(12);
+                contentView.AddChidren(titleView);
+            }
+            else if (hadCCT && hadRGB)//
+            {
+                contentView.Height = Application.GetRealHeight(520);
+                contentView.Width = Application.GetRealWidth(343);
+                contentView.Gravity = Gravity.Center;
+                contentView.Radius = (uint)Application.GetRealWidth(12);
+                contentView.AddChidren(titleView);
+                #region 浜害璋冭妭
+                var btnBrightnessText = new Button()
+                {
+                    X = Application.GetRealWidth(35),
+                    Y = Application.GetRealHeight(82),
+                    Width = Application.GetRealWidth(224),
+                    Height = Application.GetRealHeight(21),
+                    TextAlignment = TextAlignment.CenterLeft,
+                    TextColor = CSS_Color.FirstLevelTitleColor,
+                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                    TextID = StringId.Brightness,
+                };
+                contentView.AddChidren(btnBrightnessText);
+
+                var btnMinValuesText = new Button()
+                {
+                    X = Application.GetRealWidth(35),
+                    Y = btnBrightnessText.Bottom,
+                    Width = Application.GetRealWidth(30),
+                    Height = Application.GetRealHeight(21),
+                    Text = "0%",
+                    TextAlignment = TextAlignment.CenterLeft,
+                    TextColor = CSS_Color.PromptingColor1,
+                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                };
+                contentView.AddChidren(btnMinValuesText);
+
+                var dimmerBar = new DiyImageSeekBar()
+                {
+                    X = Application.GetRealWidth(35 + 22),
+                    Y = Application.GetRealHeight(312),
+                    Width = Application.GetRealWidth(210),
+                    Height = Application.GetRealHeight(54),
+                    SeekBarViewHeight = Application.GetRealHeight(8),
+                    ThumbImagePath = "Public/ThumbImage.png",
+                    ThumbImageHeight = Application.GetRealHeight(54),
+                    ProgressTextColor = CSS_Color.FirstLevelTitleColor,
+                    ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                    ProgressBarColor = CSS_Color.AuxiliaryColor1 ,
+                    MaxValue = 100,
+                    Progress = brightnessValue,
+                    SeekBarPadding = Application.GetRealWidth(20),
+                };
+                contentView.AddChidren(dimmerBar);
+
+                var btnMaxValuesText = new Button()
+                {
+                    X = dimmerBar.Right,
+                    Y = btnBrightnessText.Bottom,
+                    Width = Application.GetRealWidth(45),
+                    Height = Application.GetRealHeight(21),
+                    Text = "100%",
+                    TextAlignment = TextAlignment.CenterLeft,
+                    TextColor = CSS_Color.PromptingColor1,
+                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                };
+                contentView.AddChidren(btnMaxValuesText);
+                #endregion
+
+
+
+                #region 鑹叉俯
+                //鑹叉俯
+                var btnTempClolor = new Button();
+                btnTempClolor.X = Application.GetRealWidth(35);
+                btnTempClolor.Y = Application.GetRealHeight(159);
+                btnTempClolor.Width = Application.GetRealWidth(224);
+                btnTempClolor.Height = Application.GetRealHeight(21);
+                btnTempClolor.TextAlignment = TextAlignment.CenterLeft;
+                btnTempClolor.TextColor = CSS_Color.FirstLevelTitleColor;
+                btnTempClolor.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+                btnTempClolor.TextID = StringId.ColorTemperature;
+                contentView.AddChidren(btnTempClolor);
+
+                //2700K
+                var btnTempClolorMin = new Button();
+                btnTempClolorMin.Y = btnTempClolor.Bottom + Application.GetRealHeight(9);
+                btnTempClolorMin.Width = Application.GetRealWidth(54);
+                btnTempClolorMin.Height = Application.GetRealHeight(21);
+                btnTempClolorMin.Text = "2700K";
+                btnTempClolorMin.TextAlignment = TextAlignment.CenterRight;
+                btnTempClolorMin.TextColor = CSS_Color.PromptingColor1;
+                btnTempClolorMin.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+                contentView.AddChidren(btnTempClolorMin);
+
+                //婊戝姩鏉$殑鑳屾櫙鍥剧墖
+                var btnColorTemplatrueBack = new Button();
+                //闇�瑕佸噺鎺夋粦鍔ㄦ潯鐨勫乏鍙抽棿璺�
+                btnColorTemplatrueBack.Width = Application.GetRealWidth(210 - 20 * 2);
+                btnColorTemplatrueBack.Height = Application.GetRealHeight(8);
+                btnColorTemplatrueBack.Gravity = Gravity.CenterHorizontal;
+                btnColorTemplatrueBack.UnSelectedImagePath = "FunctionIcon/Light/ColorTemperatureBar.png";
+                contentView.AddChidren(btnColorTemplatrueBack);
+                //婊戝姩鏉℃帶浠�
+                var barColorTemplatrue = new CCTSeekBarControl();
+                barColorTemplatrue.X = btnTempClolorMin.Right;
+                barColorTemplatrue.Y = Application.GetRealHeight(340);
+                barColorTemplatrue.MinValue = 27;
+                barColorTemplatrue.MaxValue = 65;
+                barColorTemplatrue.ProgressBarColor = 0x00000000;//鍏ㄩ儴閫忔槑
+                barColorTemplatrue.ProgressBarUnEnableColor = 0x00000000;
+                barColorTemplatrue.SeekBarBackgroundColor = 0x00000000;
+                contentView.AddChidren(barColorTemplatrue);
+                barColorTemplatrue.Y = btnTempClolorMin.Y - (barColorTemplatrue.Height - btnTempClolorMin.Height) / 2;
+                //鏄剧ず涓婃柟鐨凾xt
+                barColorTemplatrue.ShowCustomTextView(Application.GetRealWidth(50), CSS_FontSize.PromptFontSize_FirstLevel, CSS_Color.FirstLevelTitleColor);
+                var cct = 27;
+                int.TryParse(cctLight.status.Find((obj)=>obj.key == FunctionAttributeKey.CCT).value, out cct);
+                barColorTemplatrue.Progress = cct;
+                //璁剧疆鍒濆鍊�
+                barColorTemplatrue.SetCustomText(barColorTemplatrue.Progress * 100 + "K");
+
+                //鍙樻洿鑳屾櫙鍥剧殑Y杞村潗鏍�
+                btnColorTemplatrueBack.Y = barColorTemplatrue.Y + (barColorTemplatrue.Height - btnColorTemplatrueBack.Height) / 2;
+
+                //6500K
+                var btnTempClolorMax = new Button();
+                btnTempClolorMax.Y = btnTempClolorMin.Y;
+                btnTempClolorMax.X = barColorTemplatrue.Right;
+                btnTempClolorMax.Width = Application.GetRealWidth(54);
+                btnTempClolorMax.Height = Application.GetRealHeight(21);
+                btnTempClolorMax.Text = "6500K";
+                btnTempClolorMax.TextAlignment = TextAlignment.CenterLeft;
+                btnTempClolorMax.TextColor = CSS_Color.PromptingColor1;
+                btnTempClolorMax.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+                contentView.AddChidren(btnTempClolorMax);
+
+                #endregion
+
+                #region RGB
+
+                var btnCurColor = new Button()
+                {
+                    X = Application.GetRealWidth(24),
+                    Y = Application.GetRealHeight(241),
+                    Width = Application.GetMinRealAverage(24),
+                    Height = Application.GetMinRealAverage(24),
+                    Radius = (uint)Application.GetMinRealAverage(8),
+                    BorderColor = CSS_Color.PromptingColor2,
+                    BorderWidth = 1,
+                    BackgroundColor = (uint)(0xFF000000 + new Light().GetRGBcolor(new Function(),rgbLight.status.Find((obj) => obj.key == FunctionAttributeKey.RGB).value))
+                };
+                contentView.AddChidren(btnCurColor);
+
+                //鑹茬洏鐨勬甯冩帶浠�(闄愬埗閭d釜鐧借壊婊戝姩鐞冧娇鐢�)
+                var framePickerBack = new FrameLayout();
+                framePickerBack.Gravity = Gravity.CenterHorizontal;
+                framePickerBack.Y = Application.GetRealHeight(249);
+                framePickerBack.Width = Application.GetMinRealAverage(198);
+                framePickerBack.Height = Application.GetMinRealAverage(198);
+                contentView.AddChidren(framePickerBack);
+
+                var colorPicker = new ColorPicker()
+                {
+                    ColorImagePath = "FunctionIcon/Light/ColorWheel.png",
+                };
+                framePickerBack.AddChidren(colorPicker);
+                #endregion
+            }
+            else if (hadDimming && !hadCCT && !hadRGB)
+            {
+                contentView.Height = Application.GetRealHeight(211);
+                contentView.Width = Application.GetRealWidth(343);
+                contentView.Gravity = Gravity.Center;
+                contentView.Radius = (uint)Application.GetRealWidth(12);
+                contentView.AddChidren(titleView);
+            }
+        }
+    }
+
 }
\ No newline at end of file

--
Gitblit v1.8.0