wei
2020-12-20 fb49279fd0e36e1ed2bd7332eecee9f963c13649
20201220-1

1.场景配置调光类设备,增加变化速度
2.特殊字符输出限制
3.RGB关闭时,调色板消失的问题。
4.窗帘空间流畅性优化。
32个文件已修改
898 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/Public/MinusSignIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/Public/PlusSignIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/Public/MinusSignIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/Public/PlusSignIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control_Udp.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Light.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Scene.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/FunctionList.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmebly.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePage.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs 108 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs 177 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,27 +1,63 @@
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
  <MonoDevelop.Ide.Workbench>
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" Line="436" Column="42" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs" Line="562" Column="37" />
      <File FileName="HDL_ON/Entity/FunctionList.cs" Line="726" Column="23" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs" Line="637" Column="37" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="963" Column="52" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" Line="213" Column="36" />
      <File FileName="HDL_ON/Entity/Function/Scene.cs" Line="220" Column="21" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePage.cs" Line="430" Column="97" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs" Line="14" Column="64" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" Line="1" Column="1" />
      <File FileName="HDL-ON_iOS/Info.plist" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePage.cs" Line="157" Column="59" />
      <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="14" Column="78" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs" Line="205" Column="39" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" Line="344" Column="37" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs" Line="30" Column="22" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs" Line="105" Column="56" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs" Line="371" Column="1" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs" Line="105" Column="56" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="HDL_APP_Project" expanded="True">
            <Node name="HDL-ON_Android" selected="True" />
            <Node name="HDL_ON" expanded="True">
              <Node name="Common" expanded="True" />
              <Node name="DAL" expanded="True">
                <Node name="DriverLayer" expanded="True" />
              </Node>
              <Node name="Entity" expanded="True">
                <Node name="Function" expanded="True" />
              </Node>
              <Node name="UI" expanded="True">
                <Node name="UI0-Public" expanded="True" />
                <Node name="UI2" expanded="True">
                  <Node name="2-Classification" expanded="True" />
                  <Node name="3-Intelligence" expanded="True">
                    <Node name="Scene" expanded="True" />
                  </Node>
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="AC" expanded="True" />
                    <Node name="Curtain" expanded="True">
                      <Node name="RollingShutterPageBLL.cs" selected="True" />
                    </Node>
                    <Node name="EnvironmentalScience" expanded="True" />
                    <Node name="Light" expanded="True" />
                  </Node>
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_Android" expanded="True">
              <Node name="Assets" expanded="True">
                <Node name="Phone" expanded="True">
                  <Node name="Public" expanded="True" />
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_iOS" expanded="True">
              <Node name="Other" expanded="True" />
              <Node name="Resources" expanded="True" />
              <Node name="Resources" expanded="True">
                <Node name="Phone" expanded="True">
                  <Node name="FunctionIcon" expanded="True">
                    <Node name="Light" expanded="True" />
                  </Node>
                  <Node name="LoginIcon" expanded="True" />
                </Node>
              </Node>
            </Node>
          </Node>
        </State>
@@ -34,7 +70,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 />
HDL-ON_Android/Assets/Language.ini
@@ -395,7 +395,10 @@
373=添加楼层失败。
374=住宅数据已被删除,APP将自动切换到另一住宅。
375=网关未连接服务器,无法创建场景。
376=无法输入特殊字符.
376=无法输入特殊字符
377=全宅区域
378=变化时间
379=变化速度
400=欢迎回家
401=二维码失效,请重试
402=重试
HDL-ON_Android/Assets/Phone/Public/MinusSignIcon.png

HDL-ON_Android/Assets/Phone/Public/PlusSignIcon.png

HDL-ON_iOS/Resources/Language.ini
@@ -395,8 +395,10 @@
373=添加楼层失败。
374=住宅数据已被删除,APP将自动切换到另一住宅。
375=网关未连接服务器,无法创建场景。
376=无法输入特殊字符.
376=无法输入特殊字符
377=全宅区域
378=变化时间
379=变化速度
400=欢迎回家
401=二维码失效,请重试
402=重试
HDL-ON_iOS/Resources/Phone/Public/MinusSignIcon.png

HDL-ON_iOS/Resources/Phone/Public/PlusSignIcon.png

HDL_ON/Common/R.cs
@@ -12,6 +12,8 @@
        public const int Retry = 402;
        public const int QRCodeIsInvalid = 401;
        public const int WellComBackHome = 400;
        public const int FadeSpeed = 379;
        public const int FadeTime = 378;
        public const int WholeZone = 377;
        public const int CannotEnterSpecialCharacters = 376;
        public const int GatewayOfflineCannotCreateScene = 375;
HDL_ON/DAL/DriverLayer/Control.cs
@@ -178,14 +178,6 @@
            }
        }
        ///// <summary>
        ///// 改变通讯方式
        ///// </summary>
        //public void ChangeCommunicationMode(CommunicationMode communicationMode)
        //{
        //    this.communicationMode = communicationMode;
        //}
        /// <summary>
        /// 搜索本地网关列表
        /// </summary>
@@ -240,7 +232,6 @@
                })
                { IsBackground = true }.Start();
            }
        }
        /// <summary>
@@ -274,6 +265,21 @@
            function.usageCount++;
            function.refreshTime = DateTime.Now;
            //如果是控制调光的开时,亮度值不能为0
            if (commandDictionary.Count > 2)
            {
                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff) && commandDictionary.ContainsKey(FunctionAttributeKey.Brightness))
                {
                    if (commandDictionary[FunctionAttributeKey.OnOff] == "on")
                    {
                        if (commandDictionary[FunctionAttributeKey.Brightness] == "0")
                        {
                            commandDictionary[FunctionAttributeKey.Brightness] = "100";
                        }
                    }
                }
            }
            //远程通讯
            if (Ins.IsRemote)
            {
HDL_ON/DAL/DriverLayer/Control_Udp.cs
old mode 100755 new mode 100644
@@ -728,7 +728,7 @@
                        UdpSocket._BusSocket.AsyncBeginSend(packet);
                        controlLostCount++;
                    }
                    System.Threading.Thread.Sleep(100);
                    System.Threading.Thread.Sleep(300);
                }
            }
            catch (Exception ex)
