wei
2021-03-02 64390bc739286477167e186f1f2b40a27a73a9a5
20210302-1

完成凉霸对接。
窗帘状态修改。
涂鸦四件套
1个文件已添加
30个文件已修改
992 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/Resource.designer.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs 262 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,73 +1,54 @@
<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs">
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/2-Classification/RoomPage.cs" Line="80" Column="68" />
      <File FileName="HDL_ON/Entity/Room.cs" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" Line="417" Column="60" />
      <File FileName="HDL_ON/UI/MainPage.cs" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs" Line="186" Column="38" />
      <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="148" Column="70" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs" Line="388" Column="54" />
      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="863" Column="51" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" Line="369" Column="13" />
      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="750" Column="1" />
      <File FileName="HDL_ON/UI/UI0-Stan/Logic/HdlThreadLogic.cs" Line="97" Column="1" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionPage.cs" Line="1" Column="1" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionPageBLL.cs" Line="13" Column="56" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs" Line="78" Column="52" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs" Line="340" Column="22" />
      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="743" Column="75" />
      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="249" Column="69" />
      <File FileName="HDL_ON/UI/MainPage.cs" Line="29" Column="55" />
      <File FileName="HDL-ON_iOS/Info.plist" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs" Line="340" Column="42" />
    </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="DriverLayer" expanded="True" />
                <Node name="Mqtt" expanded="True" />
                <Node name="Server" 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="UI0-Stan" expanded="True">
                  <Node name="Logic" expanded="True" />
                </Node>
                <Node name="UI0-Stan" 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="3-Intelligence" expanded="True">
                    <Node name="Automation" expanded="True">
                      <Node name="ConditionDeviceFunList.cs" selected="True" />
                    </Node>
                  </Node>
                  <Node name="4-PersonalCenter" expanded="True" />
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="ArmSensor" expanded="True" />
                    <Node name="Electrical" expanded="True">
                      <Node name="ClothesHangerPage.cs" selected="True" />
                    </Node>
                  </Node>
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_Android" expanded="True">
              <Node name="Assets" expanded="True">
                <Node name="Phone" expanded="True">
                  <Node name="FunctionIcon" expanded="True">
                    <Node name="Electrical" expanded="True">
                      <Node name="ClothesHanger" expanded="True" />
                    </Node>
                    <Node name="Curtain" expanded="True" />
                    <Node name="Electrical" expanded="True" />
                  </Node>
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_iOS" expanded="True">
              <Node name="Resources" expanded="True">
                <Node name="Phone" expanded="True">
                  <Node name="FunctionIcon" expanded="True">
                    <Node name="Electrical" expanded="True">
                      <Node name="ClothesHanger" expanded="True" />
              <Node name="Resources" expanded="True" />
                    </Node>
                  </Node>
                </Node>
              </Node>
            </Node>
            <Node name="ys" expanded="True" />
          </Node>
        </State>
      </Pad>
@@ -79,7 +60,7 @@
    <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
    <String>Shared.IOS/Shared.IOS.csproj</String>
  </DisabledProjects>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore />
HDL-ON_Android/Assets/Language.ini
@@ -399,6 +399,21 @@
414=Controller on
415=Someone
416=Log
417=Water Leakage
418=In Alarm
419=Normal
420=Hot dry
421=Air dry
422=Disinfect
423=Lighting
424=Time
425=Hot dry time
426=Air dry time
427=Disinfect time
428=Anion Time
1002=Anion
    
5000=Music
5001=Group
@@ -1061,7 +1076,20 @@
413=控制器未开启
414=控制器已开启
415=有人
516=日志
416=日志
417=漏水
418=报警
419=正常
420=烘干
421=风干
422=消毒
423=照明
424=时间
425=烘干时间
426=风干时间
427=消毒时间
428=负离子时间
1000=室内湿度
1001=童锁
@@ -1164,7 +1192,6 @@
5047=你手机暂未安装"QQ音乐"{\r\n}请前往手机商场安装
6000=正常
6001=设备状态
6002=个
@@ -1180,50 +1207,8 @@
6012=红外遥控
6013=设备管理
6014=添加遥控器
6015=在线
6016=离线
6017=版本号
6018=请输入遥控器名称
6019=提示:遥控器创建后可在功能-电器分类{\r\n}查找使用
6020=推荐按键
6021=请输入按键名称
6022=下一步
6023=电源
6024=音量+
6025=音量-
6026=频道+
6027=频道-
6028=上
6029=下
6030=左
6031=右
6032=静音
6034=确认
6035=播放
6037=退出
6038=菜单
6039=暂停
6040=返回
6041=停止
6042=主页
6043=快进
6044=快退
6045=定时
6046=复制遥控功能
6047=对准遥控器中心按下相同按键
6048=智能遥控器
6049=添加按键
6050=*长按可进行自定义排序
6051=完成
6052=添加成功
6053=可到分类-功能-电器操作使用
6054=所属分类
6055=遥控器名称
6056=所属区域
6057=继续添加
6058=电器
6059=添加失败
6060=重试
7000=新建自动化
7001=编辑自动化
HDL-ON_Android/HDL-ON_Android.csproj
@@ -829,6 +829,7 @@
    <AndroidAsset Include="Assets\Phone\PirIcon\icon1.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\icon2.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\succeed.png" />
    <AndroidAsset Include="Assets\Phone\LogicIcon\selected+.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" />
HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202102252" android:versionName="1.1.202102252" package="com.hdl.onpro">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103021" android:versionName="1.1.202103021" package="com.hdl.onpro">
    <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" />
    <!--  定位权限-->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
@@ -116,8 +116,5 @@
        <!-- Required. AppKey copied from Portal -->
        <meta-data android:name="JPUSH_APPKEY" android:value="cbd90743ac45cbca06c8118b" />
        <!-- 极光推送结束 -->
    </application>