HDL_ON/Entity/Function/Function.cs
@@ -231,7 +231,7 @@
                {
                    roomNameList += ",";
                }
                roomNameList += findRoom.floorName + findRoom.roomName;
                roomNameList += findRoom.floorName +"-"+ findRoom.roomName;
            }
            if (roomNameList == "" && functionType == FunctionType.Scene)
            {
@@ -286,19 +286,30 @@
            var sFunc = new SceneFunction();
            foreach (var attr in attributes)
            {
                if (attr.curValue.ToString() == "{}")
                switch (attr.key)
                {
                    attr.curValue = "0";
                }
                if (attr.key == FunctionAttributeKey.SetTemp)
                {
                    double vv = 16;
                    Double.TryParse(attr.curValue.ToString(),out vv);
                    sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() });
                }
                else
                {
                    sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() });
                    case FunctionAttributeKey.OnOff:
                    case FunctionAttributeKey.Brightness:
                    case FunctionAttributeKey.Mode:
                    case FunctionAttributeKey.SetTemp:
                    case FunctionAttributeKey.FanSpeed:
                    case FunctionAttributeKey.Percent:
                    case FunctionAttributeKey.FadeTime:
                        if (attr.curValue.ToString() == "{}")
                        {
                            attr.curValue = "0";
                        }
                        if (attr.key == FunctionAttributeKey.SetTemp)
                        {
                            double vv = 16;
                            Double.TryParse(attr.curValue.ToString(), out vv);
                            sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() });
                        }
                        else
                        {
                            sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() });
                        }
                        break;
                }
            }
            sFunc.sid = this.sid;
HDL_ON/Entity/Function/Light.cs
@@ -153,6 +153,8 @@
                }
            }
        }
        #region RGB
        /// <summary>
        /// 获取rgb颜色
        /// </summary>
@@ -227,5 +229,38 @@
                return blueColor;
            }
        }
        #endregion
        #region CCT
        FunctionAttributes attr_CCT;
        /// <summary>
        /// 色温
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public FunctionAttributes Attr_CCT
        {
            get
            {
                if(attr_CCT == null)
                {
                    attr_CCT = attributes.Find((obj) => obj.key == FunctionAttributeKey.CCT);
                    if(attr_CCT== null)
                    {
                        attr_CCT = new FunctionAttributes()
                        {
                            key = FunctionAttributeKey.CCT,
                            value = new List<string> (),
                            max = 6500,
                            min = 2700,
                            curValue = 2700
                        };
                    }
                }
                var result = 2700;
                int.TryParse(attr_CCT.curValue.ToString(), out result);
                return attr_CCT;
            }
        }
        #endregion
    }
}
HDL_ON/Entity/Function/Scene.cs
@@ -236,23 +236,17 @@
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    if (time / 60 > 1)
                                    if (time > 60)
                                    {
                                        btnShowDelay.Text = (time / 60).ToString() + "min";
                                        btnShowDelay.Text = (time / 60).ToString() + "min" + time % 60 + "s";
                                    }
                                    else
                                    {
                                        btnShowDelay.Text = (time--).ToString() + "s";
                                        btnShowDelay.Text = time.ToString() + "s";
                                    }
                                });
                                if (time / 60 > 1)
                                {
                                    System.Threading.Thread.Sleep(time / 60 * 60000);
                                }
                                else
                                {
                                    System.Threading.Thread.Sleep(1000);
                                }
                                System.Threading.Thread.Sleep(1000);
                                time--;
                            }
                            Application.RunOnMainThread(() =>
                            {
HDL_ON/Entity/FunctionList.cs
@@ -695,6 +695,9 @@
                case FunctionAttributeKey.Percent:
                    text = Language.StringByID(StringId.PercentAdjustment);
                    break;
                case FunctionAttributeKey.FadeTime:
                    text = Language.StringByID(StringId.FadeSpeed);
                    break;
            }
            return text;
        }
HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Threading;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
@@ -28,15 +29,22 @@
            btnConfirm.MouseUpEventHandler += (sender, e) =>
            {
                //btnConfirm.IsSelected = false;
                if (string.IsNullOrEmpty(editText.Text.Trim()) || list.Contains(editText.Text.Trim()))
                var text = editText.Text.Trim();
                Regex regtest = new Regex(@"\p{Cs}");
                Match match = regtest.Match(text);
                if (match.Success)
                {
                    HDLCommon.Current.ShowAlert(Language.StringByID(StringId.CannotEnterSpecialCharacters));
                    return;
                }
                if (string.IsNullOrEmpty(text) || list.Contains(text))
                {
                    //if (titleId == StringId.ModifyMemberNickname)
                    //{
                    //    return;
                    //}
                    string tipMsgString = "";
                    if (string.IsNullOrEmpty(editText.Text.Trim()))
                    if (string.IsNullOrEmpty(text))
                    {
                        tipMsgString = Language.StringByID(errorId_IsNullOrEmpty);
                    }
@@ -58,7 +66,7 @@
                }
                callBackAction(editText.Text.Trim());
                callBackAction(text);
                dialog.Close();
            };
        }
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -590,7 +590,7 @@
                        btnLightPower.MouseUpEventHandler = (sender, e) =>
                        {
                            LoadEvent_SwitchFunction(btnLightPower, item);
                            LoadEvent_SwitchFunction(btnLightPower, item, functionView);
                        };
                        functionPageTitleId = StringId.Lights;
                      
@@ -615,7 +615,7 @@
                        functionView.AddChidren(btnAcPower);
                        btnAcPower.MouseUpEventHandler = (sender, e) =>
                        {
                            LoadEvent_SwitchFunction(btnAcPower, item);
                            LoadEvent_SwitchFunction(btnAcPower, item, functionView);
                        };
                        functionPageTitleId = StringId.AC;
                        #endregion
@@ -650,7 +650,7 @@
                            IsSelected = DB_ResidenceData.Instance.GlobalCurtainStatus,
                        };
                        functionView.AddChidren(btnOpen);
                        LoadEvent_CurtainSwitch(btnClose, btnOpen);
                        LoadEvent_CurtainSwitch(btnClose, btnOpen, functionView);
                        functionPageTitleId = StringId.Curtain;
                        #endregion
@@ -674,7 +674,7 @@
                        functionView.AddChidren(btnFhPower);
                        btnFhPower.MouseUpEventHandler = (sender, e) =>
                        {
                            LoadEvent_SwitchFunction(btnFhPower, item);
                            LoadEvent_SwitchFunction(btnFhPower, item, functionView);
                        };
                        functionPageTitleId = StringId.FloorHeating;
                        #endregion
@@ -701,7 +701,7 @@
                        functionView.AddChidren(btnElectricPower);
                        btnElectricPower.MouseUpEventHandler = (sender, e) =>
                        {
                            LoadEvent_SwitchFunction(btnElectricPower, item);
                            LoadEvent_SwitchFunction(btnElectricPower, item, functionView);
                        };
                        functionPageTitleId = StringId.Electric;
                        #endregion
HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
@@ -332,62 +332,76 @@
        /// <summary>
        /// 关闭打开全部选中类型功能
        /// </summary>
        void LoadEvent_SwitchFunction(Button btn, ShowFunction functionCategory)
        void LoadEvent_SwitchFunction(Button btn, ShowFunction functionCategory,FrameLayout view)
        {
            btn.MouseUpEventHandler = (sender, e) => {
                btn.IsSelected = !btn.IsSelected;
                var onoff = btn.IsSelected ? "on" : "off";
                switch (functionCategory)
                var waitPage = new Loading();
                view.AddChidren(waitPage);
                waitPage.Start("");
                new System.Threading.Thread(() =>
                {
                    case ShowFunction.AC:
                        foreach (var f in FunctionList.List.aCs)
                    try
                    {
                        switch (functionCategory)
                        {
                            f.trait_on_off.curValue = onoff;
                            //Control.Send(CommandType_A.write, f);
                            Dictionary<string, string> d = new Dictionary<string, string>();
                            d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString());
                            Control.Ins.SendWriteCommand(f, d);
                            case ShowFunction.AC:
                                foreach (var f in FunctionList.List.aCs)
                                {
                                    f.trait_on_off.curValue = onoff;
                                    Dictionary<string, string> d = new Dictionary<string, string>();
                                    d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString());
                                    Control.Ins.SendWriteCommand(f, d);
                                    System.Threading.Thread.Sleep(100);
                                }
                                break;
                            case ShowFunction.FloorHeating:
                                foreach (var f in FunctionList.List.floorHeatings)
                                {
                                    f.trait_on_off.curValue = onoff;
                                    Dictionary<string, string> d = new Dictionary<string, string>();
                                    d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString());
                                    Control.Ins.SendWriteCommand(f, d);
                                    System.Threading.Thread.Sleep(100);
                                }
                                break;
                            case ShowFunction.Light:
                                foreach (var f in FunctionList.List.lights)
                                {
                                    f.trait_on_off.curValue = onoff;
                                    Dictionary<string, string> d = new Dictionary<string, string>();
                                    d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString());
                                    Control.Ins.SendWriteCommand(f, d);
                                    System.Threading.Thread.Sleep(100);
                                }
                                break;
                            case ShowFunction.Electric:
                                foreach (var f in FunctionList.List.electricals)
                                {
                                    f.trait_on_off.curValue = onoff;
                                    Dictionary<string, string> d = new Dictionary<string, string>();
                                    d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString());
                                    Control.Ins.SendWriteCommand(f, d);
                                    System.Threading.Thread.Sleep(100);
                                }
                                break;
                        }
                        break;
                    case ShowFunction.FloorHeating:
                        foreach (var f in FunctionList.List.floorHeatings)
                    }
                    catch (Exception ex)
                    {
                        MainPage.Log($"{functionCategory}全开全关失败:{ex.Message}");
                    }
                    finally
                    {
                        Application.RunOnMainThread(() =>
                        {
                            f.trait_on_off.curValue = onoff;
                            Dictionary<string, string> d = new Dictionary<string, string>();
                            d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString());
                            Control.Ins.SendWriteCommand(f, d);
                        }
                        break;
                    case ShowFunction.Curtain:
                        //foreach (var f in FunctionList.List.curtains)
                        //{
                        //    f.trait_on_off.value = onoff;
                        //    //Control.Send(CommandType_A.write, f);
                        //    Dictionary<string, string> d = new Dictionary<string, string>();
                        //    d.Add("percent", "100");
                        //    Control.SendWriteCommand(f, d);
                        //}
                        break;
                    case ShowFunction.Light:
                        foreach (var f in FunctionList.List.lights)
                        {
                            f.trait_on_off.curValue = onoff;
                            Dictionary<string, string> d = new Dictionary<string, string>();
                            d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString());
                            Control.Ins.SendWriteCommand(f, d);
                        }
                        break;
                    case ShowFunction.Electric:
                        foreach (var f in FunctionList.List.electricals)
                        {
                            f.trait_on_off.curValue = onoff;
                            Dictionary<string, string> d = new Dictionary<string, string>();
                            d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString());
                            Control.Ins.SendWriteCommand(f, d);
                        }
                        break;
                }
                            waitPage.Hide();
                            waitPage.RemoveFromParent();
                        });
                    }
                })
                { IsBackground = true, Priority = System.Threading.ThreadPriority.AboveNormal }.Start();
            };
        }