</manifest>
HDL-ON_Android/Resources/Resource.designer.cs
@@ -1,11 +1,10 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行时版本:4.0.30319.42000
//     This code was generated by a tool.
//
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@@ -15,7 +14,7 @@
{
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
    public partial class Resource
    {
        
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -885,7 +885,6 @@
      <BundleResource Include="Resources\Phone\LogicIcon\-.png" />
      <BundleResource Include="Resources\Phone\LogicIcon\+.png" />
      <BundleResource Include="Resources\Phone\LogicIcon\point.png" />
      <BundleResource Include="Resources\Phone\LogicIcon\ selected+.png" />
      <BundleResource Include="Resources\Phone\LogicIcon\selected-.png" />
      <BundleResource Include="Resources\Phone\oRobot.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Light\ColorWheelGray.png" />
@@ -1057,6 +1056,7 @@
      <BundleResource Include="Resources\Phone\PirIcon\online.png" />
      <BundleResource Include="Resources\Phone\PirIcon\adddevice.png" />
      <BundleResource Include="Resources\Phone\PirIcon\next.png" />
      <BundleResource Include="Resources\Phone\LogicIcon\selected+.png" />
    </ItemGroup>
    <ItemGroup>
      <ITunesArtwork Include="iTunesArtwork" />
HDL-ON_iOS/Info.plist
@@ -102,9 +102,9 @@
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>CFBundleShortVersionString</key>
    <string>1.1.202102242</string>
    <string>1.1.202103021</string>
    <key>CFBundleVersion</key>
    <string>202102242</string>
    <string>202103021</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Use geographic location to provide services such as weather</string>
    <key>NSAppleMusicUsageDescription</key>
HDL-ON_iOS/Resources/Language.ini
@@ -402,11 +402,20 @@
417=Water Leakage
418=In Alarm
419=Normal
420=Hot Dry
421=Air Dry
420=Hot dry
421=Air dry
422=Disinfect
423=Lighting
424=Time
425=Hot dry time
426=Air dry time
427=Disinfect time
428=Anion Time
429=h
430=m
1002=Anion
    
5000=Music
5001=Group
@@ -1077,6 +1086,13 @@
421=风干
422=消毒
423=照明
424=时间
425=烘干时间
426=风干时间
427=消毒时间
428=负离子时间
429=小时
430=分钟
1000=室内湿度
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store
Binary files differ
HDL_ON/Common/R.cs
@@ -4,7 +4,14 @@
{
    public static class StringId
    {
        public const int Lightint = 433;
        public const int MinuteUint = 430;
        public const int HourUint = 429;
        public const int AnionTime = 428;
        public const int DisinfectTime = 427;
        public const int WindDryTime = 426;
        public const int HotDryTime = 425;
        public const int Time = 424;
        public const int Lightint = 423;
        public const int Disinfect = 422;
        public const int WindDry = 421;
        public const int HotDry = 420;
HDL_ON/DAL/DriverLayer/Control.cs
@@ -733,9 +733,17 @@
        /// A协议数据
        /// </summary>
        /// <param name="updateBytes"></param>
        public void UpdataFunctionStatus(string revString, byte[] usefulBytes)
        public void UpdataFunctionStatus(string revString, byte[] usefulBytes,bool isCloudData = false)
        {
            MainPage.Log($"A协议更新状态:{revString}");
            if (Ins.GatewayOnline_Local && isCloudData)//本地链接,除了涂鸦设备数据之外的云端数据不处理
            {
                if (FunctionList.List.GetDeviceFunctionList(SPK.BrandType.Tuya).Count == 0)
                {
                    //MainPage.Log($"A协议更新状态:本地链接,除了涂鸦设备数据之外的云端数据不处理...");
                    return;
                }
            }
            var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<AlinkFunctionStatusObj>(revString);
            if (temp != null)
            {
@@ -745,8 +753,25 @@
                {
                    try
                    {
                        //bool hadChange = false;//状态有变化再更新界面
                        var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid);
                        if (Ins.GatewayOnline_Local && isCloudData)//本地链接,除了涂鸦设备数据之外的云端数据不处理
                        {
                            if(!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(localFunction.spk))
                            {
                                //MainPage.Log($"A协议更新状态:本地链接,除了涂鸦设备数据之外的云端数据不处理........");
                                return;
                            }
                        }
                        //MainPage.Log($"A协议更新状态:{revString}");
                        foreach (var attr in updateTemp.status)
                        {
                            var attrState = localFunction.status.Find((func) => func.key == attr.key);
                            if(attrState!= null)
                            {
                                attrState.value = attr.value;
                            }
                        }
                        if (localFunction != null)
                        {
                            //更新界面状态
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -246,7 +246,7 @@
                            try
                            {
                                var topic = e.ApplicationMessage.Topic;
                                MainPage.Log($"收到mqtt主题:{topic}");
                                //MainPage.Log($"收到mqtt主题:{topic}");
                                //一端口主题处理
                                if (DB_ResidenceData.Instance.GatewayType == 0 && !DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull())
                                {
@@ -283,7 +283,7 @@
                                {
                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
                                    var revString = Encoding.UTF8.GetString(bytes);
                                    Control.Ins.UpdataFunctionStatus(revString, null);
                                    Control.Ins.UpdataFunctionStatus(revString, null,true);
                                }
                                //一端口数据解析
                                else
HDL_ON/DAL/Server/NewAPI.cs
@@ -4,7 +4,7 @@
{
    public class NewAPI
    {
        #region 新微服务接口
        //#region 新微服务接口
        //***********************************************
        //注意:和住宅相关的接口要请求住宅所在区域的域名   regionUrl    
        //***********************************************
HDL_ON/Entity/Function/Function.cs
@@ -771,6 +771,19 @@
        /// 消毒剩余时间
        /// </summary>
        public const string DisinfectTimeLeft = "disinfect_time_surplus";
        /// <summary>
        /// 负离子
        /// </summary>
        public const string Anion = "anion";
        /// <summary>
        /// 负离子时间
        /// </summary>
        public const string AnionTime = "anion_time";
        /// <summary>
        /// 负离子剩余时间
        /// </summary>
        public const string AnionTimeLeft = "anion_time_surplus";
HDL_ON/HDL_ON.projitems
@@ -275,7 +275,6 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\WeatherCondition.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\1-test-\TestDialog.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\ThirdPartyBrandListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\EmptyClass.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\AddThirdPartyBrandListpage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Integratedbrand\IntegratedBrand.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\AirCleaner.cs" />
@@ -356,6 +355,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Method.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FailView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ReplicationView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\ClothesHangerSetTimePage.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)UI\" />
HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string VersionString = "1.1.0225";
        public static string VersionString = "1.1.0302";
        ///// <summary>
        ///// 客户端类型
        ///// </summary>
HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs
@@ -57,7 +57,6 @@
            var dialogBody = new NormalFrameLayout();
            FrameDialog.AddChidren(dialogBody);
            FrameDialog.Show();
            dialogBody.ButtonClickEvent += (sender, e) =>
            {
                if (ClickBackClose == true && this.btnCancel != null)
@@ -106,6 +105,8 @@
            btnConfirm.TextSize = CSS_FontSize.TextFontSize;
            frameWhiteBack.AddChidren(btnConfirm);
            FrameDialog.Show();
            return frameWhiteBack;
        }
HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs
@@ -17,6 +17,26 @@
        /// 结束事件(0:点击了取消  1:点击了确定,第二,三参数为时和分)
        /// </summary>
        public Action<int, int, int> FinishEvent = null;
        /// <summary>
        /// 小时取值范围
        /// </summary>
        List<int> hRange = new List<int>();
        /// <summary>
        /// 分钟取值范围
        /// </summary>
        List<int> mRange = new List<int>();
        /// <summary>
        /// 时间控件
        /// </summary>
        UIPickerView pickerView;
        //选择的时与分
        int selectHour = 0;
        int selectMinute = 0;
        //XX时
        List<string> listHour ;
        //XX分
        List<string> listMinute;
        #endregion
@@ -31,6 +51,34 @@
        {
            base.ClickBackClose = clickBackClose;
            base.StrTitle = i_title;
            for (int i = 0; i <= 23; i++)
            {
                hRange.Add(i);
            }
            for (int i = 0; i <= 59; i++)
            {
                mRange.Add(i);
            }
        }
        /// <summary>
        /// 底部时间选择控件
        /// </summary>
        /// <param name="i_title">标题</param>
        /// <param name="clickBackClose">点击背景时,是否关闭弹窗</param>
        public BottomTimeSelectControl(List<int> hoursRange,List<int> minuteRange ,int rowCount, string i_title = "", bool clickBackClose = true)
        {
            base.ClickBackClose = clickBackClose;
            base.StrTitle = i_title;
            hRange = hoursRange;
            mRange = minuteRange;
            base.RowCount = rowCount;
        }
        /// <summary>
@@ -38,19 +86,16 @@
        /// </summary>
        /// <param name="i_hour">默认选择时</param>
        /// <param name="i_minute">默认选择分</param>
        public void InitControl(int i_hour, int i_minute)
        /// <param name="contentView">选择区域高度</param>
        public void InitControl(int i_hour, int i_minute,int contentView = 297)
        {
            //已经初始化
            if (base.btnCancel != null) { return; }
            //初始化底层控件
            var frameWhiteBack = base.InitBaseControl();
            frameWhiteBack.Height = Application.GetRealHeight(297);
            frameWhiteBack.Y = frameWhiteBack.Parent.Height - Application.GetRealHeight(297 + 20);
            //选择的时与分
            int selectHour = 0;
            int selectMinute = 0;
            frameWhiteBack.Height = Application.GetRealHeight(contentView);
            //frameWhiteBack.Y = frameWhiteBack.Parent.Height - Application.GetRealHeight(297 + 20);
            //取消
            base.btnCancel.ButtonClickEvent += (sender, e) =>
@@ -78,22 +123,24 @@
            frameWhiteBack.AddChidren(btnLine);
            //时间控件
            var pickerView = new UIPickerView();
            pickerView = new UIPickerView();
            //时
            var strhour = Language.StringByID(StringId.h);
            //分
            var strMinute = Language.StringByID(StringId.m);
            //XX时
            var listHour = new List<string> { "00" + strhour };
            listHour = new List<string>();// { "00" + strhour };
            //XX分
            var listMinute = new List<string> { "00" + strMinute };
            for (int i = 1; i <= 23; i++)
            listMinute = new List<string>();// { "00" + strMinute };
            //for (int i = 1; i <= 23; i++)
            foreach(var hItem in hRange)
            {
                listHour.Add(i.ToString().PadLeft(2, '0') + strhour);
                listHour.Add(hItem.ToString().PadLeft(2, '0') + strhour);
            }
            for (int i = 1; i <= 59; i++)
            //for (int i = 1; i <= 59; i++)
            foreach (var mItem in mRange)
            {
                listMinute.Add(i.ToString().PadLeft(2, '0') + strMinute);
                listMinute.Add(mItem.ToString().PadLeft(2, '0') + strMinute);
            }
            pickerView.Height = frameWhiteBack.Height - btnLine.Bottom;
            pickerView.Width = frameWhiteBack.Width - Application.GetRealWidth(8) * 2;
@@ -117,6 +164,32 @@
            };
        }
        /// <summary>
        /// 特殊的集合选择事件,凉霸时间设置使用
        /// </summary>
        public void ChangePickerEvent()
        {
            pickerView.OnSelectChangeEvent = (value1, value2, value3) =>
            {
                if (value1 == 0 && value2 == 0)
                {
                    value2 = 1;
                    pickerView.setCurrentItems(value1, value2, 0);
                }
                else if (value1 == 4 && value2 == 1)
                {
                    value2 = 0;
                    pickerView.setCurrentItems(value1, value2, 0);
                }
                else
                {
                    //更改索引
                    selectHour = Convert.ToInt32(listHour[value1].Substring(0, 2));
                    selectMinute = Convert.ToInt32(listMinute[value2].Substring(0, 2));
                }
            };
        }
        #endregion
        #region ■ 一般方法___________________________
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -192,11 +192,12 @@
                //return;
                if (b)
                {
                    etAccount.Text = "13415629083";// "13415629083"//cf;//tujie"18316120654";// "15622703419";// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
                    etAccount.Text = "18666455392";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654";
                    // "15622703419";// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
                }
                else
                {
                    etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374
                    etAccount.Text = "18316672920";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374
                }
                b = !b;
                etPassword.Text = "123456";
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -173,7 +173,16 @@
                        {
                            if (view.Tag.ToString() == function.sid)
                            {
                                var state = function.trait_on_off.curValue.ToString() == "on";
                                var state = false;
                                if (function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainTrietex ||
                                function.spk == SPK.CurtainSwitch)//窗帘设备根据百分比判断开关状态
                                {
                                    state = function.GetAttrState(FunctionAttributeKey.Percent) != "0";
                                }
                                else
                                {
                                    state = function.trait_on_off.curValue.ToString() == "on";
                                }
                                for (int i = 0; i < view.ChildrenCount; i++)
                                {
                                    if (view.GetChildren(i).GetType() == typeof(Button))
@@ -325,13 +334,9 @@
        /// </summary>
        void LoadEvent_ControlCurtain(Curtain curtain, Button btnClose, Button btnOpen)
        {
            btnClose.MouseDownEventHandler = (sender, e) =>
            {
                btnClose.IsSelected = true;
            };
            btnClose.MouseUpEventHandler = (sender, e) =>
            {
                btnClose.IsSelected = false;
                btnClose.IsSelected = true;
                curtain.trait_on_off.curValue = "off";
                curtain.percent = 0;
                Dictionary<string, string> d = new Dictionary<string, string>();
@@ -339,13 +344,9 @@
                Control.Ins.SendWriteCommand(curtain, d);
            };
            btnOpen.MouseDownEventHandler = (sender, e) =>
            {
                btnOpen.IsSelected = true;
            };
            btnOpen.MouseUpEventHandler = (sender, e) =>
            {
                btnOpen.IsSelected = false;
                btnOpen.IsSelected = true;
                curtain.trait_on_off.curValue = "on";
                curtain.percent = 100;
                Dictionary<string, string> d = new Dictionary<string, string>();
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -58,6 +58,7 @@
                                        case FunctionCategory.Light:
                                        case FunctionCategory.AC:
                                        case FunctionCategory.FloorHeat:
                                        case FunctionCategory.Electric:
                                            #region 按钮状态更新
                                            if (cTag == updataFunction.sid + "_Switch")
                                            {
@@ -110,10 +111,14 @@
                                        #endregion
                                        case FunctionCategory.Curtain:
                                            #region 窗帘更新
                                            var uCurtain = updataFunction as Curtain;
                                            switch (uCurtain.trait_on_off.curValue.ToString())
                                            //var uCurtain = updataFunction as Curtain;
                                            var percentString = updataFunction.GetAttrState(FunctionAttributeKey.Percent);
                                            if (percentString != null)
                                            {
                                                case "off":
                                                int percent = 0;
                                                int.TryParse(percentString, out percent);
                                                if (percent == 0)
                                                {
                                                    if (cTag == updataFunction.sid + "_off")
                                                    {
                                                        try
@@ -126,8 +131,9 @@
                                                    {
                                                        (fcView.GetChildren(j) as Button).IsSelected = false;
                                                    }
                                                    break;
                                                case "on":
                                                }
                                                else
                                                {
                                                    if (cTag == updataFunction.sid + "_on")
                                                    {
                                                        try
@@ -140,21 +146,7 @@
                                                    {
                                                        (fcView.GetChildren(j) as Button).IsSelected = false;
                                                    }
                                                    break;
                                                case "stop":
                                                    if (cTag == updataFunction.sid + "_stop")
                                                    {
                                                        try
                                                        {
                                                            (fcView.GetChildren(j) as Button).IsSelected = true;
                                                        }
                                                        catch { }
                                                    }
                                                    else
                                                    {
                                                        (fcView.GetChildren(j) as Button).IsSelected = false;
                                                    }
                                                    break;
                                            }
                                            #endregion
                                            break;
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -370,7 +370,7 @@
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png",
                IsSelected = function.trait_on_off.curValue.ToString() == "off",
                IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) == "0",
                Tag = function.sid + "_off"
            };
            bodyDiv.AddChidren(btnCurtainClose);
@@ -384,7 +384,6 @@
                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);
@@ -397,7 +396,7 @@
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png",
                Tag = function.sid + "_on",
                IsSelected = function.trait_on_off.curValue.ToString() == "on"
                IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) != "0"
            };
            bodyDiv.AddChidren(btnCurtainOpen);
            LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function as Curtain);
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -137,7 +137,7 @@
                    onDimmerBar = false;
                    (bodyDiv.Parent as VerticalScrolViewLayout).ScrollEnabled = true;
                    light.brightness = dimmerControlBar.Progress;
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("brightness", light.brightness.ToString());
                    Control.Ins.SendWriteCommand(light, d);
                };
@@ -192,7 +192,7 @@
                btnOpen.IsSelected = false;
                curtain.trait_on_off.curValue = "off";
                curtain.percent = 0;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                Dictionary<string, string> d = new Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
            };
@@ -203,7 +203,7 @@
                btnClose.IsSelected = false;
                btnOpen.IsSelected = false;
                curtain.trait_on_off.curValue = "stop";
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                Dictionary<string, string> d = new Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
            };
@@ -215,7 +215,7 @@
                btnStop.IsSelected = false;
                curtain.trait_on_off.curValue = "on";
                curtain.percent = 100;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                Dictionary<string, string> d = new Dictionary<string, string>();
                d.Add("on_off", curtain.trait_on_off.curValue.ToString());
                Control.Ins.SendWriteCommand(curtain, d);
            };
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -244,7 +244,7 @@
                                        {
                                            string value = dic["value"];
                                            if (value == "true")
                                            if (value == "open")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.kaiqi);
@@ -1278,7 +1278,7 @@
                        foreach (var dic in dicList)
                        {
                            string value = dic["value"];
                            if (value == "true")
                            if (value == "open")
                            {
                                button1.Text = Language.StringByID(StringId.kaiqi);
                            }
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
@@ -21,22 +21,22 @@
                {
                    if (uCurtain.trait_on_off.curValue.ToString() == "stop")
                    {
                        bodyView.btnCurtainOpen.IsSelected = false;
                        bodyView.btnCurtainClose.IsSelected = false;
                        bodyView.btnCurtainStop.IsSelected = true;
                        //bodyView.btnCurtainOpen.IsSelected = false;
                        //bodyView.btnCurtainClose.IsSelected = false;
                        //bodyView.btnCurtainStop.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;
                    }
                }
@@ -72,34 +72,40 @@
        void LoadEvent_ControlEvent()
        {
            btnCurtainClose.MouseUpEventHandler = (sender, e) => {
                btnCurtainClose.IsSelected = true;
                btnCurtainStop.IsSelected = false;
                btnCurtainOpen.IsSelected = false;
                new System.Threading.Thread(() => {
                    System.Threading.Thread.Sleep(2000);
                    Application.RunOnMainThread(() => {
                        btnCurtainClose.IsSelected = false;
                    });
                }) { IsBackground = true }.Start();
                btnCurtainBgIcon.IsSelected = false;
                curtain.trait_on_off.curValue = "off";
                //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);
            };
            //btnCurtainStop.MouseDownEventHandler = (sender, e) =>
            //{
            //    btnCurtainStop.IsSelected = true;
            //    //btnCurtainClose.IsSelected = false;
            //    //btnCurtainOpen.IsSelected = false;
            //};
            //btnCurtainOpen.MouseDownEventHandler = (sender, e) => {
            //    btnCurtainOpen.IsSelected = true;
            //};
            //btnCurtainClose.MouseDownEventHandler = (sender, e) => {
            //    btnCurtainClose.IsSelected = true;
            //};
            btnCurtainStop.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainStop.IsSelected = true;
            };
            btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = true;
            };
            btnCurtainClose.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainClose.IsSelected = true;
            };
            btnCurtainStop.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = false;
                btnCurtainClose.IsSelected = false;
                btnCurtainStop.IsSelected = true;
                new System.Threading.Thread(() => {
                    System.Threading.Thread.Sleep(2000);
                    Application.RunOnMainThread(() => {
                        btnCurtainStop.IsSelected = false;
                    });
                })
                { IsBackground = true }.Start();
                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());
@@ -107,9 +113,13 @@
            };
            btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainStop.IsSelected = false;
                new System.Threading.Thread(() => {
                    System.Threading.Thread.Sleep(2000);
                    Application.RunOnMainThread(() => {
                        btnCurtainOpen.IsSelected = false;
                    });
                })
                { IsBackground = true }.Start();
                btnCurtainBgIcon.IsSelected = true;
                curtain.trait_on_off.curValue = "on";
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs
@@ -141,7 +141,7 @@
                Height = Application.GetRealWidth(177),
                Progress = curtain.percent,
                ProgressTextColor =0x00000000,
                IsInvertedProgress = true,
                //IsInvertedProgress = true,
            };
            controlView.AddChidren(curtainSeekBar);
@@ -202,6 +202,7 @@
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png",
                IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) == "0"
            };
            controlView.AddChidren(btnCurtainClose);
@@ -224,6 +225,7 @@
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png",
                IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) != "0"
            };
            controlView.AddChidren(btnCurtainOpen);
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -19,23 +19,13 @@
                    return;
                if (uCurtain.spk == bodyView.curtain.spk && uCurtain.sid == bodyView.curtain.sid)
                {
                    if (uCurtain.trait_on_off.curValue.ToString() == "stop")
                    var percentString = uCurtain.GetAttrState(FunctionAttributeKey.Percent);
                    if (percentString != null)
                    {
                        bodyView.btnCurtainOpen.IsSelected = false;
                        bodyView.btnCurtainClose.IsSelected = false;
                        bodyView.btnCurtainStop.IsSelected = true;
                    }
                    else if (uCurtain.trait_on_off.curValue.ToString() == "on")
                    {
                        bodyView.btnCurtainOpen.IsSelected = true;
                        bodyView.btnCurtainClose.IsSelected = false;
                        bodyView.btnCurtainStop.IsSelected = false;
                    }
                    else if (uCurtain.trait_on_off.curValue.ToString() == "off")
                    {
                        bodyView.btnCurtainOpen.IsSelected = false;
                        bodyView.btnCurtainClose.IsSelected = true;
                        bodyView.btnCurtainStop.IsSelected = false;
                        int percent = 0;
                        int.TryParse(percentString, out percent);
                        bodyView.btnCurtainOpen.IsSelected = percent > 0;
                        bodyView.btnCurtainClose.IsSelected = percent == 0;
                    }
                    try
                    {
@@ -146,11 +136,15 @@
        {
            btnCurtainClose.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainClose.IsSelected = true;
                btnCurtainOpen.IsSelected = false;
                btnCurtainStop.IsSelected = false;
                //new System.Threading.Thread(() => {
                //    System.Threading.Thread.Sleep(2000);
                //    Application.RunOnMainThread(() => {
                //        btnCurtainClose.IsSelected = false;
                //    });
                //})
                //{ IsBackground = true }.Start();
                curtain.trait_on_off.curValue = "off";
                curtain.percent = 100;
                curtain.percent = 0;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
@@ -159,31 +153,55 @@
            btnCurtainStop.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainStop.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainOpen.IsSelected = false;
                onCurtainAnimation = false;
                new System.Threading.Thread(() =>
                {
                    System.Threading.Thread.Sleep(2000);
                    Application.RunOnMainThread(() =>
                    {
                        btnCurtainStop.IsSelected = false;
                    });
                })
                { IsBackground = true }.Start();
                curtain.trait_on_off.curValue = "stop";
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                onCurtainAnimation = false;
            };
            btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainClose.IsSelected = false;
                btnCurtainStop.IsSelected = false;
                btnCurtainOpen.IsSelected = true;
                //new System.Threading.Thread(() => {
                //    System.Threading.Thread.Sleep(2000);
                //    Application.RunOnMainThread(() => {
                //        btnCurtainOpen.IsSelected = false;
                //    });
                //})
                //{ IsBackground = true }.Start();
                curtain.trait_on_off.curValue = "on";
                curtain.percent = 0;
                curtain.percent = 100;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                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;
            };
            btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = true;
                btnCurtainClose.IsSelected = false;
            };
            btnCurtainClose.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainClose.IsSelected = true;
                btnCurtainOpen.IsSelected = false;
            };
            //btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
            //{
            //    curtain.percent--;
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
@@ -202,6 +202,7 @@
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png",
                IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) == "0",
            };
            controlView.AddChidren(btnCurtainClose);