@@ -395,21 +409,44 @@
        /// <summary>
        /// 窗帘全开全关
        /// </summary>
        void LoadEvent_CurtainSwitch(Button btnClose, Button btnOpen)
        void LoadEvent_CurtainSwitch(Button btnClose, Button btnOpen,FrameLayout view)
        {
            btnOpen.MouseUpEventHandler = (sender, e) =>
            {
                DB_ResidenceData.Instance.GlobalCurtainStatus = true;
                btnOpen.IsSelected = true;
                btnClose.IsSelected = false;
                foreach (var f in FunctionList.List.curtains)
                var waitPage = new Loading();
                view.AddChidren(waitPage);
                waitPage.Start("");
                new System.Threading.Thread(() =>
                {
                    f.trait_on_off.curValue = "on";
                    f.percent = 100;
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("on_off", f.trait_on_off.curValue.ToString());
                    Control.Ins.SendWriteCommand(f, d);
                }
                    try
                    {
                        foreach (var f in FunctionList.List.curtains)
                        {
                            f.trait_on_off.curValue = "on";
                            f.percent = 100;
                            Dictionary<string, string> d = new Dictionary<string, string>();
                            d.Add("on_off", f.trait_on_off.curValue.ToString());
                            Control.Ins.SendWriteCommand(f, d);
                            System.Threading.Thread.Sleep(100);
                        }
                    }
                    catch (Exception ex)
                    {
                        MainPage.Log($"窗帘全开全关失败:{ex.Message}");
                    }
                    finally
                    {
                        Application.RunOnMainThread(() =>
                        {
                            waitPage.Hide();
                            waitPage.RemoveFromParent();
                        });
                    }
                })
                { IsBackground = true, Priority = System.Threading.ThreadPriority.AboveNormal }.Start();
            };
            btnClose.MouseUpEventHandler = (sender, e) =>
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
old mode 100755 new mode 100644
@@ -311,7 +311,8 @@
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png",
                Tag = function.functionType + "_off_" + function.sid
                IsSelected = function.trait_on_off.curValue.ToString() == "off",
                Tag = function.sid + "_off"
            };
            bodyDiv.AddChidren(btnCurtainClose);
@@ -323,6 +324,8 @@
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainStopIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainStopOnIcon.png",
                Tag = function.sid + "_stop",
                IsSelected = function.trait_on_off.curValue.ToString() == "stop"
            };
            bodyDiv.AddChidren(btnCurtainStop);
@@ -334,7 +337,8 @@
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png",
                Tag = function.functionType + "_on_" + function.sid
                Tag = function.sid + "_on",
                IsSelected = function.trait_on_off.curValue.ToString() == "on"
            };
            bodyDiv.AddChidren(btnCurtainOpen);
            LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function as Curtain);
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
old mode 100755 new mode 100644
@@ -202,7 +202,6 @@
                btnClose.IsSelected = false;
                btnOpen.IsSelected = false;
                curtain.trait_on_off.curValue = "stop";
                //curtain.percent = 0;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -60,6 +60,9 @@
                    case FunctionAttributeKey.Brightness:
                        LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness));
                        break;
                    case FunctionAttributeKey.FadeTime:
                        LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.FadeTime));
                        break;
                }
            }
@@ -248,7 +251,8 @@
                    case FunctionAttributeKey.SetTemp:
                        LoadEditDialog_Temp(sceneStatus, btnFunctionText);
                        break;
                    case "delay":
                    case FunctionAttributeKey.FadeTime:
                        break;
                    case "cct":
                        break;
@@ -707,7 +711,155 @@
                }
            };
        }
        /// <summary>
        /// 加载变化速度选择弹窗
        /// </summary>
        /// <param name="function"></param>
        /// <param name="btn"></param>
        void LoadEditDialog_FadeTime(SceneFunctionStatus trait, Button btn)
        {
            if (trait == null)
            {
                return;
            }
            Dialog dialog = new Dialog();
            var pView = new FrameLayout()
            {
                BackgroundColor = CSS_Color.DialogTransparentColor1,
            };
            dialog.AddChidren(pView);
            var optionBaseView = new FrameLayout()
            {
                Y = Application.GetRealHeight(467),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(180),
                AnimateSpeed = 0.3f,
                Animate = Animate.DownToUp,
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
            };
            pView.AddChidren(optionBaseView);
            var topView = new FrameLayout()
            {
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(40),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                Radius = (uint)Application.GetRealWidth(12),
            };
            optionBaseView.AddChidren(topView);
            topView.AddChidren(new Button() { Y = Application.GetRealHeight(39), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor });
            var btnTitle = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                TextAlignment = TextAlignment.Center,
                Width = Application.GetRealWidth(100),
                Text = FunctionList.List.GetNameText(trait.key),
                IsBold = true,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
            };
            topView.AddChidren(btnTitle);
            var btnCancel = new Button()
            {
                X = Application.GetRealWidth(21),
                Width = Application.GetRealWidth(100),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                TextID = StringId.Cancel,
            };
            topView.AddChidren(btnCancel);
            var btnConfrim = new Button()
            {
                Width = Application.GetRealWidth(320),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.TextFontSize,
                TextID = StringId.Confirm,
            };
            topView.AddChidren(btnConfrim);
            Button btnMinusSignIcon = new Button()
            {
                X = Application.GetRealWidth(26),
                Y = Application.GetRealHeight(118),
                Width = Application.GetMinRealAverage(24),
                Height = Application.GetMinRealAverage(24),
                Text = "0s",
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            };
            optionBaseView.AddChidren(btnMinusSignIcon);
            DiyImageSeekBar controlBar = new DiyImageSeekBar()
            {
                X = btnMinusSignIcon.Right + Application.GetRealWidth(12),
                Y = Application.GetRealHeight(100),//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 = CSS_FontSize.PromptFontSize_FirstLevel,
                MaxValue = 100,
                Progress = trait.value.ToString().Replace("{}", "") == "" ? 0 : Convert.ToInt32(trait.value.Replace("{}", "")),
                SeekBarPadding = Application.GetRealWidth(20),
            };
            optionBaseView.AddChidren(controlBar);
            Button btnPlusSgnIcon = new Button()
            {
                X = controlBar.Right + Application.GetRealWidth(12),
                Y = Application.GetRealHeight(118),
                Width = Application.GetMinRealAverage(24),
                Height = Application.GetMinRealAverage(24),
                Text = "10s",
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            };
            optionBaseView.AddChidren(btnPlusSgnIcon);
            btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
            {
                controlBar.Progress--;
            };
            btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
            {
                controlBar.Progress++;
            };
            dialog.Show();
            pView.MouseUpEventHandler = (sender, e) =>
            {
                dialog.Close();
            };
            btnCancel.MouseUpEventHandler = (sender, e) =>
            {
                dialog.Close();
            };
            btnConfrim.MouseUpEventHandler = (sender, e) =>
            {
                dialog.Close();
                trait.value = controlBar.Progress.ToString();
                btn.Text = trait.value + FunctionList.List.GetUintString(trait.key);
            };
        }
        /// <summary>
        /// 加载功能属性数据选择弹窗
        /// </summary>
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePage.cs
old mode 100755 new mode 100644
@@ -134,6 +134,7 @@
                Height = Application.GetMinRealAverage(40),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png",
                IsSelected = curtain.trait_on_off.curValue.ToString() == "off",
            };
            controlView.AddChidren(btnCurtainClose);
@@ -145,6 +146,7 @@
                Height = Application.GetMinRealAverage(40),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainStopIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainStopOnIcon.png",
                IsSelected = curtain.trait_on_off.curValue.ToString() == "stop",
            };
            controlView.AddChidren(btnCurtainStop);
@@ -156,6 +158,7 @@
                Height = Application.GetMinRealAverage(40),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png",
                IsSelected = curtain.trait_on_off.curValue.ToString() == "on",
            };
            controlView.AddChidren(btnCurtainOpen);
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
old mode 100755 new mode 100644
@@ -21,23 +21,23 @@
                {
                    if (uCurtain.trait_on_off.curValue.ToString() == "stop")
                    {
                        //bodyView.btnCurtainOpen.IsSelected = true;
                        //bodyView.btnCurtainClose.IsSelected = false;
                        //bodyView.btnCurtainStop.IsSelected = false;
                        bodyView.btnCurtainOpen.IsSelected = true;
                        bodyView.btnCurtainClose.IsSelected = false;
                        bodyView.btnCurtainStop.IsSelected = false;
                        //bodyView.btnCurtainBgIcon.IsSelected = true;
                    }
                    else if (uCurtain.trait_on_off.curValue.ToString() == "on")
                    {
                        //bodyView.btnCurtainOpen.IsSelected = true;
                        //bodyView.btnCurtainClose.IsSelected = false;
                        //bodyView.btnCurtainStop.IsSelected = false;
                        bodyView.btnCurtainOpen.IsSelected = true;
                        bodyView.btnCurtainClose.IsSelected = false;
                        bodyView.btnCurtainStop.IsSelected = false;
                        bodyView.btnCurtainBgIcon.IsSelected = true;
                    }
                    else if (uCurtain.trait_on_off.curValue.ToString() == "off")
                    {
                        //bodyView.btnCurtainOpen.IsSelected = false;
                        //bodyView.btnCurtainClose.IsSelected = true;
                        //bodyView.btnCurtainStop.IsSelected = false;
                        bodyView.btnCurtainOpen.IsSelected = false;
                        bodyView.btnCurtainClose.IsSelected = true;
                        bodyView.btnCurtainStop.IsSelected = false;
                        bodyView.btnCurtainBgIcon.IsSelected = false;
                    }
                }
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs
old mode 100755 new mode 100644
@@ -61,6 +61,11 @@
        /// </summary>
        Action actionRefresh;
        #endregion
        /// <summary>
        /// 正在控制
        /// </summary>
        bool onControl = false;
        public MotorCurtainPage(Curtain func)
        {
            bodyView = this;
@@ -136,6 +141,7 @@
                Height = Application.GetRealWidth(177),
                Progress = curtain.percent,
                ProgressTextColor =0x00000000,
                IsInvertedProgress = true,
            };
            controlView.AddChidren(curtainSeekBar);
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
old mode 100755 new mode 100644
@@ -15,6 +15,8 @@
            Application.RunOnMainThread(() => {
                if (bodyView == null)
                    return;
                if (bodyView.onControl)
                    return;
                if (uCurtain.functionType == bodyView.curtain.functionType && uCurtain.sid == bodyView.curtain.sid)
                {
                    if (uCurtain.trait_on_off.curValue.ToString() == "stop")
@@ -35,15 +37,79 @@
                        bodyView.btnCurtainClose.IsSelected = true;
                        bodyView.btnCurtainStop.IsSelected = false;
                    }
                    if ((DateTime.Now - uCurtain.refreshTime).TotalMilliseconds > 300)
                    try
                    {
                        bodyView.controlBar.Progress = bodyView.curtainSeekBar.Progress = Convert.ToInt32(uCurtain.percent);
                        if (!bodyView.onCurtainAnimation)
                        {
                            bodyView.CurtainAnimation(Convert.ToInt32(uCurtain.trait_percent.curValue.ToString()));
                        }
                    }
                    catch { }
                }
            });
        }
        /// <summary>
        /// 正在执行窗帘动画
        /// </summary>
        bool onCurtainAnimation = false;
        /// <summary>
        /// 窗帘动画
        /// </summary>
        /// <param name="progress"></param>
        void CurtainAnimation(int progress)
        {
            onCurtainAnimation = true;
            //运行方向 打开(加进度):关闭(减进度)
            bool runningDirection = progress > curtainSeekBar.Progress;
            int curBarProgress = curtainSeekBar.Progress;
            new System.Threading.Thread(() =>
            {
                try
                {
                    while (progress != curBarProgress && onCurtainAnimation)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            if (runningDirection)
                            {
                                if (curtainSeekBar.Progress + 10 > progress)
                                {
                                    curtainSeekBar.Progress = progress;
                                }
                                else
                                {
                                    curtainSeekBar.Progress = curtainSeekBar.Progress + 10;
                                }
                            }
                            else
                            {
                                if (curtainSeekBar.Progress - 10 < progress)
                                {
                                    curtainSeekBar.Progress = progress;
                                }
                                else
                                {
                                    curtainSeekBar.Progress = curtainSeekBar.Progress - 10;
                                }
                            }
                            curBarProgress = curtainSeekBar.Progress;
                        });
                        System.Threading.Thread.Sleep(100);
                    }
                }
                catch { }
                finally
                {
                    new System.Threading.Thread(() => {
                        System.Threading.Thread.Sleep(3000);
                        onCurtainAnimation = false;
                    })
                    { IsBackground = true, Priority = System.Threading.ThreadPriority.Lowest }.Start();
                }
            }).Start();
        }
        /// <summary>
        /// 加载事件列表