@@ -224,6 +225,7 @@
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png",
                SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png",
                IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) != "0",
            };
            controlView.AddChidren(btnCurtainOpen);
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
@@ -19,24 +19,11 @@
                    return;
                if (uCurtain.spk == bodyView.curtain.spk && uCurtain.sid == bodyView.curtain.sid)
                {
                    if (uCurtain.trait_on_off.curValue.ToString() == "stop")
                    {
                        bodyView.btnCurtainOpen.IsSelected = false;
                        bodyView.btnCurtainClose.IsSelected = false;
                        bodyView.btnCurtainStop.IsSelected = true;
                    }
                    else if (uCurtain.trait_on_off.curValue.ToString() == "on")
                    {
                        bodyView.btnCurtainOpen.IsSelected = true;
                        bodyView.btnCurtainClose.IsSelected = false;
                        bodyView.btnCurtainStop.IsSelected = false;
                    }
                    else if (uCurtain.trait_on_off.curValue.ToString() == "off")
                    {
                        bodyView.btnCurtainOpen.IsSelected = false;
                        bodyView.btnCurtainClose.IsSelected = true;
                        bodyView.btnCurtainStop.IsSelected = false;
                    }
                    var percentString = uCurtain.GetAttrState(FunctionAttributeKey.Percent);
                    int percent = 0;
                    int.TryParse(percentString, out percent);
                    bodyView.btnCurtainOpen.IsSelected = percent > 0;
                    bodyView.btnCurtainClose.IsSelected = percent == 0;
                    try
                    {
                        if (!bodyView.onCurtainAnimation)
@@ -146,11 +133,15 @@
        {
            btnCurtainClose.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = false;
                btnCurtainClose.IsSelected = true;
                btnCurtainStop.IsSelected = false;
                //new System.Threading.Thread(() => {
                //    System.Threading.Thread.Sleep(2000);
                //    Application.RunOnMainThread(() => {
                //        btnCurtainClose.IsSelected = false;
                //    });
                //})
                //{ IsBackground = true }.Start();
                curtain.trait_on_off.curValue = "off";
                curtain.percent = 100;
                curtain.percent = 0;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
@@ -159,9 +150,13 @@
            btnCurtainStop.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainStop.IsSelected = true;
                btnCurtainClose.IsSelected = false;
                btnCurtainOpen.IsSelected = false;
                new System.Threading.Thread(() => {
                    System.Threading.Thread.Sleep(2000);
                    Application.RunOnMainThread(() => {
                        btnCurtainStop.IsSelected = false;
                    });
                })
                { IsBackground = true }.Start();
                curtain.trait_on_off.curValue = "stop";
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
@@ -171,11 +166,15 @@
            btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
            {
                btnCurtainClose.IsSelected = false;
                btnCurtainStop.IsSelected = false;
                btnCurtainOpen.IsSelected = true;
                //new System.Threading.Thread(() => {
                //    System.Threading.Thread.Sleep(2000);
                //    Application.RunOnMainThread(() => {
                //        btnCurtainOpen.IsSelected = false;
                //    });
                //})
                //{ IsBackground = true }.Start();
                curtain.trait_on_off.curValue = "on";
                curtain.percent = 0;
                curtain.percent = 100;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
@@ -200,6 +199,23 @@
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
            };
            btnCurtainStop.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainStop.IsSelected = true;
            };
            btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainOpen.IsSelected = true;
                btnCurtainClose.IsSelected = false;
            };
            btnCurtainClose.MouseDownEventHandler = (sender, e) =>
            {
                btnCurtainClose.IsSelected = true;
                btnCurtainOpen.IsSelected = false;
            };
            //curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
            //{
            //    controlBar.Progress = curtainSeekBar.Progress;
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
@@ -153,9 +153,10 @@
                FrameWhiteCentet1.AddChidren(hotDryView);
                EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
                    device.SetAttrState(FunctionAttributeKey.HotDry, "true");
                    string onoff = hotDryView.Lighting ? "false" : "true";
                    device.SetAttrState(FunctionAttributeKey.HotDry, onoff);
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.HotDry, "true");
                    d.Add(FunctionAttributeKey.HotDry, onoff);
                    Control.Ins.SendWriteCommand(device, d);
                };
                hotDryView.SetThouchEvent(eventHandler);