@@ -81,45 +147,41 @@
            btnCurtainClose.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainClose.IsSelected = true;
                btnCurtainStop.IsSelected = false;
                btnCurtainOpen.IsSelected = false;
                btnCurtainStop.IsSelected = false;
                curtain.trait_on_off.curValue = "off";
                curtain.percent = 0;
                curtain.percent = 100;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                CurtainAnimation(curtain.percent);
            };
            //btnCurtainStop.MouseDownEventHandler = (sender, e) =>
            //{
            //    btnCurtainStop.IsSelected = true;
            //    btnCurtainClose.IsSelected = false;
            //    btnCurtainOpen.IsSelected = false;
            //};
            btnCurtainStop.MouseUpEventHandler = (sender, e) =>
            {
                //btnCurtainOpen.IsSelected = true;
                //btnCurtainClose.IsSelected = false;
                //btnCurtainStop.IsSelected = false;
                btnCurtainStop.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainOpen.IsSelected = false;
                curtain.trait_on_off.curValue = "stop";
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                onCurtainAnimation = false;
            };
            btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainStop.IsSelected = false;
                btnCurtainOpen.IsSelected = true;
                curtain.trait_on_off.curValue = "on";
                curtain.percent = 100;
                curtain.percent = 0;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                CurtainAnimation(curtain.percent);
            };
            btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
@@ -127,7 +189,7 @@
                curtain.percent--;
                controlBar.Progress = curtain.percent;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("percent", curtain.percent.ToString());
                d.Add(FunctionAttributeKey.Percent, curtain.percent.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
            };
@@ -136,7 +198,7 @@
                curtain.percent++;
                controlBar.Progress = curtain.percent;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("percent", curtain.percent.ToString());
                d.Add(FunctionAttributeKey.Percent, curtain.percent.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
            };
@@ -164,7 +226,7 @@
                    curtain.percent = e;
                    curtain.refreshTime = DateTime.Now;
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("percent", curtain.percent.ToString());
                    d.Add(FunctionAttributeKey.Percent, curtain.percent.ToString());
                    DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                })
                { IsBackground = true }.Start();
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
old mode 100755 new mode 100644
@@ -62,6 +62,10 @@
        /// </summary>
        Action actionRefresh;
        #endregion
        /// <summary>
        /// 正在控制
        /// </summary>
        bool onControl = false;
        public RollingShutterPage(Curtain func)
        {
            bodyView = this;
@@ -136,7 +140,8 @@
                Width = Application.GetRealWidth(170),
                Height = Application.GetRealWidth(210),
                Progress = curtain.percent,
                ProgressTextColor = 0x00000000
                IsInvertedProgress = true,
                ProgressTextColor = 0x00000000,
            };
            controlView.AddChidren(curtainSeekBar);
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
old mode 100755 new mode 100644
@@ -1,5 +1,4 @@
using System;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
using Shared;
@@ -7,8 +6,6 @@
{
    public partial class RollingShutterPage
    {
        bool inControl = false;
        /// <summary>
        /// 更新窗帘
        /// </summary>
@@ -17,6 +14,8 @@
        {
            Application.RunOnMainThread(() => {
                if (bodyView == null)
                    return;
                if (bodyView.onControl)
                    return;
                if (uCurtain.functionType == bodyView.curtain.functionType && uCurtain.sid == bodyView.curtain.sid)
                {
@@ -38,13 +37,79 @@
                        bodyView.btnCurtainClose.IsSelected = true;
                        bodyView.btnCurtainStop.IsSelected = false;
                    }
                    if ((DateTime.Now - uCurtain.refreshTime).TotalMilliseconds > 300 && !bodyView.inControl)
                    try
                    {
                        bodyView.controlBar.Progress = bodyView.curtainSeekBar.Progress = Convert.ToInt32(uCurtain.percent);
                        if (!bodyView.onCurtainAnimation)
                        {
                            bodyView.CurtainAnimation(Convert.ToInt32(uCurtain.trait_percent.curValue.ToString()));
                        }
                    }
                    catch { }
                }
            });
        }
        /// <summary>
        /// 正在执行窗帘动画
        /// </summary>
        bool onCurtainAnimation = false;
        /// <summary>
        /// 窗帘动画
        /// </summary>
        /// <param name="progress"></param>
        void CurtainAnimation(int progress)
        {
            onCurtainAnimation = true;
            //运行方向 打开(加进度):关闭(减进度)
            bool runningDirection = progress > curtainSeekBar.Progress;
            int curBarProgress = curtainSeekBar.Progress;
            new System.Threading.Thread(() =>
            {
                try
                {
                    while (progress != curBarProgress && onCurtainAnimation)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            if (runningDirection)
                            {
                                if (curtainSeekBar.Progress + 10 > progress)
                                {
                                    curtainSeekBar.Progress = progress;
                                }
                                else
                                {
                                    curtainSeekBar.Progress = curtainSeekBar.Progress + 10;
                                }
                            }
                            else
                            {
                                if (curtainSeekBar.Progress - 10 < progress)
                                {
                                    curtainSeekBar.Progress = progress;
                                }
                                else
                                {
                                    curtainSeekBar.Progress = curtainSeekBar.Progress - 10;
                                }
                            }
                            curBarProgress = curtainSeekBar.Progress;
                        });
                        System.Threading.Thread.Sleep(100);
                    }
                }
                catch { }
                finally
                {
                    new System.Threading.Thread(() => {
                        System.Threading.Thread.Sleep(3000);
                        onCurtainAnimation = false;
                    })
                    { IsBackground = true, Priority = System.Threading.ThreadPriority.Lowest }.Start();
                }
            }).Start();
        }
        /// <summary>
        /// 加载事件列表
@@ -59,7 +124,7 @@
            {
                btnFunctionName.Text = btnFunctionName_Out.Text = curtain.name;
                btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = curtain.GetRoomListName();
                curtain.SaveFunctionData(true);
                //curtain.SaveFunctionData(true);
            };
        }
        /// <summary>