@@ -180,9 +181,10 @@
                FrameWhiteCentet1.AddChidren(windDryView);
                EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
                    device.SetAttrState(FunctionAttributeKey.WindDry, "true");
                    string onoff = windDryView.Lighting ? "false" : "true";
                    device.SetAttrState(FunctionAttributeKey.WindDry, onoff);
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.WindDry, "true");
                    d.Add(FunctionAttributeKey.WindDry, onoff);
                    Control.Ins.SendWriteCommand(device, d);
                };
                windDryView.SetThouchEvent(eventHandler);
@@ -213,9 +215,10 @@
                FrameWhiteCentet1.AddChidren(disinfectView);
                EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
                    device.SetAttrState(FunctionAttributeKey.Disinfect, "true");
                    string onoff = disinfectView.Lighting ? "false" : "true";
                    device.SetAttrState(FunctionAttributeKey.Disinfect, onoff);
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.Disinfect, "true");
                    d.Add(FunctionAttributeKey.Disinfect, onoff);
                    Control.Ins.SendWriteCommand(device, d);
                };
                disinfectView.SetThouchEvent(eventHandler);
@@ -260,6 +263,32 @@
                index++;
            }
            #endregion
            #region 时间设置
            var timeSetView = new ClothesHangerControl(
                                "FunctionIcon/Electrical/ClothesHanger/ClothesHangerTimeIcon.png",
                                "FunctionIcon/Electrical/ClothesHanger/ClothesHangerTimeIconOn.png",
                                Language.StringByID(StringId.Time),
                                "");
            timeSetView.Width = Application.GetRealWidth(96);
            timeSetView.Height = Application.GetRealHeight(74);
            timeSetView.Y = Application.GetRealHeight(409);
            timeSetView.X = Application.GetRealWidth(266 - 33);
            EventHandler<MouseEventArgs> eventHandler_timeSetView = (sender, e) =>
            {
                var setTimePage = new ClothesHangerSetTimePage(device);
                MainPage.BasePageView.AddChidren(setTimePage);
                setTimePage.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            timeSetView.SetThouchEvent(eventHandler_timeSetView);
            FrameWhiteCentet1.AddChidren(timeSetView);
            #endregion
        }