@@ -81,99 +146,121 @@
        {
            btnCurtainClose.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = false;
                btnCurtainClose.IsSelected = true;
                btnCurtainStop.IsSelected = false;
                btnCurtainOpen.IsSelected = false;
                curtain.trait_on_off.curValue = "off";
                curtain.percent = 0;
                //Control.Send(CommandType_A.write, curtain);
                curtain.percent = 100;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                CurtainAnimation(curtain.percent);
            };
            //btnCurtainStop.MouseDownEventHandler = (sender, e) =>
            //{
            //    btnCurtainStop.IsSelected = true;
            //    btnCurtainClose.IsSelected = false;
            //    btnCurtainOpen.IsSelected = false;
            //};
            btnCurtainStop.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainStop.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainOpen.IsSelected = false;
                curtain.trait_on_off.curValue = "stop";
                //Control.Send(CommandType_A.write, curtain);
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                onCurtainAnimation = false;
            };
            btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainStop.IsSelected = false;
                btnCurtainOpen.IsSelected = true;
                curtain.trait_on_off.curValue = "on";
                curtain.percent = 100;
                //Control.Send(CommandType_A.write, curtain);
                curtain.percent = 0;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                CurtainAnimation(curtain.percent);
            };
            btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
            {
                curtain.percent--;
                controlBar.Progress = curtain.percent;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("percent", curtain.percent.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
                d.Add(FunctionAttributeKey.Percent, curtain.percent.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
            };
            btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
            {
                curtain.percent++;
                controlBar.Progress = curtain.percent;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add("percent", curtain.percent.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
                d.Add(FunctionAttributeKey.Percent, curtain.percent.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
            };
            curtainSeekBar.OnStartTrackingTouchEvent = (sender, e) =>
            {
                inControl = true;
            };
            //curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
            //{
            //    controlBar.Progress = curtainSeekBar.Progress;
            //    new System.Threading.Thread(() =>
            //    {
            //        if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - curtain.refreshTime).TotalMilliseconds > 300)
            //        {
            //            curtain.percent = e;
            //            curtain.refreshTime = DateTime.Now;
            //            System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
            //            d.Add("percent", curtain.percent.ToString());
            //            Control.SendWriteCommand(curtain, d);
            //        }
            //    })
            //    { IsBackground = true }.Start();
            //};
            curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
                inControl = false;
                controlBar.Progress = curtainSeekBar.Progress;
                new System.Threading.Thread(() =>
                {
                    curtain.percent = e;
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("percent", curtain.percent.ToString());
                    Control.Ins.SendWriteCommand(curtain, d);
                    curtain.refreshTime = DateTime.Now;
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.Percent, curtain.percent.ToString());
                    DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                })
                { IsBackground = true }.Start();
            };
            controlBar.OnStartTrackingTouchEvent = (sender, e) =>
            {
                inControl = true;
            };
            //controlBar.OnProgressChangedEvent = (sender, e) =>
            //{
            //    curtainSeekBar.Progress = controlBar.Progress;
            //    new System.Threading.Thread(() =>
            //    {
            //        if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - curtain.refreshTime).TotalMilliseconds > 300)
            //        {
            //            curtain.percent = e;
            //            curtain.refreshTime = DateTime.Now;
            //            System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
            //            d.Add("percent", curtain.percent.ToString());
            //            Control.SendWriteCommand(curtain, d);
            //        }
            //    })
            //    { IsBackground = true }.Start();
            //};
            controlBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
                inControl = false;
                curtainSeekBar.Progress = controlBar.Progress;
                new System.Threading.Thread(() =>
                {
                    curtain.percent = e;
                    curtain.refreshTime = DateTime.Now;
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("percent", curtain.percent.ToString());
                    Control.Ins.SendWriteCommand(curtain, d);
                    curtain.refreshTime = DateTime.Now;
                    DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                })
                { IsBackground = true }.Start();
            };
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePage.cs
@@ -368,10 +368,6 @@
            if (room.roomId == "" ||  sensor.roomIds.Contains(room.roomId))
            {
                var sensorTag = sensor.sid;
                if (sensor.bus != null)
                {
                    sensorTag = ((int)sensor.functionType % 256) + "_" + sensor.bus.SubnetID + "_" + sensor.bus.DeviceID + "_" + sensor.bus.LoopId;
                }
                FrameLayout sensorView = new FrameLayout()
                {
                    Width = Application.GetRealWidth(148),
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePageBLL.cs
old mode 100755 new mode 100644
@@ -19,10 +19,6 @@
                    for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++)
                    {
                        var sensorTag = sensor.sid;
                        if (sensor.bus != null)
                        {
                            sensorTag = ((int)sensor.functionType % 256) + "_" + sensor.bus.SubnetID + "_" + sensor.bus.DeviceID + "_" + sensor.bus.LoopId;
                        }
                        var view = bodyView.sensorListView.GetChildren(i);
                        if (view.GetType() == typeof(FrameLayout))
                        {
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
old mode 100755 new mode 100644
@@ -35,13 +35,6 @@
                    }
                    if (function.name != name)
                    {
                        Regex regtest = new Regex(@"\p{Cs}");
                        Match match = regtest.Match(name);
                        if (match.Success)
                        {
                            HDLCommon.Current.ShowAlert(Language.StringByID(StringId.CannotEnterSpecialCharacters));
                            return;
                        }
                        function.name = name;
                        btnFunctionName.Text = name;
                        function.SaveFunctionData(true);
HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs
old mode 100755 new mode 100644
@@ -64,7 +64,7 @@
        /// </summary>
        void LoadEvet_ChangeFadeTime()
        {
            barFadeTime.OnProgressChangedEvent = (sender, e) =>
            barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
            {
                light.fadeTime = e;
                light.SaveFunctionData(true);
@@ -78,8 +78,19 @@
        {
            barColorTemplatrue.OnProgressChangedEvent += (sender, value) =>
            {
                //设置自定义的文本
                barColorTemplatrue.SetCustomText(value * 100 + "K");
                new System.Threading.Thread(() =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        //设置自定义的文本
                        barColorTemplatrue.SetCustomText(value * 100 + "K");
                        light.Attr_CCT.curValue = value * 100;
                        System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                        d.Add(FunctionAttributeKey.CCT, light.Attr_CCT.curValue.ToString());
                        Control.Ins.SendWriteCommand(light, d);
                    });
                    System.Threading.Thread.Sleep(200);
                }).Start();
            };
        }
@@ -123,7 +134,6 @@
                if (e == 0 || e == 100)
                {
                    //Control.Send(CommandType_A.write, this.light);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.Brightness, light.brightness.ToString());
                    Control.Ins.SendWriteCommand(light, d);
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
old mode 100755 new mode 100644
@@ -63,7 +63,7 @@
        /// </summary>
        void LoadEvet_ChangeFadeTime()
        {
            barFadeTime.OnProgressChangedEvent = (sender, e) =>
            barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
            {
                light.fadeTime = e;
                light.SaveFunctionData(true);
HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs
@@ -90,7 +90,6 @@
                    light.SetRGBcolor(e2);
                    colorChangeTime = DateTime.Now;
                    btnCurColor.BackgroundColor = (uint)(0xFF000000 + light.GetRGBcolor());
                    //Control.Send(CommandType_A.write, this.light);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.RGB, light.GetRGBcolorString());
                    Control.Ins.SendWriteCommand(light, d);
@@ -144,7 +143,7 @@
            };
            dimmerBar.OnStopTrackingTouchEvent = (sender, e) => {
                new System.Threading.Thread(() => {
                    System.Threading.Thread.Sleep(100);
                    System.Threading.Thread.Sleep(200);
                    onDimmerBar = false;
                })
                { IsBackground = true }.Start();
@@ -166,7 +165,6 @@
                if (e == 0 || e == 100)
                {
                    //Control.Send(CommandType_A.write, this.light);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.Brightness, light.brightness.ToString());
                    Control.Ins.SendWriteCommand(light, d);
@@ -198,7 +196,7 @@
        /// </summary>
        void LoadEvet_ChangeFadeTime()
        {
            barFadeTime.MouseUpEventHandler = (sender, e) =>
            barFadeTime.OnStopTrackingTouchEvent = (sender, e) =>
            {
                light.fadeTime = barFadeTime.Progress;
                light.SaveFunctionData(true);
@@ -213,7 +211,7 @@
            {
                btnSwitch.IsSelected = !btnSwitch.IsSelected;
                dimmerBar.ProgressBarColor = btnSwitch.IsSelected ? CSS.CSS_Color.AuxiliaryColor1 : CSS.CSS_Color.PromptingColor2;
                bodyView.colorPicker.ColorImagePath = btnSwitch.IsSelected ? "FunctionIcon/Light/ColorWheel.png" : "FunctionIcon /Light/ColorWheelGray.png";
                bodyView.colorPicker.ColorImagePath = btnSwitch.IsSelected ? "FunctionIcon/Light/ColorWheel.png" : "FunctionIcon/Light/ColorWheelGray.png";
                new System.Threading.Thread(() =>
                {
                    light.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";