@@ -325,16 +354,19 @@
                if (hotDryTimeLeftTemp != null)
                {
                    hotDryView.ChangeTime(hotDryTimeLeftTemp.value);
                    MainPage.Log($"烘干剩余时间{hotDryTimeLeftTemp.value}");
                }
                var windDryTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.WindDryTimeLeft);
                if (windDryTimeLeftTemp != null)
                {
                    windDryView.ChangeTime(windDryTimeLeftTemp.value);
                    MainPage.Log($"风干剩余时间{windDryTimeLeftTemp.value}");
                }
                var disinfectTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.DisinfectTimeLeft);
                if (disinfectTimeLeftTemp != null)
                {
                    disinfectView.ChangeTime(disinfectTimeLeftTemp.value);
                    MainPage.Log($"消毒剩余时间{disinfectTimeLeftTemp.value}");
                }
                #endregion
@@ -367,9 +399,15 @@
        private Button btnTitle;
        private Button btnTime;
        /// <summary>
        /// 倒计时时间
        /// </summary>
        private int leftTime = 0;
        /// <summary>
        /// 控件是否点亮
        /// </summary>
        public bool Lighting = false;
        public ClothesHangerControl(string iconPath1, string iconPath2,string title,string time)
        {
@@ -412,28 +450,21 @@
        /// <param name="newTime"></param>
        public void ChangeTime (string newTime)
        {
            if(newTime == "0")
            {
                newTime = "";
            }
            int time = 0;
            int.TryParse(newTime, out time);
            time = time * 60;
            int.TryParse(newTime, out leftTime);
            leftTime *= 60;
            if (countdownThread == null)
            {
                countdownThread = new System.Threading.Thread(() => {
                    while(true)
                    {
                        if(time>1)
                        if(leftTime > 1)
                        {
                            Application.RunOnMainThread(() =>
                            {
                                btnTime.Text = new TimeSpan(0, 0, time).ToString();
                                btnTime.Text = new TimeSpan(0, 0, leftTime).ToString();
                            });
                            System.Threading.Thread.Sleep(1000);
                            time--;
                            leftTime--;
                        }else
                        {
                            Application.RunOnMainThread(() =>
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs
New file
@@ -0,0 +1,262 @@
using System;
using System.Collections.Generic;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
using HDL_ON.Stan;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI
{
    public partial class ClothesHangerSetTimePage : FrameLayout
    {
        FrameLayout bodyView;
        Function device;
        public ClothesHangerSetTimePage(Function function)
        {
            device = function;
            bodyView = this;
        }
        /// <summary>
        /// 加载界面
        /// </summary>
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(StringId.Time)).LoadTopView();
            VerticalScrolViewLayout functionListView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(530),
                BackgroundColor = CSS_Color.BackgroundColor,
                ScrollEnabled = false,
            };
            bodyView.AddChidren(functionListView);
            /// <summary>
            /// 小时取值范围
            /// </summary>
            List<int> hRange = new List<int> { 0, 1, 2, 3, 4 };
            /// <summary>
            /// 分钟取值范围
            /// </summary>
            List<int> mRange = new List<int> { 0, 30 };
            var menu = new List<string>() {
                FunctionAttributeKey.HotDryTime,
                FunctionAttributeKey.WindDryTime,
                FunctionAttributeKey.DisinfectTime,
                FunctionAttributeKey.AnionTime
            };
            List<string> attrs = device.GetAttributes();
            #region 烘干时间
            ListCellView hotDryTimeCell;
            hotDryTimeCell = new ListCellView()
            {
                Height = Application.GetRealHeight(50),
            };
            hotDryTimeCell.BtnTilte.TextID = StringId.HotDryTime;
            if (attrs.Contains(menu[0]))
            {
                var hotDryTime = 0;
                int.TryParse(device.GetAttrState(FunctionAttributeKey.HotDryTime), out hotDryTime);
                hotDryTimeCell.BtnSubtitle.Text = hotDryTime / 60 + Language.StringByID(StringId.HourUint) + hotDryTime % 60 + Language.StringByID(StringId.MinuteUint);
                functionListView.AddChidren(hotDryTimeCell);
                hotDryTimeCell.GoAction = () =>
                {
                    BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3, Language.StringByID(StringId.HotDryTime));
                    timeControl.RowHeight = Application.GetRealHeight(50);
                    timeControl.InitControl(0, 1, 162);
                    timeControl.ChangePickerEvent();
                    timeControl.FinishEvent = (type, hours, min) =>
                    {
                        if (type == 1)//0:取消;1:确定
                        {
                            HdlThreadLogic.Current.RunThread(() =>
                            {
                                var time = hours * 60 + min;
                                var dic = new Dictionary<string, string>();
                                dic.Add(FunctionAttributeKey.HotDryTime, time.ToString());
                                Control.Ins.SendWriteCommand(this.device, dic);
                                HdlThreadLogic.Current.RunMain(() =>
                                {
                                    hotDryTimeCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint);
                                });
                            });
                        }
                    };
                };
            }
            #endregion
            #region 风干时间
            ListCellView windDryCell;
            windDryCell = new ListCellView()
            {
                Height = Application.GetRealHeight(50),
            };
            windDryCell.BtnTilte.TextID = StringId.WindDryTime;
            windDryCell.BtnSubtitle.Text = device.GetAttrState(FunctionAttributeKey.WindDryTime);
            if (attrs.Contains(menu[1]))
            {
                var windDryTime = 0;
                int.TryParse(device.GetAttrState(FunctionAttributeKey.WindDryTime), out windDryTime);
                windDryCell.BtnSubtitle.Text = windDryTime / 60 + Language.StringByID(StringId.HourUint) + windDryTime % 60 + Language.StringByID(StringId.MinuteUint);
                functionListView.AddChidren(windDryCell);
                windDryCell.GoAction = () =>
                {
                    BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3,Language.StringByID(StringId.WindDryTime));
                    timeControl.RowHeight = Application.GetRealHeight(50);
                    timeControl.InitControl(0, 1, 162);
                    timeControl.ChangePickerEvent();
                    timeControl.FinishEvent = (type, hours, min) =>
                    {
                        if (type == 1)//0:取消;1:确定
                        {
                            HdlThreadLogic.Current.RunThread(() =>
                            {
                                var time = hours * 60 + min;
                                var dic = new Dictionary<string, string>();
                                dic.Add(FunctionAttributeKey.WindDryTime, time.ToString());
                                Control.Ins.SendWriteCommand(this.device, dic);
                                HdlThreadLogic.Current.RunMain(() =>
                                {
                                    windDryCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint);
                                });
                            });
                        }
                    };
                };
            }
            else
            {
                hotDryTimeCell.LineView.RemoveFromParent();
            }
            #endregion
            #region 消毒时间
            ListCellView disinfectTimeCell;
            disinfectTimeCell = new ListCellView()
            {
                Height = Application.GetRealHeight(50),
            };
            disinfectTimeCell.BtnTilte.TextID = StringId.DisinfectTime;
            disinfectTimeCell.BtnSubtitle.Text = device.GetAttrState(FunctionAttributeKey.DisinfectTime);
            if (attrs.Contains(menu[2]))
            {
                var disinfectTime = 0;
                int.TryParse(device.GetAttrState(FunctionAttributeKey.DisinfectTime), out disinfectTime);
                disinfectTimeCell.BtnSubtitle.Text = disinfectTime / 60 + Language.StringByID(StringId.HourUint) + disinfectTime % 60 + Language.StringByID(StringId.MinuteUint);
                functionListView.AddChidren(disinfectTimeCell);
                disinfectTimeCell.GoAction = () => {
                    BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3, Language.StringByID(StringId.DisinfectTime));
                    timeControl.RowHeight = Application.GetRealHeight(50);
                    timeControl.InitControl(0, 1, 162);
                    timeControl.ChangePickerEvent();
                    timeControl.FinishEvent = (type, hours, min) => {
                        if (type == 1)//0:取消;1:确定
                        {
                            HdlThreadLogic.Current.RunThread(() =>
                            {
                                var time = hours * 60 + min;
                                var dic = new Dictionary<string, string>();
                                dic.Add(FunctionAttributeKey.DisinfectTime, time.ToString());
                                Control.Ins.SendWriteCommand(this.device, dic);
                                HdlThreadLogic.Current.RunMain(() =>
                                {
                                    disinfectTimeCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint);
                                });
                            });
                        }
                    };
                };
            }
            else
            {
                windDryCell.LineView.RemoveFromParent();
            }
            #endregion
            #region 负离子时间
            ListCellView anionTimeCell;
            anionTimeCell = new ListCellView()
            {
                Height = Application.GetRealHeight(50),
            };
            anionTimeCell.BtnTilte.TextID = StringId.AnionTime;
            anionTimeCell.BtnSubtitle.Text = device.GetAttrState(FunctionAttributeKey.AnionTime);
            if (attrs.Contains(menu[3]))
            {
                var anionTime = 0;
                int.TryParse(device.GetAttrState(FunctionAttributeKey.HotDryTime), out anionTime);
                anionTimeCell.BtnSubtitle.Text = anionTime / 60 + Language.StringByID(StringId.HourUint) + anionTime % 60 + Language.StringByID(StringId.MinuteUint);
                functionListView.AddChidren(anionTimeCell);
                anionTimeCell.LineView.RemoveFromParent();
                anionTimeCell.GoAction = () => {
                    BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3,Language.StringByID(StringId.AnionTime));
                    timeControl.RowHeight = Application.GetRealHeight(50);
                    timeControl.InitControl(0, 1, 162);
                    timeControl.ChangePickerEvent();
                    timeControl.FinishEvent = (type, hours, min) => {
                        if (type == 1)//0:取消;1:确定
                        {
                            HdlThreadLogic.Current.RunThread(() =>
                            {
                                var time = hours * 60 + min;
                                var dic = new Dictionary<string, string>();
                                dic.Add(FunctionAttributeKey.AnionTime, time.ToString());
                                Control.Ins.SendWriteCommand(this.device, dic);
                                HdlThreadLogic.Current.RunMain(() =>
                                {
                                    anionTimeCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint);
                                });
                            });
                        }
                    };
                };
            }
            else
            {
                disinfectTimeCell.LineView.RemoveFromParent();
            }
            #endregion
        }
    }
    //---------------------------------------
    public partial class ClothesHangerSetTimePage
    {
    }
    //========================================
}