2个文件已添加
70个文件已修改
2830 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/LC/IOS/Shared.IOS.LCVideoOnSDK.dll 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/AppDelegate.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/ViewController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/ApiUtlis.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Scene.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/FunctionList.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/TopViewDiv.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation 2.zip 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation.zip 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 353 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 295 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/OnePortAutomation.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/OutdoorEnvironment.cs 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs 389 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Matching.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/PjtPage.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/StbPage.cs 240 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,36 +1,25 @@
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" />
  <MonoDevelop.Ide.Workbench>
<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/Entity/Function/Function.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs" Line="15" Column="35" />
      <File FileName="HDL_ON/Common/HDLCommon.cs" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs" />
      <File FileName="HDL-ON_Android/Application.cs" />
      <File FileName="HDL_ON/UI/MainPage.cs" Line="359" Column="40" />
      <File FileName="HDL_ON/UI/BindingResidence/BindingResidencePage.cs" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" />
      <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="190" Column="57" />
      <File FileName="HDL_ON/Entity/Function/Function.cs" Line="420" Column="21" />
    </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="Mqtt" expanded="True" />
                <Node name="Server" expanded="True" />
              </Node>
              <Node name="Entity" expanded="True" />
              <Node name="UI" expanded="True">
                <Node name="BindingResidence" expanded="True" />
                <Node name="UI2" expanded="True">
                  <Node name="3-Intelligence" expanded="True">
                    <Node name="Scene" expanded="True" />
                  </Node>
                  <Node name="4-PersonalCenter" expanded="True" />
              <Node name="Entity" expanded="True">
                <Node name="Function" expanded="True">
                  <Node name="Function.cs" selected="True" />
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_Android" expanded="True" selected="True" />
            <Node name="HDL-ON_iOS" expanded="True" />
          </Node>
        </State>
@@ -44,9 +33,11 @@
    <String>Shared.IOS/Shared.IOS.csproj</String>
  </DisabledProjects>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.7374d754" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore />
    <BreakpointStore>
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" line="42" column="1" />
    </BreakpointStore>
  </MonoDevelop.Ide.DebuggingService.Breakpoints>
  <MultiItemStartupConfigurations />
</Properties>
DLL/LC/IOS/Shared.IOS.LCVideoOnSDK.dll
Binary files differ
HDL-ON_Android/Assets/Language.ini
@@ -641,7 +641,7 @@
 
4000=Video intercom
4001=Call record
4002=*Cloud photos are only kept for 30 days
4002=*Cloud records are only kept for 30 days
4003=Door phone call
4004=Answered
4005=Unlocked
@@ -790,7 +790,7 @@
6081=Select IR brand
6082=Shaking
6083=Low speed
6084=Medium speed
6084=Wind Speed Switch
6085=High speed
6086=Auto
6087=Temperature+
@@ -831,6 +831,15 @@
7133=Executed
7134=Target State
7135=Tumble
7136=Temperature
7137=Humidity
7138=PM2.5
7139=CO2
7140=TVOC
7141=Exceeding
7142=Serious
7143=High
7144=excellence
 
 
6000=Rename
@@ -1695,7 +1704,7 @@
1152=不能自己过户给自己
1153=终止
1154=正在过户给用户,请稍后...
1155=用户{0}已经成为住宅行管理员
1155=用户{0}已经成为住宅新管理员
1156=该住宅的信息将在您的账号中删除
1157=过户失败
1158=请重新尝试
@@ -1711,7 +1720,7 @@
 
4000=可视对讲
4001=通话记录
4002=*云端照片只保留30天
4002=*云端记录只保留30天
4003=门口机呼叫
4004=已接听
4005=已开锁
@@ -1857,7 +1866,7 @@
6081=选择红外品牌
6082=摇头
6083=低速
6084=中速
6084=风速切换
6085=高速
6086=自动
6087=温度+
@@ -2007,6 +2016,16 @@
7133=已执行
7134=目标状态
7135=跌倒
7136=温度
7137=湿度
7138=PM2.5
7139=CO2
7140=TVOC
7141=超标
7142=严重
7143=偏高
7144=优秀
 
9000=请使用新的手机账号登录APP
9001=请使用新的邮箱账号登录APP
HDL-ON_Android/HDL-ON_Android.csproj
@@ -51,7 +51,6 @@
    <MandroidI18n>cjk</MandroidI18n>
    <AndroidEnableSGenConcurrent>false</AndroidEnableSGenConcurrent>
    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
    <AndroidSupportedAbis>armeabi-v7a;arm64-v8a</AndroidSupportedAbis>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
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="202107023" android:versionName="1.2.202107023" package="com.hdl.onpro">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202107081" android:versionName="1.2.202107081" package="com.hdl.onpro">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" />
    <!--  可视对讲权限-->
    <uses-permission android:name="android.permission.CAMERA" />
HDL-ON_iOS/AppDelegate.cs
@@ -245,6 +245,7 @@
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Console.WriteLine("111111111111");
            SetCurrentLanguage();
            //Shared.Application.FontSize = 12;
            //Bugly.Bugly.StartWithAppId("b58fb35436");
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -54,7 +54,6 @@
        <MtouchLink>SdkOnly</MtouchLink>
        <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
        <MtouchEnableSGenConc>false</MtouchEnableSGenConc>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignProvision>On+Dev-20210616-1</CodesignProvision>
    </PropertyGroup>
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
HDL-ON_iOS/Info.plist
@@ -13,10 +13,6 @@
            <string>AispeechMobile</string>
        </dict>
        <dict>
            <key>CFBundleURLName</key>
            <string>xiaoduapp</string>
        </dict>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>hdlonpro</string>
@@ -104,9 +100,9 @@
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>CFBundleShortVersionString</key>
    <string>1.2.202107023</string>
    <string>1.2.202107081</string>
    <key>CFBundleVersion</key>
    <string>1.2.07023</string>
    <string>1.2.07081</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Use geographic location to provide services such as weather</string>
    <key>NSAppleMusicUsageDescription</key>
HDL-ON_iOS/Resources/Language.ini
@@ -640,7 +640,7 @@
 
4000=Video intercom
4001=Call record
4002=*Cloud photos are only kept for 30 days
4002=*Cloud records are only kept for 30 days
4003=Door phone call
4004=Answered
4005=Unlocked
@@ -789,7 +789,7 @@
6081=Select IR brand
6082=Shaking
6083=Low speed
6084=Medium speed
6084=Wind Speed Switch
6085=High speed
6086=Auto
6087=Temperature+
@@ -830,6 +830,15 @@
7133=Executed
7134=Target State
7135=Tumble
7136=Temperature
7137=Humidity
7138=PM2.5
7139=CO2
7140=TVOC
7141=Exceeding
7142=Serious
7143=High
7144=excellence
 
 
6000=Rename
@@ -1694,7 +1703,7 @@
1152=不能自己过户给自己
1153=终止
1154=正在过户给用户,请稍后...
1155=用户{0}已经成为住宅行管理员
1155=用户{0}已经成为住宅新管理员
1156=该住宅的信息将在您的账号中删除
1157=过户失败
1158=请重新尝试
@@ -1710,7 +1719,7 @@
 
4000=可视对讲
4001=通话记录
4002=*云端照片只保留30天
4002=*云端记录只保留30天
4003=门口机呼叫
4004=已接听
4005=已开锁
@@ -1793,7 +1802,7 @@
6016=离线
6017=版本号
6018=请输入遥控器名称
6019=提示:遥控器创建后可在功能-电器分类{\r\n}查找使用
6019=提示:遥控器创建后可在功能-电器分类,查找使用
6020=推荐按键
6021=请输入按键名称
6022=下一步
@@ -1856,7 +1865,7 @@
6081=选择红外品牌
6082=摇头
6083=低速
6084=中速
6084=风速切换
6085=高速
6086=自动
6087=温度+
@@ -2006,6 +2015,15 @@
7133=已执行
7134=目标状态
7135=跌倒
7136=温度
7137=湿度
7138=PM2.5
7139=CO2
7140=TVOC
7141=超标
7142=严重
7143=偏高
7144=优秀
 
9000=请使用新的手机账号登录APP
9001=请使用新的邮箱账号登录APP
HDL-ON_iOS/ViewController.cs
@@ -24,6 +24,7 @@
        public override void ViewDidLoad()
        {
            Console.WriteLine("qidong 1111");
            base.ViewDidLoad();
            HDL_ON.MainPage.Show();
HDL_ON/Common/ApiUtlis.cs
@@ -187,7 +187,6 @@
                        //处理剩下的新增功能
                        foreach (var newFunction in deviceList.list) 
                        {
                            MainPage.Log(newFunction.savePath);
                            newFunction.SaveFunctionFile();
                            FunctionList.List.IniFunctionList(newFunction.savePath);
                        }
@@ -340,6 +339,8 @@
                        UI.Music.A31MusicModel.ReadMusicStates();
                        //搜索网关
                        DriverLayer.Control.Ins.SearchLoaclGateway();
                        //重新连接mqtt
                        DAL.Mqtt.MqttClient.DisConnectRemote("刷新数据,重连mqtt",false);
                        #endregion
                    }
                }
HDL_ON/Common/R.cs
@@ -1386,7 +1386,7 @@
        public const int xuanzehongwaipinpai= 6081;
        public const int yaotou = 6082;
        public const int disu = 6083;
        public const int zhongsu = 6084;
        public const int fengsuqiehuan = 6084;
        public const int gaosu = 6085;
        public const int zidong = 6086;
        public const int wendujia = 6087;
@@ -1534,6 +1534,16 @@
        public const int yizhixing = 7133;
        public const int mubiaozhuangtai = 7134;
        public const int diedao = 7135;
        public const int wendu = 7136;
        public const int shidu = 7137;
        public const int pm25 = 7138;
        public const int co2 = 7139;
        public const int tvoc = 7140;
        public const int chaobiao = 7141;
        public const int yanzhong = 7142;
        public const int piangao = 7143;
        public const int youxiu = 7144;
        #region LE新增
        /// <summary>
HDL_ON/DAL/DriverLayer/Control.cs
@@ -359,6 +359,15 @@
                    }
                }
            }
            //Bug修复:一端口远程控制调光设备的调光属性时,无法控制到0,反复横跳。
            //因为On + 远程控制发送给云端使用的是link协议数据,杨涛中转给高胜处理时候逻辑上有冲突,导致无法单独控制亮度值,需要同时发送开关值与亮度值。
            if (DB_ResidenceData.Instance.GatewayType == 0)
            {
                if(commandDictionary.Count == 1 && commandDictionary.ContainsKey(FunctionAttributeKey.Brightness))
                {
                    commandDictionary.Add(FunctionAttributeKey.OnOff, commandDictionary[FunctionAttributeKey.Brightness] == "0" ? "off" : "on");
                }
            }
            ///dome控制
            if (MainPage.NoLoginMode)
@@ -467,28 +476,41 @@
            }
            var count = 0;
            var logString = open ? "打开\r\n" : "关闭\r\n";
            List<ApiAlinkControlActionObj> actionObjs = new List<ApiAlinkControlActionObj>();
            Dictionary<string, string> d = new Dictionary<string, string>();
            d.Add(FunctionAttributeKey.OnOff, open ? "on" : "off");
            var pm = new DAL.Server.HttpServerRequest();
            foreach (var temp in functions)
            //一端口全开全关需要延时发送
            if (DB_ResidenceData.Instance.GatewayType == 0)
            {
                logString += temp.spk + ":" + temp.sid + "\r\n";
                var apiControlData = temp.GetApiControlData(d);
                actionObjs.Add(apiControlData);
                count++;
                if (count > 9)
                new System.Threading.Thread(() =>
                {
                    var result = pm.ControlDevice(actionObjs);
                    actionObjs = new List<ApiAlinkControlActionObj>();
                    count = 0;
                    MainPage.Log(logString);
                    logString = "";
                }
                    foreach (var temp in functions)
                    {
                        var apiControlData = temp.GetApiControlData(d);
                        var result = pm.ControlDevice(new List<ApiAlinkControlActionObj>() { apiControlData });
                        System.Threading.Thread.Sleep(100);
                    }
                })
                { IsBackground = true }.Start();
            }
            var pack = pm.ControlDevice(actionObjs);
            MainPage.Log(logString);
            else
            {
                foreach (var temp in functions)
                {
                    var apiControlData = temp.GetApiControlData(d);
                    actionObjs.Add(apiControlData);
                    count++;
                    if (count > 9)
                    {
                        var result = pm.ControlDevice(actionObjs);
                        actionObjs = new List<ApiAlinkControlActionObj>();
                        count = 0;
                        System.Threading.Thread.Sleep(100);
                    }
                }
                var pack = pm.ControlDevice(actionObjs);
            }
        }
        public void SendApiReadCommand(List<string> functionIds)
@@ -889,6 +911,17 @@
                                }
                                EnvironmentalPage.LoadEvent_UpdataStatus(localFunction);
                                break;
                            case SPK.SensorEnvironment:
                                if (localFunction.GetAttributes().Contains(FunctionAttributeKey.Temperature))
                                {
                                    HomePage.LoadEvent_RefreshEnvirIndoorTemp();
                                }
                                if (localFunction.GetAttributes().Contains(FunctionAttributeKey.Humidity))
                                {
                                    HomePage.LoadEvent_RefreshEnvirIndoorHumi();
                                }
                                EnvironmentalPage.LoadEvent_UpdataStatus(localFunction);
                                break;
                            case SPK.ElectricSocket:
                                SocketPage.UpdataState(localFunction);
                                break;
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -20,7 +20,7 @@
        /// <summary>
        /// 加密通讯KEY
        /// </summary>
        static string mqttEncryptKey = "";
        //static string mqttEncryptKey = "";
        static string tuyaEncryptKey = "";
        //static string checkGatewayTopicBase64 = "";
        static bool hadGateway = true;
@@ -301,7 +301,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())
                                {
@@ -328,10 +328,7 @@
                                }
                                //一些特殊的主题处理(为了执行速度,尽可能的别加耗时的操作 true:执行了特殊处理 false:没有执行特殊处理)
                                if (Stan.HdlCloudReceiveLogic.Current.CloudOverallMsgReceiveEx(topic, e.ApplicationMessage.Payload, mqttEncryptKey, tuyaEncryptKey) == true)
                                {
                                    return;
                                }
                                Stan.HdlCloudReceiveLogic.Current.CloudOverallMsgReceiveEx(topic, e.ApplicationMessage.Payload, DB_ResidenceData.Instance.HomeGateway.aesKey, tuyaEncryptKey);
                                if (topic == $"/BusGateWayToClient/{UserInfo.Current.ID}" + PushNotifySqueeze)
                                {
@@ -435,10 +432,7 @@
                                {
                                    var pm = new HttpServerRequest();
                                    pm.GetHomeGatewayList();
                                    MainPage.Log($"网关密钥变更");
                                    MainPage.Log($"旧密钥:{mqttEncryptKey}");
                                    mqttEncryptKey = MqttInfoConfig.Current.HomeGatewayInfo.aesKey;
                                    MainPage.Log($"新密钥:{mqttEncryptKey}");
                                    MainPage.Log($"网关密钥变更.新密钥:{DB_ResidenceData.Instance.HomeGateway.aesKey}");
                                }
                                #endregion
@@ -457,9 +451,9 @@
                                    //bus数据解析
                                    var packet = new Packet();
                                    if (!string.IsNullOrEmpty(mqttEncryptKey))
                                    if (!string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.aesKey))
                                    {
                                        packet.Bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, mqttEncryptKey);
                                        packet.Bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, DB_ResidenceData.Instance.HomeGateway.aesKey);
                                    }
                                    else
                                    {
@@ -629,7 +623,7 @@
                    mqttEncryptKey = MqttInfoConfig.Current.HomeGatewayInfo.aesKey;
                    //mqttEncryptKey = MqttInfoConfig.Current.HomeGatewayInfo.aesKey;
                    //解密密钥规则:已现有的住宅ID为基准,从右边一一获取值,最后如果不够16位,则往右补零
                    string aesKey = string.Empty;
                    for (int i = DB_ResidenceData.Instance.CurrentRegion.id.Length - 1; i >= 0; i--)
@@ -805,9 +799,9 @@
                {
                    case 0:
                        topicName = $"/ClientToBusGateWay/{MqttInfoConfig.Current.HomeGatewayInfo.gatewayId}/Common/ON";
                        if (!string.IsNullOrEmpty(mqttEncryptKey))
                        if (!string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.aesKey))
                        {
                            message = Securitys.EncryptionService.AesEncryptPayload(message, mqttEncryptKey);
                            message = Securitys.EncryptionService.AesEncryptPayload(message, DB_ResidenceData.Instance.HomeGateway.aesKey);
                        }
                        await RemoteMqttClient.PublishAsync(new MqttApplicationMessage { Topic = topicName, Payload = message, Retain = false, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce });
                        break;
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1959,7 +1959,7 @@
            d.Add("actions", actionObjs);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            MainPage.Log($"{requestJson}");
            MainPage.Log($"api功能控制:{requestJson}");
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_ControlDevice, requestJson);
        }
        /// <summary>
HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@
        /// 公共域名就近解析
        /// 
        /// </summary>
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        /// <summary>
        /// RegionMark
        /// </summary>
@@ -162,10 +162,6 @@
                }
                string requestFullUrl = urlHead + apiPath;
                ////**************测试**************
                string requestFullUrl = GlobalRequestHttpsHost + apiPath;
                ////**************测试**************
                RestClient client = new RestClient(requestFullUrl);
@@ -333,10 +329,6 @@
                    urlHead = OnAppConfig.Instance.RequestHttpsHost;
                }
                string requestFullUrl = urlHead + apiPath;
                ////**************测试**************
                //string requestFullUrl = GlobalRequestHttpsHost + apiPath;
                ////**************测试**************
                RestClient client = new RestClient(requestFullUrl);
                RestRequest request = new RestRequest(Method.POST);
HDL_ON/DAL/Server/NewAPI.cs
@@ -151,7 +151,7 @@
        /// 下载账号头像
        /// </summary>
        public const string API_POST_DownloadHeadImage = "/home-wisdom/app/head/portrait/downWithAccount";
        #region 数据分享
        /// <summary>
        /// 分享指定文件给指定成员
@@ -310,14 +310,14 @@
        /// <summary>
        /// 检测更新,是否需要强制更新
        /// </summary>
        public const string API_POST_CheckAppVersion= "/smart-footstone/app/appVersion/check";
        public const string API_POST_CheckAppVersion = "/smart-footstone/app/appVersion/check";
        ///// <summary>
        ///// 查询APP最新版本
        ///// </summary>
        //public const string API_POST_GetAppVersion = "/smart-footstone/app/getAppVersion";
        #endregion
        #region ■  -- 房间场景背景图片上传下载接口___________________________
        /// <summary>
@@ -348,7 +348,7 @@
        /// 获取设备详情
        /// </summary>
        public const string Api_Post_GetDevcieInfoList = "/home-wisdom/app/device/info";
        /// <summary>
        /// 刷新设备状
        /// </summary>
@@ -450,6 +450,53 @@
        #endregion
        #region Kaede -- 安防接口____________________________
        /// <summary>
        /// 获取安防列表
        /// </summary>
        public const string Api_Post_Security_List = "/home-wisdom/app/security/list";
        /// <summary>
        /// 获取安防详情
        /// </summary>
        public const string Api_Post_Security_Info = "/home-wisdom/app/security/info";
        /// <summary>
        /// 添加安防
        /// </summary>
        public const string Api_Post_Security_Add = "/home-wisdom/app/security/add";
        /// <summary>
        /// 编辑安防
        /// </summary>
        public const string Api_Post_Security_Edit = "/home-wisdom/app/security/update";
        /// <summary>
        /// 删除安防
        /// </summary>
        public const string Api_Post_Security_Delete = "/home-wisdom/app/security/delete";
        /// <summary>
        /// 读取安防防区状态
        /// </summary>
        public const string Api_Post_Security_StatusRead = "/home-wisdom/app/security/statusRead";
        /// <summary>
        /// 设置安防防区状态
        /// </summary>
        public const string Api_Post_Security_StatusSet = "/home-wisdom/app/security/statusSet";
        /// <summary>
        /// 安防bypass设置
        /// </summary>
        public const string Api_Post_Security_BypassSet = "/home-wisdom/app/security/bypassSet";
        /// <summary>
        /// 安防bypass读取
        /// </summary>
        public const string Api_Post_Security_BypassRead = "/home-wisdom/app/security/bypassRead";
        /// <summary>
        /// 查询安防所有记录
        /// </summary>
        public const string Api_Post_Security_ListSecurityLog = "/home-wisdom/app/security/listSecurityLog";
        /// <summary>
        /// 查询安防报警记录
        /// </summary>
        public const string Api_Post_Security_ListAlarmLog = "/home-wisdom/app/security/listAlarmLog";
        #endregion
        #region ■  -- 房间、设备、场景分享___________________________
@@ -553,13 +600,13 @@
        /// 河东获取萤石云子账号token的接口
        /// </summary>
        public const string API_POST_EZ_GetChildToken = "/home-wisdom/platform/childToken";
        #endregion
        #region  ■  -- 丰林相关相关接口___________________________
        /// <summary>
        /// 检查住宅是否绑定丰林
        /// 检查住宅是否绑定丰林,并获取门口机列表
        /// </summary>
        public const string API_POST_FL_Check = "/home-wisdom/app/fl/vi/check";
        /// <summary>
@@ -573,7 +620,7 @@
        /// <summary>
        /// 开锁成功
        /// </summary>
        public const string API_POST_FL_Unlock= "/home-wisdom/app/fl/vi/unlock";
        public const string API_POST_FL_Unlock = "/home-wisdom/app/fl/vi/unlock";
        /// <summary>
        /// 通话视频截图上传
        /// </summary>
@@ -601,6 +648,7 @@
        public const string API_POST_FL_QRcode = "http://112.74.164.111:180/api.php/Device/setdynamicpwd";
        #endregion
        #region 可视对讲标准通用接口
        /// <summary>
        /// 获取可视对讲设备列表(所有对接可视对讲都包含一起)
@@ -616,7 +664,9 @@
        public const string API_POST_VideoDevice_UpdateCallStatus = "/home-wisdom/platform/imou/updateCallStatus";
        #endregion
        #region 可视对讲标准通用接口
        #region  ■  -- 门锁相关接口_______________________________
        /// <summary>
        /// 判断门锁是否第一使用
        /// </summary>
HDL_ON/Entity/Function/Function.cs
@@ -281,6 +281,11 @@
                return _trait_on_off;
            }
        }
        /// <summary>
        /// 功能的属性状态列表
        /// </summary>
        public List<AttributesStatus> status = new List<AttributesStatus>();
        /// <summary>
        /// 使用次数
@@ -507,7 +512,25 @@
                            {
                                attr.curValue = "off";
                            }
                            else
                            else if (attr.key == FunctionAttributeKey.Mode )
                            {
                                if (DB_ResidenceData.Instance.GatewayType == 0)
                                {
                                    attr.curValue = "0";
                                }
                                else
                                {
                                    if (SPK.AcSpkList().Contains(spk))
                                    {
                                        attr.curValue = "cool";
                                    }
                                    else if (SPK.FhSpkList().Contains(spk))
                                    {
                                        attr.curValue = "day";
                                    }
                                }
                            }
                            else
                            {
                                attr.curValue = "0";
                            }
@@ -516,6 +539,10 @@
                        {
                            double vv = 16;
                            Double.TryParse(attr.curValue.ToString(), out vv);
                            if (vv == 0)
                            {
                                vv = 26;
                            }
                            sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() });
                        }
                        else
@@ -638,7 +665,7 @@
        public List<AttributesStatus> status = new List<AttributesStatus>();
    }
    /// <summary>
    /// a协议控制动作数据
    /// 功能属性状态
    /// </summary>
    public class AttributesStatus
    {
@@ -690,6 +717,7 @@
        /// </summary>
        public object curValue = new object();
    }
    /// <summary>
    /// 功能属性键名列表
    /// </summary>
@@ -751,6 +779,7 @@
        /// 空调、地热//app自加
        /// </summary>
        public const string TempType = "temperature_type";
        /// <summary>
        /// 时间标记
        /// 地热//app自加
@@ -861,6 +890,10 @@
        /// 湿度
        /// </summary>
        public const string Humidity = "humidity";
        /// <summary>
        /// 温度
        /// </summary>
        public const string Temperature = "temperature";
        /// <summary>
        /// 室内温度
        /// </summary>
@@ -1164,7 +1197,7 @@
        /// <summary>
        /// 超声波传感器
        /// </summary>
        public const string SensoruUtrasonic = "sensor.ultrasonic";
        public const string SensorUtrasonic = "sensor.ultrasonic";
        /// <summary>
        /// (干接点)
        /// </summary>
@@ -1173,7 +1206,6 @@
        /// 毫米波传感器
        /// </summary>
        public const string SenesorMegahealth = "sensor.megahealth";
        /// <summary>
        /// 安防传感器spk列表
        /// </summary>
@@ -1217,6 +1249,13 @@
        /// 湿度传感器
        /// </summary>
        public const string SensorHumidity = "sensor.humidity";
        /// <summary>
        /// 环境传感器
        /// 环境检测传感器
        /// 特殊类spk
        /// 该spk功能是环境传感器功能的集成
        /// </summary>
        public const string SensorEnvironment = "sensor.environment";
        /// <summary>
        /// 环境传感器spk列表
@@ -1230,6 +1269,7 @@
            spkList.Add(SensorCO2);
            spkList.Add(SensorTVOC);
            spkList.Add(SensorHumidity);
            spkList.Add(SensorEnvironment);
            return spkList;
        }
        #endregion
@@ -1336,7 +1376,6 @@
        #endregion
        #region 设备类
        /// <summary>
        /// 红外宝
@@ -1394,6 +1433,12 @@
        }
        #endregion
        /// <summary>
        /// 没有状态显示的功能spk列表
        /// </summary>
        public static List<string> NotStatusSpkList = new List<string> {
            ElectricTV, FanIr, TvIr, TvXmIr, StbIr, PjtIr, IrLearn
        };
        /// <summary>
        /// 第三方品牌列表
HDL_ON/Entity/Function/Scene.cs
@@ -87,7 +87,7 @@
        /// <summary>
        /// 创建该场景的用户ID
        /// </summary>
        public string userId = "";
        public string userId = UserInfo.Current.ID;
        ///// <summary>
        ///// 场景背景
@@ -564,26 +564,31 @@
        /// 获取指定属性的显示文本
        /// 中英文显示
        /// </summary>
        public string GetValueText()
        public string GetValueText(string temp = "")
        {
            string catchString = value;
            if(temp!= "")
            {
                catchString = temp;
            }
            string text = "";
            switch (key)
            {
                case FunctionAttributeKey.OnOff:
                    text = value == "on" ? Language.StringByID(StringId.On) : Language.StringByID(StringId.OFF);
                    text = catchString == "on" ? Language.StringByID(StringId.On) : Language.StringByID(StringId.OFF);
                    break;
                case FunctionAttributeKey.SetTemp:
                case FunctionAttributeKey.RoomTemp:
                case FunctionAttributeKey.Brightness:
                case FunctionAttributeKey.Percent:
                    if (value == "")
                    if (catchString == "")
                    {
                        value = "0";
                        catchString = "0";
                    }
                    text = value;
                    text = catchString;
                    break;
                case FunctionAttributeKey.Mode:
                    switch (value)
                    switch (catchString)
                    {
                        //----空调
                        case "auto":
@@ -602,6 +607,7 @@
                            text = Language.StringByID(StringId.AirSupply);
                            break;
                        //-----地热
                        // 1:普通,2:白天,3:夜晚,4:离开,5:时间
                        case "day":
                            text = Language.StringByID(StringId.Day);
                            break;
@@ -620,7 +626,7 @@
                    }
                    break;
                case FunctionAttributeKey.FanSpeed:
                    switch (value)
                    switch (catchString)
                    {
                        case "high":
                            text = Language.StringByID(StringId.HighWindSpeed);
HDL_ON/Entity/FunctionList.cs
@@ -184,7 +184,6 @@
        /// <para>false:直接无条件添加</para></param>
        public void IniFunctionList(string filePath, bool checkRepeat = false)
        {
            //MainPage.Log("12346890sdkxghjkl");
            // todo 增加设备,增加功能进功能列表
            if (filePath.StartsWith("FunctionData_"))
            {
@@ -479,11 +478,20 @@
            var revPack = pm.AddScene(scene);
            if (revPack.Code == StateCode.SUCCESS)
            {
                var sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(revPack.Data.ToString());
                tempScene = sceneList.Find((obj) => obj.sid == scene.sid);
                var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(tempScene));
                FileUtlis.Files.WriteFileByBytes(scene.savePath, ssd);
                result = tempScene;
                if (MainPage.NoLoginMode)
                {
                    var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(scene));
                    FileUtlis.Files.WriteFileByBytes(scene.savePath, ssd);
                    result = scene;
                }
                else
                {
                    var sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(revPack.Data.ToString());
                    tempScene = sceneList.Find((obj) => obj.sid == scene.sid);
                    var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(tempScene));
                    FileUtlis.Files.WriteFileByBytes(scene.savePath, ssd);
                    result = tempScene;
                }
            }
            else
            {
HDL_ON/HDL_ON.projitems
@@ -142,46 +142,6 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\1-HomePage\MessageCenterPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\1-HomePage\HomePage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\IntelligencePage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Send.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\FunTpye.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\OutdoorEnvironment.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Weather.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\ConditionDeviceFunList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\TimeTpye.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Logic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\PublicInterface.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\MainView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Time3.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Set.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\WeatherCondition.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\TargetDeviceFunList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InpOrOutLogicMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\SpeciaTime.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddTarget.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddInputType.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\FunAllAreaView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\DateView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AreaView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\MonView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\LogicAddView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\FunTypeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SelectTypeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SwitchView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TemperatureView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\LogicTypeTitleView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TimeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TimeHorizonView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TextSize.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AddOutputInputView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TipPopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\brightnessView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AddOutputInputTextView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SaveView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\CheckView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SingleLogicView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneAddPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SceneEditPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SceneAddPage.cs" />
@@ -199,30 +159,6 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\GetSupport\GetSupportPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\GetSupport\FAQHelpPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\GetSupport\QuestionListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\PirMain.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Pir.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\PirSend.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Matching.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\SetPir.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\BrandList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\EditControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddControlComplete.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddButton.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\BrandListView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PatchView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\TopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\HeigthChangeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PirNameView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\MainView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ControlView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FailView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PirView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\TipView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ReplicationView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FrameLayout50.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\SaveView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\Buttons.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AccountBindInfo\NewBindVerificationCodePage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AccountBindInfo\NewBindAccountPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AccountBindInfo\BindAccountPage.cs" />
@@ -360,38 +296,15 @@
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Enumerative\MyEnum.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Enumerative\Command.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Enumerative\ClothsHangerEnum.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\PirMain.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\TopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\BrandList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\BrandListView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\TipView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddButton.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\SaveView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\Buttons.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Pir.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\PirSend.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddControlComplete.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PatchView.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" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmSensor\ArmSensorHistroyPaging.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlCloudReceiveLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlWifiLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Controls\CompoundControls\ProgressRowBar.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Matching.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PirNameView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\BrandListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\IrLearnPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\EditControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FrameLayout50.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PirView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ControlView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\AddDevciePage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\DeviceListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\MainView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\HeigthChangeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AcControlPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\FhControlPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\TvControlPage.cs" />
@@ -400,7 +313,6 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\ShowDialog.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\EnvironmentalScience\EnvironmentalPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\EnvironmentalScience\EchartsOption_Pie.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\SetPir.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AcControlPage_AddIrButton.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\EnergyMainPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)DAL\ThirdPartySdk\ESOnVideo.cs" />
@@ -411,12 +323,9 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\ObjectClass.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneAddPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneCatchFunctionListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InputPushText.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AirQuality.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\ArmCenterPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\SecurityAlarm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\ArmDeploymentSettingPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\OnePortAutomation.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\EnvironmentalScience\EchartsOption_BrokenLine.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\SmartSpeaker\SmartSpeakerListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\SmartSpeaker\SmartSpeakerSelectDevicesPage.cs" />
@@ -424,7 +333,6 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\DvdPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\PjtPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\StbPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\PirMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\SenesorMegahealth\AddSenesorMegahealthDirection1Page.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\MiniRemoteControl\AddMiniRemoteControlDirection1Page.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddDevice\MiniRemoteControl\AddMiniRemoteControlDirection2Page.cs" />
@@ -489,6 +397,74 @@
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Room.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Device\DeviceModule.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Device\SBK_SceneListObj.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Send.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\FunTpye.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\OutdoorEnvironment.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Weather.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\ConditionDeviceFunList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\TimeTpye.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Logic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\PublicInterface.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AirQuality.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\MainView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\OnePortAutomation.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Time3.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Set.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InputPushText.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\WeatherCondition.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\TargetDeviceFunList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InpOrOutLogicMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\SpeciaTime.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddTarget.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddInputType.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\FunAllAreaView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\DateView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AreaView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\MonView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\LogicAddView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\FunTypeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SelectTypeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SwitchView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TemperatureView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\LogicTypeTitleView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TimeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TimeHorizonView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TextSize.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AddOutputInputView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TipPopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\brightnessView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AddOutputInputTextView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SaveView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\CheckView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SingleLogicView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\PirMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\PirMain.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Pir.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\PirSend.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Matching.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\SetPir.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\BrandList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\EditControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddControlComplete.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddButton.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\BrandListView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PatchView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\TopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\HeigthChangeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PirNameView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\MainView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ControlView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FailView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PirView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\TipView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ReplicationView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FrameLayout50.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\SaveView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\Buttons.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
@@ -503,8 +479,6 @@
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\" />
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Integratedbrand\" />
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmSensor\" />
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\" />
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\" />
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\" />
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\" />
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\" />
HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string VersionString = "1.2.0702";
        public static string VersionString = "1.2.0708";
        ///// <summary>
        ///// 客户端类型
        ///// </summary>
HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -131,7 +131,7 @@
            LoadTopView();
        }
        public void LoadTopView_RoomTop(Action backAction ,Action editAction)
        public void LoadTopView_RoomTop(Action backAction, Action editAction)
        {
            this.backAction = backAction;
@@ -275,7 +275,7 @@
        /// <summary>
        /// 楼层管理顶部栏
        /// </summary>
        public void LoadTopView_FloorTopView(Action<string> callBack,Action action)
        public void LoadTopView_FloorTopView(Action<string> callBack, Action action)
        {
            LoadTopView();
@@ -340,7 +340,7 @@
        /// <summary>
        /// 成员顶部栏
        /// </summary>
        public void LoadTopView_MemberTopView(Action callBack, Action action)
        public void LoadTopView_MemberTopView(Action addAction, Action action)
        {
            LoadTopView();
            backAction = action;
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -212,25 +212,32 @@
                    //etAccount.Text = "18316672920";//lcg "18316672920";//hzx;// "13415629083"//cf;;
                    //etAccount.Text = "18316120654";//tujie
                    // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 
                    etAccount.Text = "15626203746";
                    //etAccount.Text = "13450425807";//黄竹溪 knx项目
                }
                else
                {
                    //etAccount.Text = "15626203746";
                    //etAccount.Text = "15018447586";//音乐数量刷新问题
                    //etAccount.Text = "464027401@qq.com";//
                    //etAccount.Text = "15217626103";//
                    //etAccount.Text = "13682244600";//波哥
                    //etAccount.Text = "13168123446";//昆明金茂项目,新风问题
                    etAccount.Text = "551775569@.com";
                    etAccount.Text = "551775569@qq.com";
                    etAccount.Text = "2949126848@qq.com";//陈琳cct测试
                    //etAccount.Text = "13168123446";
                    //etAccount.Text = "13676202754";//巴林服务器
                    //etAccount.Text = "13602944661";//kx
                    //etAccount.Text = "551775569@qq.com";//wcf
                    //etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374
                    //etAccount.Text = "15971583093";// gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 国外服务器测试
                    etAccount.Text = "15971583093";//高胜 调光0 100 反复横跳
                }
                b = !b;
                etPassword.Text = "123456";
                if(etAccount.Text == "15626203746")
                {
                    etPassword.Text = "12345678";
                }
                btnLogin.IsSelected = true;
            };
#endif
@@ -511,7 +518,7 @@
                IsBold = true,
                TextColor = CSS_Color.MainColor,
                TextAlignment = TextAlignment.Center,
                Text = "Dome模式"
                Text = "Demo模式"
            };
            bodyView.AddChidren(btnDomeLogin);
            btnDomeLogin.MouseUpEventHandler = (sender, e) => {
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -948,12 +948,8 @@
                    LoadEvent_ControlCurtain(function, btnCurtainClose, btnCurtainOpen);
                }
                else if (function.spk == SPK.ElectricTV || function.spk == SPK.TvIr || function.spk == SPK.TvXmIr
                    || function.spk == SPK.StbIr || function.spk == SPK.PjtIr)
                else if (SPK.NotStatusSpkList.Contains(function.spk))
                {
                    //btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
                    //btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png";
                    Button btnPower;
                    btnPower = new Button()
                    {
@@ -962,6 +958,7 @@
                        Width = Application.GetRealWidth(32),
                        Height = Application.GetRealWidth(32),
                        UnSelectedImagePath = "Public/PowerClose.png",
                        SelectedImagePath = "Public/PowerOpen.png",
                    };
                    view.AddChidren(btnPower);
                    LoadEvent_ControlTV(function, btnPower);
@@ -1057,62 +1054,8 @@
                    };
                    view.AddChidren(btnSwitch);
                    btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
                    btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png";
                    //switch (function.Spk_Prefix)
                    //{
                    //    //todo 增加设备,主页收藏图标
                    //    case FunctionCategory.Light:
                    //        #region 灯光 Light
                    //        btnIcon.UnSelectedImagePath = "FunctionIcon/Light/LightIcon.png";
                    //        btnIcon.SelectedImagePath = "FunctionIcon/Light/LightOnIcon.png";
                    //        UpdataFunctionStates(function);
                    //        #endregion
                    //        break;
                    //    case FunctionCategory.AC:
                    //        #region 空调 AC
                    //        btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcIcon.png";
                    //        btnIcon.SelectedImagePath = "FunctionIcon/AC/AcOnIcon.png";
                    //        #endregion
                    //        break;
                    //    case FunctionCategory.FloorHeat:
                    //        #region 地热
                    //        btnIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingIcon.png";
                    //        btnIcon.SelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingOnIcon.png";
                    //        #endregion
                    //        break;
                    //    case FunctionCategory.Electric:
                    //        switch (function.spk)
                    //        {
                    //            case SPK.ElectricSocket:
                    //                btnIcon.UnSelectedImagePath = "FunctionIcon/Socket/SocketIcon.png";
                    //                btnIcon.SelectedImagePath = "FunctionIcon/Socket/SocketOnIcon.png";
                    //                break;
                    //            case SPK.ElectricFan:
                    //                btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/FanIcon.png";
                    //                btnIcon.SelectedImagePath = "FunctionIcon/Electrical/FanOnIcon.png";
                    //                break;
                    //            case SPK.ElectricTuyaAirCleaner:
                    //                btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/AirCleanerIcon.png";
                    //                btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/AirCleanerIconOn.png";
                    //                break;
                    //            case SPK.ElectricTuyaFan:
                    //                btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/FanIcon.png";
                    //                btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/FanIconOn.png";
                    //                break;
                    //            case SPK.ElectricTuyaWaterValve:
                    //                btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/WaterValveIcon.png";
                    //                btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/WaterValveIconOn.png";
                    //                break;
                    //            case SPK.ElectricTuyaWeepRobot:
                    //                btnIcon.SelectedImagePath = "FunctionIcon/HomePageIcon/WeepRobotIcon.png";
                    //                btnIcon.UnSelectedImagePath = "FunctionIcon/HomePageIcon/WeepRobotIconOn.png";
                    //                break;
                    //        }
                    //        break;
                    //}
                    LoadEvent_SwitchFunction(function, btnSwitch);
                }
                //取消收藏事件
@@ -1137,8 +1080,8 @@
                btnName.MouseUpEventHandler = skipControlPageEvent;
                btnIcon.MouseUpEventHandler = skipControlPageEvent;
                btnState.MouseUpEventHandler = skipControlPageEvent;
                //电视不需要更新状态
                if(function.spk!= SPK.ElectricTV && function.spk != SPK.StbIr && function.spk != SPK.PjtIr)
                //不需要更新状态的动能列表
                if(!SPK.NotStatusSpkList.Contains(function.spk))
                {
                    UpdataFunctionStates(function);
                }
@@ -1184,7 +1127,7 @@
                    Width = Application.GetRealWidth(32),
                    UnSelectedImagePath = "Public/FuncInfoSetIcon_white.png",
                };
                if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
                if (scene.userId == UserInfo.Current.ID)
                {
                    view.AddChidren(btnSettingIcon);
                }
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -32,6 +32,22 @@
                if (bodyView != null)
                {
                    var humiSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorHumidity);
                    var enviSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorEnvironment);
                    foreach (var enviTemp in enviSensorList)
                    {
                        var tempAttr = enviTemp.attributes.Find((obj) => obj.key == "humidity");
                        if (tempAttr != null)
                        {
                            var newTemp = new Function()
                            {
                                name = enviTemp.name,
                                sid = enviTemp.sid,
                                deviceId = enviTemp.deviceId,
                                attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = tempAttr.state, curValue = tempAttr.curValue } },
                            };
                            humiSensorList.Add(newTemp);
                        }
                    }
                    double humiTotalValues = 0;
                    foreach (var temp in humiSensorList)
                    {
@@ -58,6 +74,22 @@
                if (bodyView != null)
                {
                    var tempSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorTemperature);
                    var enviSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorEnvironment);
                    foreach (var enviTemp in enviSensorList)
                    {
                        var tempAttr = enviTemp.attributes.Find((obj) => obj.key == "temperature");
                        if (tempAttr != null)
                        {
                            var newTemp = new Function()
                            {
                                name = enviTemp.name,
                                sid = enviTemp.sid,
                                deviceId = enviTemp.deviceId,
                                attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = tempAttr.state, curValue = tempAttr.curValue } },
                            };
                            tempSensorList.Add(newTemp);
                        }
                    }
                    double tempTotalValues = 0;
                    foreach (var temp in tempSensorList)
                    {
@@ -359,6 +391,13 @@
                btnSwitch.IsSelected = !btnSwitch.IsSelected;
                new System.Threading.Thread(() =>
                {
                    if(SPK.NotStatusSpkList.Contains(function.spk))
                    {
                        System.Threading.Thread.Sleep(1000);
                        Application.RunOnMainThread(() => {
                            btnSwitch.IsSelected = !btnSwitch.IsSelected;
                        });
                    }
                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    if (function.spk == SPK.LightDimming || function.spk == SPK.LightRGB)
@@ -388,21 +427,35 @@
        /// <summary>
        /// 加载电视控制事件
        /// </summary>
        /// <param name="tV"></param>
        /// <param name="button"></param>
        void LoadEvent_ControlTV(Function tV, Button button)
        /// <param name="function"></param>
        /// <param name="btnSwitch"></param>
        void LoadEvent_ControlTV(Function function, Button btnSwitch)
        {
            button.MouseUpEventHandler = (sender, e) =>
            btnSwitch.MouseUpEventHandler = (sender, e) =>
            {
                if (DB_ResidenceData.Instance.GatewayType == 1)
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("on_off", "");
                    Control.Ins.SendWriteCommand(tV, d);
                    btnSwitch.IsSelected = !btnSwitch.IsSelected;
                    new System.Threading.Thread(() =>
                    {
                        if (SPK.NotStatusSpkList.Contains(function.spk))
                        {
                            System.Threading.Thread.Sleep(2000);
                            Application.RunOnMainThread(() =>
                            {
                                btnSwitch.IsSelected = !btnSwitch.IsSelected;
                            });
                        }
                        Dictionary<string, string> d = new Dictionary<string, string>();
                        d.Add("on_off", "");
                        Control.Ins.SendWriteCommand(function, d);
                    })
                    { IsBackground = true }.Start();
                }
                else
                {
                    new TV().ControlTV(InfraredCode_TV.Power, tV);
                    new TV().ControlTV(InfraredCode_TV.Power, function);
                }
            };
        }
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -160,7 +160,6 @@
                            LoadLastStatesButton();
                            break;
                        case FunctionCategory.Light:
                            //btnIcon.UnSelectedImagePath = "FunctionIcon/Light/LightThinIcon.png";
                            btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
                            LoadLightControl();
                            break;
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -81,7 +81,7 @@
            {
                btnSwitch.IsSelected = !btnSwitch.IsSelected;
                if(function.spk == SPK.IrLearn || function.spk == SPK.TvIr || function.spk == SPK.TvXmIr)
                if(SPK.NotStatusSpkList.Contains( function.spk ))
                {
                    new System.Threading.Thread(() => {
                        System.Threading.Thread.Sleep(2000);
HDL_ON/UI/UI2/3-Intelligence/Automation 2.zip
Binary files differ
HDL_ON/UI/UI2/3-Intelligence/Automation.zip
Binary files differ
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -252,7 +252,7 @@
                        ) =>
                    {
                        Logic.currlogic.name = logicName;
                        Logic.currlogic.sid = LogicMethod.NewSid();
                        Logic.currlogic.sid = LogicMethod.CurrLogicMethod.NewSid();
                        loading.Start();
                        new System.Threading.Thread(() =>
                        {
@@ -295,7 +295,7 @@
                                        }
                                        Logic.LogicList.Add(Logic.currlogic);
                                        LogicMethod.RemoveAllView();
                                        LogicMethod.CurrLogicMethod.RemoveAllView();
                                        MainView.MainShow();
                                    }
                                    else if (responsePackNew != null && responsePackNew.Code == "14005")
@@ -335,7 +335,7 @@
                                loading.Hide();
                                if (responsePackNew != null && responsePackNew.Code == "0")
                                {
                                    LogicMethod.RemoveAllView();
                                    LogicMethod.CurrLogicMethod.RemoveAllView();
                                    MainView.MainShow();
                                }
                                else if (responsePackNew != null && responsePackNew.Code == "14005")
@@ -504,7 +504,6 @@
        {
            //定义一个局部weekList列表用来记录选中数据;
            List<string> weekStateList = new List<string>();
            PublicInterface weekView = new PublicInterface();
            if (Logic.currlogic.cycle.type == "week")
            {
HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs
@@ -85,7 +85,7 @@
        /// </summary>
        public void SceneMethod()
        {
            var sceneList = LogicMethod.GetSceneList();
            var sceneList = LogicMethod.CurrLogicMethod.GetSceneList();
            List<string> nameList = new List<string>();
            for (int i = 0; i < sceneList.Count; i++) {
                var scene = sceneList[i];
@@ -101,7 +101,7 @@
                //没啥作用,为了发送数据格式统一;
                outputDevice.status = new List<Dictionary<string, string>> { new Dictionary<string, string> { { "key", "scene" }, { "value", "0" } } };
                AddOutput(outputDevice);
                LogicMethod.RemoveAllView();
                LogicMethod.CurrLogicMethod.RemoveAllView();
                AddLogic addLogic = new AddLogic();
                MainPage.BasePageView.AddChidren(addLogic);
                addLogic.Show();
@@ -168,11 +168,11 @@
                    return;
                }
                Output outputTime= new Output();
                outputTime.sid = LogicMethod.NewSid();
                outputTime.sid = LogicMethod.CurrLogicMethod.NewSid();
                outputTime.target_type = "3";
                Dictionary<string, string> dic = new Dictionary<string, string>();
                LogicMethod.dictionary(dic, "key", "delay");
                LogicMethod.dictionary(dic, "value", timepoint);
                LogicMethod.CurrLogicMethod.dictionary(dic, "key", "delay");
                LogicMethod.CurrLogicMethod.dictionary(dic, "value", timepoint);
                outputTime.status.Add(dic);
                if (edit)
                {
@@ -187,7 +187,7 @@
                    AddOutput(outputTime);
                }
                fLayout.RemoveFromParent();
                LogicMethod.RemoveAllView();
                LogicMethod.CurrLogicMethod.RemoveAllView();
                AddLogic addLogic = new AddLogic();
                MainPage.BasePageView.AddChidren(addLogic);
                addLogic.Show();
HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs
@@ -72,7 +72,7 @@
                    AddDic(value);
                };
            }
        }
        /// <summary>
        /// 封装数据
@@ -81,13 +81,13 @@
        private void AddDic(string value)
        {
            Input input = new Input();
            input.sid = LogicMethod.NewSid();
            input.sid = LogicMethod.CurrLogicMethod.NewSid();
            input.condition_type = "9";
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.dictionary(dic, "key", "air_quality");
            LogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.dictionary(dic, "value", value);
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", "air_quality");
            LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", value);
            input.condition.Add(dic);
            AddCondition(input);
        }
@@ -121,7 +121,7 @@
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.RemoveAllView();
            LogicMethod.CurrLogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using HDL_ON.Entity;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public class ConditionDeviceFunList : FrameLayout
@@ -19,6 +20,7 @@
        /// 定义一个变量,记录选中状态
        /// </summary>
        private string selectedState = "unknown";
        public void Show(Entity.Function device, int index, bool edit)
        {
            #region 界面布局
@@ -159,7 +161,7 @@
                    }
                    break;
                //超声波传感器
                case SPK.SensoruUtrasonic:
                case SPK.SensorUtrasonic:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
@@ -188,7 +190,7 @@
                case SPK.SenesorMegahealth:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
                        view.btnText.TextID = StringId.mubiaozhuangtai ;//目标状态
                        view.btnText.TextID = StringId.mubiaozhuangtai;//目标状态
                        fLayout.AddChidren(view.FLayoutView());
                        view.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
@@ -200,7 +202,72 @@
                        }
                    }
                    break;
                //环境检测传感器
                case SPK.SensorEnvironment:
                    {
                        #region 界面
                        ///温度
                        LogicView.FunTypeView wenuView = new LogicView.FunTypeView();
                        wenuView.btnText.TextID = StringId.wendu;
                        fLayout.AddChidren(wenuView.FLayoutView());
                        ///湿度
                        LogicView.FunTypeView shiduView = new LogicView.FunTypeView();
                        shiduView.frameLayout.Y = wenuView.frameLayout.Bottom;
                        shiduView.btnText.TextID = StringId.shidu;
                        fLayout.AddChidren(shiduView.FLayoutView());
                        ///pm2.5
                        LogicView.FunTypeView pm25View = new LogicView.FunTypeView();
                        pm25View.frameLayout.Y = shiduView.frameLayout.Bottom;
                        pm25View.btnText.TextID = StringId.pm25;
                        fLayout.AddChidren(pm25View.FLayoutView());
                        ///co2
                        LogicView.FunTypeView co2View = new LogicView.FunTypeView();
                        co2View.frameLayout.Y = pm25View.frameLayout.Bottom;
                        co2View.btnText.TextID = StringId.co2;
                        fLayout.AddChidren(co2View.FLayoutView());
                        ///tvoc
                        LogicView.FunTypeView tvocView = new LogicView.FunTypeView();
                        tvocView.frameLayout.Y = co2View.frameLayout.Bottom;
                        tvocView.btnText.TextID = StringId.tvoc;
                        fLayout.AddChidren(tvocView.FLayoutView());
                        #endregion
                        #region 点击事件
                        ///温度点击事件
                        wenuView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            new PublicInterface { }.ViewZuHe(this, StringId.wendugaoyu, StringId.wendudiyu, (intText, view) =>
                            {
                                InputBoxAction(device,intText, index, edit);
                            });
                        };
                        ///湿度点击事件
                        shiduView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            new PublicInterface { }.ViewZuHe(this, StringId.shidugaoyu, StringId.shidudiyu, (intText, view) =>
                            {
                                InputBoxAction(device,intText, index, edit);
                            });
                        };
                        ///pm2.5点击事件
                        pm25View.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            PmCo2TvocAction(this,device, "pm25",StringId.pm25, index,edit);
                        };
                        ///co2点击事件
                        co2View.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            PmCo2TvocAction(this,device, "co2", StringId.co2, index, edit);
                        };
                        ///tvoc点击事件
                        tvocView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            PmCo2TvocAction(this,device, "tvoc", StringId.tvoc, index, edit);
                        };
                        #endregion
                    }
                    break;
            }
            #region  保存
            ///保存View
@@ -210,55 +277,65 @@
            this.AddChidren(saveView.FLayoutView());
            saveView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
                if (selectedState != "unknown")
                {
                    Input inputDevice = new Input();
                    inputDevice.condition_type = "3";
                    inputDevice.sid = device.sid;
                    inputDevice.condition = dicSateteList;
                    if (edit)
                    {
                        //移除旧数据
                        Logic.currlogic.input.RemoveAt(index);
                        //新数据插入旧数据的位置;
                        Logic.currlogic.input.Insert(index, inputDevice);
                    }
                    else
                    {
                        //添加一个条件
                        AddCondition(inputDevice);
                    }
                }
                else
                {
                    if (!edit)
                    {
                        //提示用户
                        return;
                    }
                    this.RemoveFromParent();
                    return;
                }
                LogicMethod.RemoveAllView();
                if (MainView.IsGatewayType)
                { //A网关
                    var addLogic = new AddLogic();
                    MainPage.BasePageView.AddChidren(addLogic);
                    addLogic.Show();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
                else
                {
                    //一端口网关
                    var onePortAutomation = new OnePortAutomation();
                    MainPage.BasePageView.AddChidren(onePortAutomation);
                    onePortAutomation.Show();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
                Save(device,index, edit);
            };
            #endregion
        }
        /// <summary>
        /// 保存输入条件
        /// </summary>
        /// <param name="index">索引值</param>
        /// <param name="edit"></param>
        private void Save(Entity.Function device,int index, bool edit)
        {
            if (selectedState != "unknown")
            {
                Input inputDevice = new Input();
                inputDevice.condition_type = "3";
                inputDevice.sid = device.sid;
                inputDevice.condition = dicSateteList;
                if (edit)
                {
                    //移除旧数据
                    Logic.currlogic.input.RemoveAt(index);
                    //新数据插入旧数据的位置;
                    Logic.currlogic.input.Insert(index, inputDevice);
                }
                else
                {
                    //添加一个条件
                    AddCondition(inputDevice);
                }
            }
            else
            {
                if (!edit)
                {
                    //提示用户
                    return;
                }
                this.RemoveFromParent();
                return;
            }
            LogicMethod.CurrLogicMethod.RemoveAllView();
            if (MainView.IsGatewayType)
            { //A网关
                var addLogic = new AddLogic();
                MainPage.BasePageView.AddChidren(addLogic);
                addLogic.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            }
            else
            {
                //一端口网关
                var onePortAutomation = new OnePortAutomation();
                MainPage.BasePageView.AddChidren(onePortAutomation);
                onePortAutomation.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            }
        }
        /// <summary>
@@ -268,7 +345,8 @@
        /// <param name="button">选中状态显示文本Btn控件</param>
        /// <param name="btnText1">属性状态值文本1</param>
        /// <param name="btnText2">属性状态值文本2</param>
        private void DeviceView(Entity.Function device,Button button,int btnText1,int btnText2) {
        private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2)
        {
            FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
            this.AddChidren(frame);
            LogicView.SwitchView switchView = new LogicView.SwitchView();
@@ -288,7 +366,7 @@
                    case SPK.SensorDuiShe:
                    case SPK.SensorPir:
                    case SPK.SensorDoorWindow:
                    case SPK.SensoruUtrasonic:
                    case SPK.SensorUtrasonic:
                        {
                            keyVlaue = "status";
                        }
@@ -375,6 +453,95 @@
        }
        /// <summary>
        /// 温度,湿度弹框设置值
        /// </summary>
        /// <param name="textInt">文本</param>
        /// <param name="stateValue">编辑之前的状态值,默认为20</param>
        public void InputBoxAction(Entity.Function device, int textInt, int index, bool edit, string stateValue = "20")
        {
            if (edit)
            {
                Input inputs = Logic.currlogic.input[index];
                //清除之前旧数据
                dicSateteList.Clear();
                if (inputs.condition.Count != 0)
                {
                    //有数据重新赋值
                    dicSateteList = inputs.condition;
                }
            }
            new LogicView.TipPopView { }.InputBox(textInt, stateValue, (value) =>
            {
                string keyValue = "20";
                string data_type = "integer";
                string comparator = "=";
                switch (textInt)
                {
                    case StringId.wendugaoyu:
                        {
                            keyValue = "temperature";
                            comparator = ">";
                            data_type = "float";
                        }
                        break;
                    case StringId.wendudiyu:
                        {
                            keyValue = "temperature";
                            comparator = "<";
                            data_type = "float";
                        }
                        break;
                    case StringId.shidugaoyu:
                        {
                            keyValue = "humidity";
                            comparator = ">";
                        }
                        break;
                    case StringId.shidudiyu:
                        {
                            keyValue = "humidity";
                            comparator = "<";
                        }
                        break;
                }
                selectedState = device.spk + "_" + value;
                AddDictionary(keyValue, value, data_type, comparator);
                Save(device,index, edit);
            });
        }
        /// PM2.5,Co2,Tvoc设置值
        /// </summary>
        /// <param name="frame">当前界面</param>
        /// <param name="key">属性值,云雀上定义好的<</param>
        /// <param name="title">标题文本</param>
        /// <param name="index"></param>
        /// <param name="edit"></param>
        /// <param name="stateValue">编辑之前的状态值,默认为""</param>
        public void PmCo2TvocAction(FrameLayout frame, Entity.Function device,string key,int title, int index, bool edit, string stateValue = "")
        {
            if (edit)
            {
                Input inputs = Logic.currlogic.input[index];
                //清除之前旧数据
                dicSateteList.Clear();
                if (inputs.condition.Count != 0)
                {
                    //有数据重新赋值
                    dicSateteList = inputs.condition;
                }
            }
            PublicInterface view = new PublicInterface();
            var listStr = view.GetViewList(key);
            view.SingleSelectionShow(frame, listStr, Language.StringByID(title), view.GetString(key, stateValue)
               , (text) =>
               {
                   var value = view.GetValue(key, text);
                   selectedState = device.spk + "_"+ key;
                   AddDictionary(key, value, "integer");
                   Save(device,index, edit);
               });
        }
        /// <summary>
        /// 显示编辑之前的设备状态
        /// </summary>
        /// <param name="device">编辑设备</param>
@@ -403,15 +570,15 @@
        /// <param name="selectedValue">状态值</param>
        /// <param name="data_type">类型</param>
        /// <param name="comparator">比较关系</param>
        private void AddDictionary(string KeyValue, string selectedValue,string data_type,string comparator="=")
        private void AddDictionary(string KeyValue, string selectedValue, string data_type, string comparator = "=")
        {
            //数据封装
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.dictionary(dic, "key", KeyValue);
            LogicMethod.dictionary(dic, "comparator", comparator);
            LogicMethod.dictionary(dic, "data_type", data_type);
            LogicMethod.dictionary(dic, "value", selectedValue);
            AddDictionaryList(KeyValue, comparator,dic);
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", KeyValue);
            LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", comparator);
            LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", data_type);
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", selectedValue);
            AddDictionaryList(dic);
        }
        /// <summary>
        /// 更新数据列表
@@ -420,22 +587,9 @@
        /// <param name="comparator">比较关系</param>
        /// <param name="dictionary">添加选中数据</param>
        /// <returns></returns>
        private void AddDictionaryList(string keyValue,string comparator, Dictionary<string, string> dictionary)
        private void AddDictionaryList(Dictionary<string, string> dictionary)
        {
            int indexValue = -1;
            for (int i = 0; i < dicSateteList.Count; i++)
            {
                var dic = dicSateteList[i];
                string key = dic["key"];
                string comparatorValue = dic["comparator"];
                if (key == keyValue && comparatorValue == comparator)
                {
                    //判断是否存在
                    indexValue = i;
                    break;
                }
            }
            var indexValue = IsContainsAll(dictionary, dicSateteList);
            if (indexValue != -1)
            {
                //存在移除
@@ -461,8 +615,13 @@
            {
                if (Logic.currlogic.input[i].sid == input.sid)
                {
                    indexValue = i;
                    break;
                    //有些设备比较特殊(例如:海林传感器还是要判断属性值,温湿度属性还要判断比较关系,才能确认是否已经存在该条件,其他设备条件直接用sid判断即可)
                    //加一级判断是为兼容特殊设备
                    if (IsContainsAll(input.condition, Logic.currlogic.input[i].condition))
                    {
                        indexValue = i;
                        break;
                    }
                }
            }
@@ -477,5 +636,53 @@
            }
        }
        /// <summary>
        /// 判断dictionaryB列表是否完整包含另一个dictionaryA
        /// </summary>
        /// <param name="dictionaryA">对象</param>
        /// <param name="dictionaryB">列表</param>
        /// <returns>返回列表的索引值</returns>
        public int IsContainsAll(Dictionary<string, string> dictionaryA, List<Dictionary<string, string>> dictionaryB)
        {
            int valueInt = -1;
            for (int i = 0; i < dictionaryB.Count; i++)
            {
                var dic = dictionaryB[i];
                string key = dic["key"];
                string comparatorValue = dic["comparator"];
                if (dictionaryA["key"] == key && dictionaryA["comparator"] == comparatorValue)
                {
                    //判断是否存在
                    valueInt = i;
                    break;
                }
            }
            return valueInt;
        }
        /// <summary>
        /// 判断dictionaryB是否完整包含另一个dictionaryA
        /// </summary>
        /// <param name="dictionaryA"></param>
        /// <param name="dictionaryB"></param>
        /// <returns></returns>
        public bool IsContainsAll(List<Dictionary<string, string>> dictionaryA, List<Dictionary<string, string>> dictionaryB)
        {
            for (int i = 0; i < dictionaryA.Count; i++)
            {
                var dic = dictionaryA[i];
                string key = dic["key"];
                string comparatorValue = dic["comparator"];
                var list = dictionaryB.FindAll((dictionary) => dictionary["key"] == key && dictionary["comparator"] == comparatorValue);
                if (list.Count> 0)
                {
                    return true;
                }
            }
            return false;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -81,7 +81,7 @@
                    Width = Application.GetRealWidth(144),
                    Height = Application.GetRealHeight(44 * 5),
                };
                var roomList = LogicMethod.GetGatewayRoomList(Language.StringByID(StringId.allAreas));
                var roomList = LogicMethod.CurrLogicMethod.GetGatewayRoomList(Language.StringByID(StringId.allAreas));
               
                if (roomList.Count > 5)
                {
@@ -122,7 +122,7 @@
                        funAllAreaView.btnText2.Text = Language.StringByID(StringId.allFun);
                        selectedRoom = (areaView.btnClick.Tag as Entity.Room);
                        ///获取显示设备列表
                        var list = LogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room,if_type);
                        var list = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room,if_type);
                        DeviceListView(vv, list);
                    };
@@ -138,9 +138,9 @@
            EventHandler<MouseEventArgs> funClick = (sender3, e3) =>{
                //获取最终显示列表
                var functionList = LogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
                var functionList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
                //获取设备列表的类型(例如:灯光类,窗帘类。。。)
                var deviceTypeList = LogicMethod.GetDeviceTypeList(functionList);
                var deviceTypeList = LogicMethod.CurrLogicMethod.GetDeviceTypeList(functionList);
                if (deviceTypeList.Count==0) {
                    //没有类型直接返回去;
                    return;
@@ -219,9 +219,9 @@
                        fLayout.RemoveFromParent();
                        funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString();
                        ///获取单个类型(例如:灯光类。。)设备FunctionType列表
                        var typeFunctionList = LogicMethod.GetDeviceTypeFunctionList(areaView.btnClick.Tag.ToString());
                        var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(areaView.btnClick.Tag.ToString());
                        ///获取单个灯光类型(例如:灯光1,灯光2。。)显示设备列表
                        var lists = LogicMethod.GetShowDeviceList(typeFunctionList, functionList);
                        var lists = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, functionList);
                        DeviceListView(vv, lists);
                    };
                    if (deviceTypeList.Count - 1 == i)
@@ -234,7 +234,7 @@
            funAllAreaView.btnText2.MouseUpEventHandler += funClick;
            funAllAreaView.btnIcon2.MouseUpEventHandler += funClick;
            ///获取显示设备列表
            var deviceList = LogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
            var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
            DeviceListView(vv, deviceList);
        }
@@ -255,7 +255,7 @@
                funView.btnLine.X = Application.GetRealWidth(16);
                funView.btnLine.Width = Application.GetRealWidth(343);
                verticalScrolView.AddChidren(funView.FLayoutView());
                funView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(dev.spk);
                funView.btnIcon.UnSelectedImagePath = LogicMethod.CurrLogicMethod.GetIconPath(dev.spk);
                funView.btnDeviceName.Text = dev.name;
                funView.btnRoomName.Text = dev.GetRoomListName();
                funView.btnClick.MouseUpEventHandler += (sen,e) => {
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -20,12 +20,14 @@
                ///各种条件的View
                LogicView.AddOutputInputView inputView = new LogicView.AddOutputInputView();
                inputView.FLayoutView(viewLayout);
                //添加没有延时,隐藏延时按钮;
                inputView.btnDelay.Visible = false;
                ///记录条件类型
                inputView.btnClick.Name = inputCondition.condition_type;
                ///记录条件索引
                inputView.btnClick.Tag = inputCondition.sid;
                inputView.btnClick.Tag = inputCondition;
                ///条件状态数组
                List<Dictionary<string, string>> dicList = inputCondition.condition as List<Dictionary<string, string>>;
                List<Dictionary<string, string>> dicList = inputCondition.condition;
                //显示条件各种类型状态
                switch (inputCondition.condition_type)
                {
@@ -123,9 +125,9 @@
                    case "3":
                        {
                            //用sid找到设备;
                            var device = LogicMethod.GetDevice(inputCondition.sid);
                            var device = LogicMethod.CurrLogicMethod.GetDevice(inputCondition.sid);
                            //用设备的functionType类型找到对应图标;
                            inputView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(device.spk);
                            inputView.btnIcon.UnSelectedImagePath = LogicMethod.CurrLogicMethod.GetIconPath(device.spk);
                            //显示设备名称
                            inputView.btnText.Text = device.name;
                            //改变设备名称显示控件宽度
@@ -256,7 +258,7 @@
                                        }
                                    }
                                    break;
                                case SPK.SensoruUtrasonic:
                                case SPK.SensorUtrasonic:
                                    {
                                        string str = "";
                                        foreach (var dic in dicList)
@@ -268,7 +270,7 @@
                                                    {
                                                        if (value == "true")
                                                        {
                                                            str+= Language.StringByID(StringId.youren)+";";
                                                            str += Language.StringByID(StringId.youren) + ";";
                                                        }
                                                        else
                                                        {
@@ -313,6 +315,65 @@
                                        }
                                    }
                                    break;
                                case SPK.SensorEnvironment:
                                    {
                                        string strtext = "";
                                        foreach (var dic in dicList)
                                        {
                                            string key = dic["key"];
                                            string value = dic["value"];
                                            string comparator = dic["comparator"];
                                            switch (key)
                                            {
                                                case "temperature":
                                                    {
                                                        if (comparator == ">")
                                                        {
                                                            strtext = ">" + value + "℃";
                                                        }
                                                        else if (comparator == "<")
                                                        {
                                                            strtext = "<" + value + "℃";
                                                        }
                                                    }
                                                    break;
                                                case "humidity":
                                                    {
                                                        if (comparator == ">")
                                                        {
                                                            strtext = ">" + value + "%";
                                                        }
                                                        else if (comparator == "<")
                                                        {
                                                            strtext = "<" + value + "%";
                                                        }
                                                    }
                                                    break;
                                                case "co2":
                                                    {
                                                        strtext = Language.StringByID(StringId.co2) + new PublicInterface { }.GetString("co2", value);
                                                    }
                                                    break;
                                                case "pm25":
                                                    {
                                                        strtext = Language.StringByID(StringId.pm25) + new PublicInterface { }.GetString("pm25", value);
                                                    }
                                                    break;
                                                case "tvoc":
                                                    {
                                                        strtext = Language.StringByID(StringId.tvoc) + new PublicInterface { }.GetString("tvoc", value);
                                                    }
                                                    break;
                                            }
                                            inputView.btnState.Text = strtext;
                                        }
                                    }
                                    break;
                            }
                        }
@@ -332,7 +393,7 @@
                                {
                                    case "outdoor_temp":
                                        {
                                            strvalue = value;
                                            strvalue = value + "℃";
                                            if (comparator == ">")
                                            {
                                                strtext = Language.StringByID(StringId.wendugaoyu);
@@ -346,7 +407,7 @@
                                        break;
                                    case "outdoor_humity":
                                        {
                                            strvalue = value;
                                            strvalue = value + "%";
                                            if (comparator == ">")
                                            {
                                                strtext = Language.StringByID(StringId.shidugaoyu);
@@ -361,7 +422,7 @@
                                    case "pm2.5":
                                        {
                                            strtext = Language.StringByID(StringId.PM25);
                                            strvalue = new OutdoorEnvironment { }.GetString(value);
                                            strvalue = new PublicInterface { }.GetString("pm25", value);
                                        }
                                        break;
@@ -407,23 +468,74 @@
                            }
                        }
                        break;
                    case "9":
                        {
                            inputView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png";
                            foreach (var dic in dicList)
                            {
                                string strtext = "";
                                string value = dic["value"];
                                switch (value)
                                {
                                    case "excellent":
                                        {
                                            strtext = Language.StringByID(StringId.kongqiyou);
                                        }
                                        break;
                                    case "good":
                                        {
                                            strtext = Language.StringByID(StringId.kongqiliang);
                                        }
                                        break;
                                    case "poor":
                                        {
                                            strtext = Language.StringByID(StringId.kongqicha);
                                        }
                                        break;
                                }
                                inputView.btnText.TextID = StringId.kongqizhiliang;
                                inputView.btnState.Text = strtext;
                            }
                        }
                        break;
                }
                //再次编辑条件状态点击事件
                inputView.btnClick.MouseUpEventHandler += (sen, e) =>
                {
                    Button button = (Button)sen;
                    //当前编辑的条件
                    Input ckcliInput = inputView.btnClick.Tag as Input;
                    //找到当前编辑的索引
                    int indexVulae = 0;
                    for (int index = 0; index < Logic.currlogic.input.Count; index++)
                    {
                        Input input = Logic.currlogic.input[index];
                        if (input.sid == inputView.btnClick.Tag.ToString())
                        if (input.sid == ckcliInput.sid)
                        {
                            //用户可能删除数据,使列表索引发生改变;
                            //通过唯一sid重新查找到索引且更新索引值
                            indexVulae = index;
                            break;
                            if (button.Name == "3")
                            {
                                //有些设备比较特殊(例如:海林传感器还是要判断属性值,温湿度属性还要判断比较关系,才能确认是否已经存在该条件,其他设备条件直接用sid判断即可)
                                //加一级判断是为兼容特殊设备
                                if (new ConditionDeviceFunList { }.IsContainsAll(ckcliInput.condition, input.condition))
                                {
                                    //用户可能删除数据,使列表索引发生改变;
                                    //通过唯一sid重新查找到索引且更新索引值
                                    indexVulae = index;
                                    break;
                                }
                            }
                            else
                            {
                                //用户可能删除数据,使列表索引发生改变;
                                //通过唯一sid重新查找到索引且更新索引值
                                indexVulae = index;
                                break;
                            }
                        }
                    }
                    //标记编辑状态
@@ -436,7 +548,7 @@
                                Input _input = Logic.currlogic.input[indexVulae];
                                if (_input.condition_type == "1")
                                {
                                    var dicLists = _input.condition as List<Dictionary<string, string>>;
                                    var dicLists = _input.condition;
                                    foreach (var dic in dicLists)
                                    {
                                        string keyValue = dic["key"];
@@ -486,11 +598,78 @@
                        case "3":
                            {
                                //用sid找到设备;
                                var device = LogicMethod.GetDevice(inputCondition.sid);
                                ConditionDeviceFunList deviceFunList = new ConditionDeviceFunList();
                                MainPage.BasePageView.AddChidren(deviceFunList);
                                deviceFunList.Show(device, indexVulae, edit);
                                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                                var device = LogicMethod.CurrLogicMethod.GetDevice(inputCondition.sid);
                                if (device.spk == SPK.SensorEnvironment)
                                {
                                    //这个设备比较特殊
                                    ConditionDeviceFunList conditionDeviceFunList = new ConditionDeviceFunList();
                                    ///当前的索引值数据对象
                                    Input inputedit = Logic.currlogic.input[indexVulae];
                                    ///状态值
                                    string stateValue = "";
                                    foreach (var dic in inputedit.condition)
                                    {
                                        string key = dic["key"];
                                        string comparator = dic["comparator"];
                                        stateValue = dic["value"];
                                        switch (key)
                                        {
                                            case "temperature":
                                                {
                                                    int titleInt = 0;
                                                    if (comparator == ">")
                                                    {
                                                        titleInt = StringId.wendugaoyu;
                                                    }
                                                    else if (comparator == "<")
                                                    {
                                                        titleInt = StringId.wendudiyu;
                                                    }
                                                    conditionDeviceFunList.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "humidity":
                                                {
                                                    int titleInt = 0;
                                                    if (comparator == ">")
                                                    {
                                                        titleInt = StringId.shidugaoyu;
                                                    }
                                                    else if (comparator == "<")
                                                    {
                                                        titleInt = StringId.shidudiyu;
                                                    }
                                                    conditionDeviceFunList.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "co2":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "co2", StringId.co2, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "pm25":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "pm25", StringId.pm25, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "tvoc":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "tvoc", StringId.tvoc, indexVulae, true, stateValue);
                                                }
                                                break;
                                        }
                                    }
                                }
                                else
                                {
                                    ConditionDeviceFunList deviceFunList = new ConditionDeviceFunList();
                                    MainPage.BasePageView.AddChidren(deviceFunList);
                                    deviceFunList.Show(device, indexVulae, edit);
                                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                                }
                            }
                            break;
                        case "4":
@@ -565,6 +744,15 @@
                                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                            }
                            break;
                        case "9":
                            {
                                AirQuality airQuality = new AirQuality();
                                MainPage.BasePageView.AddChidren(airQuality);
                                airQuality.Show();
                                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                            }
                            break;
                    }
                };
                ///删除控件
@@ -595,7 +783,7 @@
                ///记录条件索引
                targetView.btnClick.Tag = outputTarget.sid;
                ///条件状态数组
                List<Dictionary<string, string>> dicList = outputTarget.status as List<Dictionary<string, string>>;
                List<Dictionary<string, string>> dicList = outputTarget.status;
                //显示状态值
                string stateStr = "";
                //显示输出条件各种类型状态
@@ -604,14 +792,14 @@
                    case "1":
                        {
                            //用sid找到设备;
                            var device = LogicMethod.GetDevice(outputTarget.sid);
                            var device = LogicMethod.CurrLogicMethod.GetDevice(outputTarget.sid);
                            //用设备的functionType类型找到对应图标;
                            targetView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(device.spk);
                            targetView.btnIcon.UnSelectedImagePath = LogicMethod.CurrLogicMethod.GetIconPath(device.spk);
                            //显示设备名称
                            targetView.btnText.Text = device.name;
                            //改变设备名称显示控件宽度
                            targetView.btnText.Width = Application.GetRealWidth(80);
                            //区别不同设备,显示不同设备状态
                            switch (device.spk)
                            {
@@ -656,7 +844,7 @@
                                        {
                                            stateStr = brightness + "%";
                                        }
                                    }
                                    break;
                                case SPK.CurtainSwitch:
@@ -889,7 +1077,7 @@
                    case "2":
                        {
                            //用sid找到场景;
                            var scene = LogicMethod.GetSecne(outputTarget.sid);
                            var scene = LogicMethod.CurrLogicMethod.GetSecne(outputTarget.sid);
                            targetView.btnIcon.UnSelectedImagePath = "LogicIcon/scene.png";
                            targetView.btnNextIcon.Visible = false;
                            //显示场景名称
@@ -914,7 +1102,7 @@
                }
                else
                {
                    targetView.btnText.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay)+ stateStr;
                    targetView.btnText.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr;
                }
                //再次编辑条件状态点击事件
                targetView.btnClick.MouseUpEventHandler += (sen, e) =>
@@ -940,7 +1128,7 @@
                        case "1":
                            {
                                //用sid找到设备;
                                var device = LogicMethod.GetDevice(outputTarget.sid);
                                var device = LogicMethod.CurrLogicMethod.GetDevice(outputTarget.sid);
                                TargetDeviceFunList deviceFunList = new TargetDeviceFunList();
                                MainPage.BasePageView.AddChidren(deviceFunList);
                                deviceFunList.Show(device, indexVulae, edit);
@@ -980,7 +1168,7 @@
                            targetView.btnText.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr;
                        }
                    });
                };
                ///删除控件
                targetView.btnDel.MouseUpEventHandler += (sender, e) =>
@@ -1043,7 +1231,11 @@
                                    break;
                                case "brightness":
                                    {
                                        if (button2 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        button2.Text = value + "%";
                                    }
                                    break;
@@ -1106,11 +1298,21 @@
                                    break;
                                case "set_temp":
                                    {
                                        if (button2 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        button2.Text = value + "℃";
                                    }
                                    break;
                                case "mode":
                                    {
                                        if (button3 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        switch (value)
                                        {
                                            case "cool":
@@ -1141,6 +1343,11 @@
                                    break;
                                case "fan":
                                    {
                                        if (button4 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        switch (value)
                                        {
                                            case "high":
@@ -1203,11 +1410,21 @@
                                    break;
                                case "set_temp":
                                    {
                                        if (button2 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        button2.Text = value + "℃";
                                    }
                                    break;
                                case "mode":
                                    {
                                        if (button3 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        switch (value)
                                        {
                                            case "day":
@@ -1332,7 +1549,7 @@
                        }
                    }
                    break;
                case SPK.SensoruUtrasonic:
                case SPK.SensorUtrasonic:
                    {
                        foreach (var dic in dicList)
                        {
@@ -1439,7 +1656,7 @@
                    case "3":
                        {
                            //用sid找到设备;
                            var device = LogicMethod.GetDevice(inputCondition.sid);
                            var device = LogicMethod.CurrLogicMethod.GetDevice(inputCondition.sid);
                            name = device.name + "-";
                        }
                        break;
@@ -1454,7 +1671,7 @@
                    case "1":
                        {
                            //用sid找到设备;
                            var device = LogicMethod.GetDevice(outputTarget.sid);
                            var device = LogicMethod.CurrLogicMethod.GetDevice(outputTarget.sid);
                            //显示设备名称
                            name += device.name;
                            string stateStr = "";
@@ -1559,7 +1776,7 @@
                    case "2":
                        {
                            //用sid找到场景;
                            var scene = LogicMethod.GetSecne(outputTarget.sid);
                            var scene = LogicMethod.CurrLogicMethod.GetSecne(outputTarget.sid);
                            name += scene.name;
                        }
@@ -1577,7 +1794,7 @@
        /// <param name="fLayout">在哪个界面显示</param>
        /// <param name="edit">(true=编辑;false=新建)</param>
        /// <param name="index">编辑条件的索引</param>
        private void Delayed(FrameLayout thisFLayout, Output output,Action<int>action)
        private void Delayed(FrameLayout thisFLayout, Output output, Action<int> action)
        {
            FrameLayout fLayout = new FrameLayout
            {
@@ -1623,12 +1840,12 @@
                string second = timePointView.GetmStringList()[index2].Split(' ')[0];
                int minuetIntValue = int.Parse(minuet);
                int secondIntValue = int.Parse(second);
                timepoint = minuetIntValue*60+secondIntValue;
                timepoint = minuetIntValue * 60 + secondIntValue;
            };
            //确定点击事件
            timePointView.btnConfirm.MouseUpEventHandler += (sender, e3) =>
            {
                if (timepoint==0)
                if (timepoint == 0)
                {
                    //提示
                    return;
@@ -1666,7 +1883,11 @@
                    state = seconds.ToString() + Language.StringByID(StringId.s);
                }
            }
            if (!string.IsNullOrEmpty(state)) {
                state = Language.StringByID(StringId.delayLogic) + state;
            }
            return state;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
@@ -5,6 +5,7 @@
    /// <summary>
    /// 逻辑存储数据对象
    /// </summary>
    [Serializable]
    public class Logic
    {
@@ -62,6 +63,7 @@
    /// <summary>
    /// 执行周期对象
    /// </summary>
    [Serializable]
    public class Cycle
    {
        /// <summary>
@@ -74,6 +76,7 @@
    /// <summary>
    /// 输入条件对象
    /// </summary>
    [Serializable]
    public class Input
    {
        /// <summary>
@@ -93,10 +96,15 @@
        /// </summary>
        public string condition_type = "";
        public List<Dictionary<string, string>> condition = new List<Dictionary<string, string>>();
        /// <summary>
        /// 地理围栏配置
        /// </summary>
        public Fence geo_fence = new Fence();
    }
    /// <summary>
    /// 输出目标对象
    /// </summary>
    [Serializable]
    public class Output
    {
        /// <summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -8,6 +8,22 @@
    public class LogicMethod
    {
        private static LogicMethod logicMethod = null;
        public static LogicMethod CurrLogicMethod
        {
            get
            {
                if (logicMethod == null)
                {
                    return new LogicMethod();
                }
                return logicMethod;
            }
        }
        /// <summary>
        /// 表示是条件
        /// </summary>
@@ -19,15 +35,15 @@
        /// <summary>
        /// 移除所有"Logic"界面
        /// </summary>
        public static void RemoveAllView()
        public void RemoveAllView()
        {
            MainPage.BasePageView.RemoveViewByTag("Logic");
        }
        /// <summary> Converts an array of bytes into a formatted string of hex digits (ex: E4 CA B2)</summary>
        /// <param name="data"> The array of bytes to be translated into a string of hex digits. </param>
        /// <returns> Returns a well formatted string of hex digits with spacing. </returns>
        static string byteArrayToHexString(byte[] data)
        public string byteArrayToHexString(byte[] data)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            foreach (byte b in data)
@@ -46,7 +62,7 @@
  * @param i 一个int数字
  * @return byte[]
  */
        public static byte[] int2ByteArray(int i)
        public byte[] int2ByteArray(int i)
        {
            byte[] result = new byte[4];
            result[0] = (byte)((i >> 24) & 0xFF);
@@ -59,7 +75,7 @@
        /// 获取时间戳
        /// </summary>
        /// <returns></returns>
        static int getTimeStamp()
        public int getTimeStamp()
        {
            TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
            return (int)ts.TotalSeconds;
@@ -67,7 +83,7 @@
        /// <summary>
        /// 生成逻辑sid方法
        /// </summary>
        public static string NewSid()
        public string NewSid()
        {
            string logicId = "";
            try
@@ -111,7 +127,7 @@
        /// <param name="dic">Dictionary类</param>
        /// <param name="key">健</param>
        /// <param name="value">值</param>
        public static void dictionary(Dictionary<string, string> dic, string key, string value)
        public void dictionary(Dictionary<string, string> dic, string key, string value)
        {
            if (dic.ContainsKey(key)) //判断是否存在键值
            {
@@ -125,7 +141,7 @@
        /// 获取网关房间列表
        /// </summary>
        /// <returns></returns>
        public static List<HDL_ON.Entity.Room> GetGatewayRoomList()
        public List<HDL_ON.Entity.Room> GetGatewayRoomList()
        {
            return HDL_ON.Entity.SpatialInfo.CurrentSpatial.RoomList;
        }
@@ -133,7 +149,7 @@
        /// 获取网关房间列表
        /// </summary>
        /// <returns></returns>
        public static List<HDL_ON.Entity.Room> GetGatewayRoomList(string name)
        public List<HDL_ON.Entity.Room> GetGatewayRoomList(string name)
        {
            List<Entity.Room> roomList = new List<Entity.Room>();
            Entity.Room room1 = new Entity.Room();
@@ -158,7 +174,7 @@
        /// 获取网关设备列表
        /// </summary>
        /// <returns></returns>
        public static List<HDL_ON.Entity.Function> GetGatewayDeviceList()
        public List<HDL_ON.Entity.Function> GetGatewayDeviceList()
        {
            return Entity.FunctionList.List.GetDeviceFunctionList();
        }
@@ -166,7 +182,7 @@
        /// 获取网关场景列表
        /// </summary>
        /// <returns></returns>
        public static List<HDL_ON.Entity.Scene> GetSceneList()
        public List<HDL_ON.Entity.Scene> GetSceneList()
        {
            return HDL_ON.Entity.FunctionList.List.scenes;
        }
@@ -175,7 +191,7 @@
        /// </summary>
        /// <param name="room">当前房间</param>
        /// <returns></returns>
        public static List<HDL_ON.Entity.Function> GetRoomDevice(HDL_ON.Entity.Room room)
        public List<HDL_ON.Entity.Function> GetRoomDevice(HDL_ON.Entity.Room room)
        {
            List<HDL_ON.Entity.Function> deviceLists = new List<Entity.Function>();
            List<HDL_ON.Entity.Function> lists = GetGatewayDeviceList();
@@ -205,7 +221,7 @@
        /// </summary>
        /// <param name="sid">设备唯一标识</param>
        /// <returns></returns>
        public static HDL_ON.Entity.Function GetDevice(string sid)
        public HDL_ON.Entity.Function GetDevice(string sid)
        {
            HDL_ON.Entity.Function device = new Entity.Function() { name = "Unknown" };
            List<HDL_ON.Entity.Function> deviceLists = GetGatewayDeviceList();
@@ -226,7 +242,7 @@
        /// </summary>
        /// <param name="sid">场景唯一标识</param>
        /// <returns></returns>
        public static HDL_ON.Entity.Scene GetSecne(string sid)
        public HDL_ON.Entity.Scene GetSecne(string sid)
        {
            HDL_ON.Entity.Scene scene = new Entity.Scene() { name = "Unknown" };
            List<HDL_ON.Entity.Scene> sceneLists = GetSceneList();
@@ -246,7 +262,7 @@
        /// </summary>
        /// <param name="device">设备</param>
        /// <returns></returns>
        public static string GetGetRoomName(HDL_ON.Entity.Function device)
        public string GetGetRoomName(HDL_ON.Entity.Function device)
        {
            string roomName = "";
            List<HDL_ON.Entity.Room> roomLists = GetGatewayRoomList();
@@ -268,7 +284,7 @@
        /// </summary>
        /// <param name="functionType">设备类型</param>
        /// <returns></returns>
        public static string GetIconPath(string functionType)
        public string GetIconPath(string functionType)
        {
            string strPath = "";
            switch (functionType)
@@ -307,8 +323,9 @@
                case SPK.SensorDuiShe:
                case SPK.SensorPir:
                case SPK.SensorDoorWindow:
                case SPK.SensoruUtrasonic:
                case SPK.SensorUtrasonic:
                case SPK.SenesorMegahealth:
                case SPK.SensorEnvironment:
                    {
                        strPath = "LogicIcon/sensor.png";
                    }
@@ -322,7 +339,7 @@
        /// </summary>
        /// <param name="deviceList">设备列表</param>
        /// <returns></returns>
        public static List<string> GetDeviceTypeList(List<HDL_ON.Entity.Function> deviceList)
        public List<string> GetDeviceTypeList(List<HDL_ON.Entity.Function> deviceList)
        {
            List<string> deviceStrTypeList = new List<string>();
            deviceStrTypeList.Clear();
@@ -365,8 +382,9 @@
            || device.spk == SPK.SensorDuiShe
            || device.spk == SPK.SensorPir
            || device.spk == SPK.SensorDoorWindow
            || device.spk == SPK.SensoruUtrasonic
            || device.spk == SPK.SensorUtrasonic
            || device.spk == SPK.SenesorMegahealth
            || device.spk == SPK.SensorEnvironment
            );
            if (sensor != null)
            {
@@ -380,7 +398,7 @@
        /// </summary>
        /// <param name="deviceType">设备类型(灯光类,窗帘类。)</param>
        /// <returns></returns>
        public static List<string> GetDeviceTypeFunctionList(string deviceType)
        public List<string> GetDeviceTypeFunctionList(string deviceType)
        {
            List<string> functionTypeList = new List<string>();
            if (deviceType == Language.StringByID(StringId.Lights))
@@ -415,8 +433,10 @@
                functionTypeList.Add(SPK.SensorDuiShe);
                functionTypeList.Add(SPK.SensorPir);
                functionTypeList.Add(SPK.SensorDoorWindow);
                functionTypeList.Add(SPK.SensoruUtrasonic);
                functionTypeList.Add(SPK.SensorUtrasonic);
                functionTypeList.Add(SPK.SenesorMegahealth);
                functionTypeList.Add(SPK.SensorEnvironment);
            }
            return functionTypeList;
@@ -426,7 +446,7 @@
        /// 条件/目标支持设备
        /// </summary>
        /// <returns></returns>
        public static List<string> GetSupportEquipment(string if_type)
        public List<string> GetSupportEquipment(string if_type)
        {
            List<string> deviceTypeList = new List<string>();
            switch (if_type)
@@ -451,8 +471,10 @@
                        deviceTypeList.Add(SPK.SensorDuiShe);
                        deviceTypeList.Add(SPK.SensorPir);
                        deviceTypeList.Add(SPK.SensorDoorWindow);
                        deviceTypeList.Add(SPK.SensoruUtrasonic);
                        deviceTypeList.Add(SPK.SensorUtrasonic);
                        deviceTypeList.Add(SPK.SenesorMegahealth);
                        deviceTypeList.Add(SPK.SensorEnvironment);
                    }
                    break;
                case target_if:
@@ -479,7 +501,7 @@
        /// <param name="functionType">源数据列表1</param>
        /// <param name="deviceList">源数据列表2</param>
        /// <returns></returns>
        public static List<Entity.Function> GetShowDeviceList(List<string> functionType, List<HDL_ON.Entity.Function> deviceList)
        public List<Entity.Function> GetShowDeviceList(List<string> functionType, List<HDL_ON.Entity.Function> deviceList)
        {
            List<HDL_ON.Entity.Function> devList = new List<Entity.Function>();
            for (int i = 0; i < deviceList.Count; i++)
@@ -501,7 +523,7 @@
        /// <param name="room">当前房间</param>
        /// <param name="str">判断符(表示=输入设备和输出设备)</param>
        /// <returns></returns>
        public static List<Entity.Function> GetFunctionDeviceList(Entity.Room room, string str)
        public List<Entity.Function> GetFunctionDeviceList(Entity.Room room, string str)
        {
            List<string> functionTypeList = GetSupportEquipment(str);
            //返回房间设备列表
@@ -513,7 +535,7 @@
        /// <summary>
        /// 网关ID(获取嘉乐网关ID)
        /// </summary>
        public static string GatewayId
        public string GatewayId
        {
            get
            {
@@ -527,7 +549,7 @@
        /// <summary>
        /// 住宅ID
        /// </summary>
        public static string HomeId
        public string HomeId
        {
            get
            {
@@ -537,12 +559,14 @@
        /// <summary>
        /// 是否为其他主用户分享过来的住宅
        /// </summary>
        public static bool IsOthreShare
        public bool IsOthreShare
        {
            get
            {
                return Entity.DB_ResidenceData.Instance.CurrentRegion.isOtherShare;
            }
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs
@@ -35,7 +35,6 @@
            frameLayout.Height = Application.GetRealHeight(flHeight);
            btnIf.Y= Application.GetRealHeight(btnY);
            frameLayout.AddChidren(btnIf);
            return frameLayout;
        }
    }
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs
@@ -132,5 +132,7 @@
            frameLayout.AddChidren(btnClick);
            return frameLayout;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs
@@ -9,7 +9,7 @@
        /// <summary>
        /// 最上面块View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        public FrameLayout frameLayout = new FrameLayout
        {
            BackgroundColor = CSS.CSS_Color.viewTop,
            Height = Application.GetRealHeight(64),
@@ -22,7 +22,7 @@
        {
            TextSize = TextSize.text18,
            TextColor = CSS.CSS_Color.textColor,
            Width = Application.GetRealWidth(TextSize.view375-60-60),
            Width = Application.GetRealWidth(TextSize.view375 - 60 - 60),
            Height = Application.GetRealHeight(25),
            Y = Application.GetRealHeight(30),
            X = Application.GetRealWidth(60)
@@ -62,7 +62,7 @@
        /// <summary>
        /// 设置图标增加热键大小
        /// </summary>
        public Button clickSetBtn = new Button
        public Button clickSetBtn = new Button
        {
            X = Application.GetRealWidth(337 - 37),
            Width = Application.GetRealWidth(28 + 37),
@@ -82,6 +82,35 @@
            return frameLayout;
        }
        #endregion
        /// <summary>
        /// 显示位置
        /// </summary>
        public void Location()
        {
            //获取宽度
            int widthValue = topNameBtn.GetTextWidth();
            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
            Button locationBtn = new Button
            {
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealWidth(18),
                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
                Y = Application.GetRealHeight(34 + 1),
                UnSelectedImagePath = "LogicIcon/location.png",
            };
            frameLayout.AddChidren(locationBtn);
            Button textBtn = new Button
            {
                Height = Application.GetRealHeight(14),
                Y = Application.GetRealHeight(57),
                TextSize = LogicView.TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                Text = "广东广州市番禺区石楼镇",
            };
            frameLayout.AddChidren(textBtn);
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -261,7 +261,7 @@
            if (idStr.Code == "0" && idStr.Data != null && idStr.Data.ToString() != "")
            {
                var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data);
                var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Date>>(date);
                var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicData>>(date);
                for (int i = 0; i < dateList.Count; i++)
                {
                    //添加逻辑ID
@@ -526,12 +526,12 @@
            }
        }
    }
    class Date
    class LogicData
    {
        /// <summary>
        /// 云端唯一id
        /// </summary>
        public string userLogicId = "";
        public string userLogicId = "";
        /// <summary>
        /// 网关id
        /// </summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/OnePortAutomation.cs
@@ -195,15 +195,21 @@
                    {
                        list.Add(logic.name);
                    }
                    new LogicView.TipPopView().InputBox(StringId.editName, InpOrOutLogicMethod.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName, view
                        ) =>
                    new LogicView.TipPopView().InputBox(StringId.editName, InpOrOutLogicMethod.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName, view) =>
                    {
                        Logic.currlogic.name = logicName;
                        Logic.currlogic.sid = LogicMethod.NewSid();
                        Logic.currlogic.sid = LogicMethod.CurrLogicMethod.NewSid();
                        if (MainPage.NoLoginMode)
                        {
                            Logic.currlogic.userLogicId = Guid.NewGuid().ToString();
                            Logic.LogicList.Add(Logic.currlogic);
                            LogicMethod.CurrLogicMethod.RemoveAllView();
                            MainView.MainShow();
                            return;
                        }
                        loading.Start();
                        new System.Threading.Thread(() =>
                        {
                            try
                            {
                                //发送新加逻辑命令;
@@ -242,7 +248,7 @@
                                        }
                                        Logic.LogicList.Add(Logic.currlogic);
                                        LogicMethod.RemoveAllView();
                                        LogicMethod.CurrLogicMethod.RemoveAllView();
                                        MainView.MainShow();
                                    }
                                    else if (responsePackNew != null && responsePackNew.Code == "14005")
@@ -282,7 +288,7 @@
                                loading.Hide();
                                if (responsePackNew != null && responsePackNew.Code == "0")
                                {
                                    LogicMethod.RemoveAllView();
                                    LogicMethod.CurrLogicMethod.RemoveAllView();
                                    MainView.MainShow();
                                }
                                else if (responsePackNew != null && responsePackNew.Code == "14005")
HDL_ON/UI/UI2/3-Intelligence/Automation/OutdoorEnvironment.cs
@@ -164,31 +164,11 @@
        public void PmAction(FrameLayout frame, string stateValue = "")
        {
            PublicInterface pmView = new PublicInterface();
            var pmListStr = pmView.GetViewList("pm2.5");
            pmView.SingleSelectionShow(frame, pmListStr, Language.StringByID(StringId.PM25), GetString(stateValue)
            var pmListStr = pmView.GetViewList("pm25");
            pmView.SingleSelectionShow(frame, pmListStr, Language.StringByID(StringId.PM25), pmView.GetString("pm25", stateValue)
               , (text) =>
               {
                   string value = "";
                   if (text == Language.StringByID(StringId.pmyou))
                   {
                       value = "10";
                   }
                   else if (text == Language.StringByID(StringId.pmliang))
                   {
                       value = "50";
                   }
                   else if (text == Language.StringByID(StringId.pmqingdu))
                   {
                       value = "90";
                   }
                   else if (text == Language.StringByID(StringId.pmzhongdu))
                   {
                       value = "130";
                   }
                   else if (text == Language.StringByID(StringId.pmzhongduwuran))
                   {
                       value = "170";
                   }
                   var value= pmView.GetValue("pm25", text);
                   AddDic("pm2.5", "=", value);
               });
        }
@@ -201,13 +181,13 @@
        private void AddDic(string keyValue, string comparator, string value)
        {
            Input input = new Input();
            input.sid = LogicMethod.NewSid();
            input.sid = LogicMethod.CurrLogicMethod.NewSid();
            input.condition_type = "4";
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.dictionary(dic, "key", keyValue);
            LogicMethod.dictionary(dic, "comparator", comparator);
            LogicMethod.dictionary(dic, "data_type", "float");
            LogicMethod.dictionary(dic, "value", value);
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", keyValue);
            LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", comparator);
            LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "float");
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", value);
            input.condition.Add(dic);
            AddCondition(input, keyValue, comparator);
        }
@@ -247,7 +227,7 @@
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.RemoveAllView();
            LogicMethod.CurrLogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
@@ -277,41 +257,6 @@
            return false;
        }
        /// <summary>
        /// 数值返回文本
        /// </summary>
        /// <param name="strValue">值</param>
        /// <returns></returns>
        public string GetString(string strValue)
        {
            string text = "";
            int intValue = 0;
            if (strValue != "")
            {
                intValue = int.Parse(strValue);
            }
            if (intValue > 0 && intValue < 35)
            {
                text = Language.StringByID(StringId.pmyou);
            }
            else if (intValue > 35 && intValue < 75)
            {
                text = Language.StringByID(StringId.pmliang);
            }
            else if (intValue > 75 && intValue < 115)
            {
                text = Language.StringByID(StringId.pmqingdu);
            }
            else if (intValue > 115 && intValue < 150)
            {
                text = Language.StringByID(StringId.pmzhongdu);
            }
            else if (intValue > 150)
            {
                text = Language.StringByID(StringId.pmzhongduwuran);
            }
            return text;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
@@ -16,6 +16,10 @@
        /// <param name="textSize">显示文本字体大小</param>
        public void SingleSelectionShow(FrameLayout frame, List<string> list, string titleText, string stateText, Action<string> action, int textSize = LogicView.TextSize.text14)
        {
            if (list == null)
            {
                return;
            }
            FrameLayout frameLayout = new FrameLayout
            {
                BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
@@ -75,7 +79,7 @@
            };
        }
        /// <summary>
        /// 多选择
        /// </summary>
@@ -259,7 +263,8 @@
        /// <param name="list">显示数据源</param>
        /// <param name="titleText">标题</param>
        /// <param name="action">返回值索引值</param>
        public void FrameOrVv(FrameLayout frame, List<string>list, int titleText,Action<int> action) {
        public void FrameOrVv(FrameLayout frame, List<string> list, int titleText, Action<int> action)
        {
            int line = 0;
            if (list.Count == 0 || list.Count > 5)
@@ -388,6 +393,215 @@
        }
        /// <summary>
        /// 超出5个元素该用滑动控件
        /// </summary>
        /// <param name="frame">显示在哪个界面的父控件</param>
        /// <param name="list">显示数据源</param>
        /// <param name="stateList">之前状态数据源</param>
        /// <param name="titleText">标题</param>
        /// <param name="action">返回值索引值</param>
        public void FrameOrVvList(FrameLayout frame, List<string> list, List<string> stateList, int titleText, Action<List<string>> action)
        {
            int line = 0;
            if (list.Count == 0 || list.Count > 5)
            {
                //超出5个只能默认5个;
                line = 5;
            }
            else
            {
                line = list.Count;
            }
            FrameLayout frameLayout = new FrameLayout
            {
                BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
            };
            frame.AddChidren(frameLayout);
            LogicView.DateView view = new LogicView.DateView();
            view.btnTitle.TextID = titleText;
            view.FLayoutView(frameLayout, line);
            view.btnCancel.MouseUpEventHandler += (sender, e) =>
            {
                //移除fLayout界面
                frameLayout.RemoveFromParent();
            };
            //小于5使用
            FrameLayout frameL = new FrameLayout
            {
                Y = Application.GetRealHeight(56),
                Height = Application.GetRealHeight(50 * line),
            };
            //大于5使用
            VerticalRefreshLayout verticalRefresh = new VerticalRefreshLayout
            {
                Y = Application.GetRealHeight(56),
                Height = Application.GetRealHeight(50 * 5),
            };
            verticalRefresh.BeginHeaderRefreshingAction += () =>
            {
                //关闭刷新View;
                verticalRefresh.EndHeaderRefreshing();
            };
            if (list.Count == 0)
            {
                //Button btnTipNot = new Button
                //{
                //    X = Application.GetRealWidth(93),
                //    Y = Application.GetRealHeight(80),
                //    Width = Application.GetRealWidth(158),
                //    Height = Application.GetRealWidth(158),
                //    UnSelectedImagePath = "TipNot.png",
                //};
                //view.frameLayout.AddChidren(btnTipNot);
                //Button btnTipNotText = new Button()
                //{
                //    Y = btnTipNot.Bottom + Application.GetRealHeight(16),
                //    Height = Application.GetRealHeight(20),
                //    TextID = StringId.secnenull,
                //    TextColor = CSS.CSS_Color.textColor,
                //    TextSize = LogicView.TextSize.text14,
                //    TextAlignment = TextAlignment.Center,
                //};
                //view.frameLayout.AddChidren(btnTipNotText);
            }
            else if (list.Count > 0 && list.Count <= 5)
            {
                view.frameLayout.AddChidren(frameL);
            }
            else if (list.Count > 5)
            {
                view.frameLayout.AddChidren(verticalRefresh);
            }
            List<string> selecetdList = new List<string>();
            for (int i = 0; i < list.Count; i++)
            {
                string strName = list[i];
                LogicView.CheckView checkView = new LogicView.CheckView();
                checkView.btnText.TextSize = LogicView.TextSize.text14;
                if (list.Count <= 5)
                {
                    checkView.frameLayout.Y = Application.GetRealWidth(i * 50);
                    frameL.AddChidren(checkView.FLayoutView());
                    if (line - 1 == i)
                    {
                        checkView.btnLine.BackgroundColor = CSS.CSS_Color.view;
                    }
                }
                else
                {
                    verticalRefresh.AddChidren(checkView.FLayoutView());
                }
                if (stateList.Contains(strName))
                {
                    checkView.btnClick.IsSelected = true;
                    checkView.btnCheckIcon.IsSelected = true;
                    selecetdList.Add(strName);
                }
                checkView.btnText.Text = strName;
                checkView.btnClick.Tag = strName;//标记
                //点击事件
                checkView.btnClick.MouseUpEventHandler += (sender1, e1) =>
                {
                    checkView.btnClick.IsSelected = !checkView.btnClick.IsSelected;
                    checkView.btnCheckIcon.IsSelected = checkView.btnClick.IsSelected;
                    if (checkView.btnClick.IsSelected)
                    {
                        if (!selecetdList.Contains(checkView.btnClick.Tag.ToString()))
                        {
                            selecetdList.Add(checkView.btnClick.Tag.ToString());
                        }
                    }
                    else
                    {
                        if (selecetdList.Contains(checkView.btnClick.Tag.ToString()))
                        {
                            selecetdList.Remove(checkView.btnClick.Tag.ToString());
                        }
                    }
                };
            }
            view.btnConfirm.MouseUpEventHandler += (sender1, e1) =>
            {
                if (selecetdList.Count == 0)
                {
                    return;
                }
                //列表索引值
                action(selecetdList);
                //移除fLayout界面
                frameLayout.RemoveFromParent();
            };
        }
        /// <summary>
        /// 温湿度组合界面
        /// </summary>
        /// <param name="frameLayout">父控件</param>
        /// <param name="text1">标题文本1</param>
        /// <param name="text2">标题文本2</param>
        /// <param name="action">回调函数</param>
        public void ViewZuHe(FrameLayout frameLayout, int text1, int text2, Action<int, FrameLayout> action)
        {
            FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewMiddle };
            frameLayout.AddChidren(frame);
            LogicView.TopView topView = new LogicView.TopView();
            topView.topNameBtn.TextID = StringId.wendu;
            frame.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                frame.RemoveFromParent();
            };
            FrameLayout viewLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64),
                Width = Application.GetRealWidth(LogicView.TextSize.view375),
                Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64),
                BackgroundColor = CSS.CSS_Color.viewMiddle,
            };
            frame.AddChidren(viewLayout);
            //温,湿度高于
            LogicView.SelectTypeView temperaturehigherView = new LogicView.SelectTypeView();
            temperaturehigherView.btnIcon.Visible = false;
            temperaturehigherView.btnText.X = Application.GetRealWidth(16);
            temperaturehigherView.btnLine.X = Application.GetRealWidth(16);
            temperaturehigherView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            temperaturehigherView.btnText.TextID = text1;
            viewLayout.AddChidren(temperaturehigherView.FLayoutView());
            //温,湿度低于
            LogicView.SelectTypeView temperatureunderView = new LogicView.SelectTypeView();
            temperatureunderView.frameLayout.Y = temperaturehigherView.frameLayout.Bottom;
            temperatureunderView.btnIcon.Visible = false;
            temperatureunderView.btnText.X = Application.GetRealWidth(16);
            temperatureunderView.btnLine.X = Application.GetRealWidth(16);
            temperatureunderView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            temperatureunderView.btnText.TextID = text2;
            viewLayout.AddChidren(temperatureunderView.FLayoutView());
            //温,湿度高于
            temperaturehigherView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
                action(text1, frame);
            };
            //温,湿度低于
            temperatureunderView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
                action(text2, frame);
            };
        }
        /// <summary>
        /// 获取界面列表
@@ -462,7 +676,7 @@
                      };
                    }
                    break;
                case "pm2.5":
                case "pm25":
                    {
                        list = new List<string> {
             Language.StringByID(StringId.pmyou),
@@ -470,6 +684,24 @@
             Language.StringByID(StringId.pmqingdu),
             Language.StringByID(StringId.pmzhongdu),
             Language.StringByID(StringId.pmzhongduwuran),
                      };
                    }
                    break;
                case "co2":
                    {
                        list = new List<string> {
             Language.StringByID(StringId.zhengchang),
             Language.StringByID(StringId.piangao),
             Language.StringByID(StringId.chaobiao),
                      };
                    }
                    break;
                case "tvoc":
                    {
                        list = new List<string> {
             Language.StringByID(StringId.zhengchang),
             Language.StringByID(StringId.chaobiao),
             Language.StringByID(StringId.yanzhong),
                      };
                    }
                    break;
@@ -647,6 +879,157 @@
            return stateList;
        }
        /// <summary>
        /// 数值返回文本
        /// </summary>
        /// <param name="type">类型</param>
        /// <param name="strValue">值</param>
        /// <returns></returns>
        public string GetString(string type, string strValue)
        {
            string text = "";
            int intValue = 0;
            if (strValue != "")
            {
                intValue = int.Parse(strValue);
            }
            switch (type)
            {
                case "pm25":
                    {
                        if (intValue > 0 && intValue < 35)
                        {
                            text = Language.StringByID(StringId.pmyou);
                        }
                        else if (intValue > 35 && intValue < 75)
                        {
                            text = Language.StringByID(StringId.pmliang);
                        }
                        else if (intValue > 75 && intValue < 115)
                        {
                            text = Language.StringByID(StringId.pmqingdu);
                        }
                        else if (intValue > 115 && intValue < 150)
                        {
                            text = Language.StringByID(StringId.pmzhongdu);
                        }
                        else if (intValue > 150)
                        {
                            text = Language.StringByID(StringId.pmzhongduwuran);
                        }
                    }
                    break;
                case "co2":
                    {
                        if (intValue > 0 && intValue < 800)
                        {
                            text = Language.StringByID(StringId.zhengchang);
                        }
                        else if (intValue > 800 && intValue < 1100)
                        {
                            text = Language.StringByID(StringId.piangao);
                        }
                        else if (intValue > 1100)
                        {
                            text = Language.StringByID(StringId.chaobiao);
                        }
                    }
                    break;
                case "tvoc":
                    {
                        if (intValue >=1 && intValue <= 3)
                        {
                            text = Language.StringByID(StringId.zhengchang);
                        }
                        else if (intValue >=4 && intValue<=6)
                        {
                            text = Language.StringByID(StringId.chaobiao);
                        }
                        else if (intValue >= 7 && intValue <= 9)
                        {
                            text = Language.StringByID(StringId.yanzhong);
                        }
                    }
                    break;
            }
            return text;
        }
        /// <summary>
        /// 本文返回数值返回
        /// </summary>
        /// <param name="type">类型</param>
        /// <param name="text">文本</param>
        /// <returns></returns>
        public string GetValue(string type, string text)
        {
            string value = "";
            switch (type)
            {
                case "pm25":
                    {
                        if (text == Language.StringByID(StringId.pmyou))
                        {
                            value = "10";
                        }
                        else if (text == Language.StringByID(StringId.pmliang))
                        {
                            value = "50";
                        }
                        else if (text == Language.StringByID(StringId.pmqingdu))
                        {
                            value = "90";
                        }
                        else if (text == Language.StringByID(StringId.pmzhongdu))
                        {
                            value = "130";
                        }
                        else if (text == Language.StringByID(StringId.pmzhongduwuran))
                        {
                            value = "170";
                        }
                    }
                    break;
                case "co2":
                    {
                        if (text == Language.StringByID(StringId.zhengchang))
                        {
                            value = "400";
                        }
                        else if (text == Language.StringByID(StringId.piangao))
                        {
                            value = "850";
                        }
                        else if (text == Language.StringByID(StringId.chaobiao))
                        {
                            value = "1200";
                        }
                    }
                    break;
                case "tvoc":
                    {
                        if (text == Language.StringByID(StringId.zhengchang))
                        {
                            value = "2";
                        }
                        else if (text == Language.StringByID(StringId.chaobiao))
                        {
                            value = "5";
                        }
                        else if (text == Language.StringByID(StringId.yanzhong))
                        {
                            value = "8";
                        }
                    }
                    break;
            }
            return value;
        }
    }
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -4,18 +4,40 @@
using HDL_ON.DAL.Server;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using HDL_ON.Entity;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public  class Send
    {
        /// <summary>
        /// 调用获取住宅子账号列表
        /// </summary>
        public static List<ResidenceMemberInfo> GetResidenceMemberAccount()
        {
            var responePack = new HttpServerRequest().GetResidenceMemberAccount();
            if (responePack.Code == StateCode.SUCCESS)
            {
                return Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString());
            }
            //失败
            else
            {
                //提示
                IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code);
            }
            return new List<ResidenceMemberInfo>();
        }
        /// <summary>
        /// 获取逻辑ID列表
        /// </summary>
        /// <returns></returns>
        public static ResponsePackNew GetLogicIdList() 
        {
            var jObject = new JObject { { "homeId", LogicMethod.HomeId } };
            var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId } };
            var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_List);
            //如果是token过期则刷新token
            if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
@@ -132,7 +154,7 @@
                var logicjArray = new JArray { };
                var logicIfon = new JObject { };
                logicIfon.Add("sid", logic.sid);
                logicIfon.Add("gatewayId", LogicMethod.GatewayId);
                logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
                logicIfon.Add("name", logic.name);
                logicIfon.Add("relation", logic.relation);
                logicIfon.Add("enable", logic.enable);
@@ -142,7 +164,7 @@
                logicIfon.Add("noticeConfig", noticeConfigJObject);
                logicIfon.Add("pushConfigs", pushConfigsArray);
                logicjArray.Add(logicIfon);
                var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
                var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } };
                responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add,5);
                //如果是token过期则刷新token
                if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
@@ -246,7 +268,7 @@
                var logicIfon = new JObject { };
                logicIfon.Add("userLogicId", logic.userLogicId);
                logicIfon.Add("sid", logic.sid);
                logicIfon.Add("gatewayId", LogicMethod.GatewayId);
                logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
                logicIfon.Add("name", logic.name);
                logicIfon.Add("relation", logic.relation);
                logicIfon.Add("enable", logic.enable);
@@ -257,7 +279,7 @@
                logicIfon.Add("pushConfigs", pushConfigsArray);
                logicjArray.Add(logicIfon);
                var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
                var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } };
                responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update,5);
                //如果是token过期则刷新token
                if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
@@ -118,7 +118,7 @@
                                loading.Hide();
                                if (responsePackNew != null && responsePackNew.Code == "0")
                                {
                                    LogicMethod.RemoveAllView();
                                    LogicMethod.CurrLogicMethod.RemoveAllView();
                                    Logic.LogicList.Remove(Logic.currlogic);
                                    MainView.MainShow();
                                    //发送删除逻辑命令;
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -387,6 +387,8 @@
                    if (edit)
                    {
                        //更新延时时间
                        outputDevice.delay = Logic.currlogic.output[index].delay;
                        //移除旧数据
                        Logic.currlogic.output.RemoveAt(index);
                        //新数据插入旧数据的位置;
@@ -408,7 +410,7 @@
                    this.RemoveFromParent();
                    return;
                }
                LogicMethod.RemoveAllView();
                LogicMethod.CurrLogicMethod.RemoveAllView();
                AddLogic addLogic = new AddLogic();
                MainPage.BasePageView.AddChidren(addLogic);
                addLogic.Show();
@@ -514,7 +516,7 @@
        private void GetEditState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4)
        {
            Output outputs = Logic.currlogic.output[index];
            var dicList = outputs.status as List<Dictionary<string, string>>;
            var dicList = outputs.status;
            //清除之前旧数据
            dicSateteList.Clear();
            if (dicList.Count != 0)
@@ -533,8 +535,8 @@
        {
            //数据封装
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.dictionary(dic, "key", KeyValue);
            LogicMethod.dictionary(dic, "value", selectedValue);
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", KeyValue);
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", selectedValue);
            AddDictionaryList(KeyValue, dic);
        }
        /// <summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
@@ -18,29 +18,7 @@
            topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
            this.AddChidren(topView.FLayoutView());
            topView.topNameBtn.Text = titelText;
            //获取宽度
            int widthValue = topView.topNameBtn.GetTextWidth();
            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
            Button locationBtn = new Button
            {
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealWidth(18),
                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
                Y = Application.GetRealHeight(34 + 1),
                UnSelectedImagePath = "LogicIcon/location.png",
            };
            topView.frameLayout.AddChidren(locationBtn);
            Button textBtn = new Button
            {
                Height = Application.GetRealHeight(14),
                Y = Application.GetRealHeight(57),
                TextSize = LogicView.TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                Text = "广东广州市番禺区石楼镇",
            };
            topView.frameLayout.AddChidren(textBtn);
            topView.Location();
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                RemoveFromParent();
@@ -244,13 +222,13 @@
        private void AddDic(string keyValue, string value, bool edit, int index)
        {
            Input inputTime = new Input();
            inputTime.sid = LogicMethod.NewSid();
            inputTime.sid = LogicMethod.CurrLogicMethod.NewSid();
            inputTime.condition_type = "1";
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.dictionary(dic, "key", keyValue);
            LogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.dictionary(dic, "value", value);
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", keyValue);
            LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", value);
            inputTime.condition.Add(dic);
            AddCondition(inputTime, edit, index);
        }
@@ -272,7 +250,7 @@
                //添加一个新的时间条件
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.RemoveAllView();
            LogicMethod.CurrLogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs
@@ -129,13 +129,13 @@
            timePointView.FLayoutView(fLayout);
            timePointView.TimePoint(fLayout, editTime, (timeValue)=>{
                Input inputTime = new Input();
                inputTime.sid = LogicMethod.NewSid();
                inputTime.sid = LogicMethod.CurrLogicMethod.NewSid();
                inputTime.condition_type = "1";
                Dictionary<string, string> dic = new Dictionary<string, string>();
                LogicMethod.dictionary(dic, "key", "timepoint");
                LogicMethod.dictionary(dic, "comparator", "=");
                LogicMethod.dictionary(dic, "data_type", "string");
                LogicMethod.dictionary(dic, "value", timeValue);
                LogicMethod.CurrLogicMethod.dictionary(dic, "key", "timepoint");
                LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
                LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
                LogicMethod.CurrLogicMethod.dictionary(dic, "value", timeValue);
                inputTime.condition.Add(dic);
                AddCondition(inputTime, edit, index);
            });
@@ -252,13 +252,13 @@
                }
                Input inputTime = new Input();
                inputTime.sid = LogicMethod.NewSid();
                inputTime.sid = LogicMethod.CurrLogicMethod.NewSid();
                inputTime.condition_type = "2";
                Dictionary<string, string> dic = new Dictionary<string, string>();
                LogicMethod.dictionary(dic, "key", "timesection");
                LogicMethod.dictionary(dic, "comparator", "=");
                LogicMethod.dictionary(dic, "data_type", "string");
                LogicMethod.dictionary(dic, "value", btnStartTimeText.Text + "-" + btnEndTimeText.Text);
                LogicMethod.CurrLogicMethod.dictionary(dic, "key", "timesection");
                LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
                LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
                LogicMethod.CurrLogicMethod.dictionary(dic, "value", btnStartTimeText.Text + "-" + btnEndTimeText.Text);
                inputTime.condition.Add(dic);
                AddCondition(inputTime, edit, index);
@@ -349,7 +349,7 @@
                //添加一个新的时间条件
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.RemoveAllView();
            LogicMethod.CurrLogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs
@@ -72,7 +72,14 @@
                weatherCondition.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            //空气质量
            kongqiViewk.btnClick.MouseUpEventHandler += (sen, e) => {
                AirQuality airQuality = new AirQuality();
                MainPage.BasePageView.AddChidren(airQuality);
                airQuality.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            #endregion
        }
    }
HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs
@@ -16,29 +16,7 @@
            topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
            this.AddChidren(topView.FLayoutView());
            topView.topNameBtn.TextID = StringId.selectionCondition;
            //获取宽度
            int widthValue = topView.topNameBtn.GetTextWidth();
            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
            Button locationBtn = new Button
            {
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealWidth(18),
                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
                Y = Application.GetRealHeight(34 + 1),
                UnSelectedImagePath = "LogicIcon/location.png",
            };
            topView.frameLayout.AddChidren(locationBtn);
            Button textBtn = new Button
            {
                Height = Application.GetRealHeight(14),
                Y = Application.GetRealHeight(57),
                TextSize = LogicView.TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                Text = "广东广州市番禺区石楼镇",
            };
            topView.frameLayout.AddChidren(textBtn);
            topView.Location();
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                RemoveFromParent();
@@ -100,13 +78,13 @@
        private void AddDic(string value)
        {
            Input input = new Input(); 
            input.sid = LogicMethod.NewSid();
            input.sid = LogicMethod.CurrLogicMethod.NewSid();
            input.condition_type = "6";
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.dictionary(dic, "key", "weather");
            LogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.dictionary(dic, "value", value);
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", "weather");
            LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", value);
            input.condition.Add(dic);
            AddCondition(input);
        }
@@ -140,7 +118,7 @@
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.RemoveAllView();
            LogicMethod.CurrLogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -1,5 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
@@ -21,8 +21,8 @@
        /// 场景内容显示区域
        /// </summary>
        FrameLayout floorChangeView;
        /// <summary>
        /// 楼层房间选择的下拉对象
        /// <summary>
        /// 楼层房间选择的下拉对象
        /// </summary>
        FloorRoomSelectPopupView floorRoomSelectView = null;
        Button btnSceneTilte;
@@ -136,9 +136,9 @@
            }
            btnAddIcon = new Button()
            {
                X = Application.GetRealWidth(337-20),
                Width = Application.GetMinRealAverage(28+30),
                Height = Application.GetMinRealAverage(28+29),
                X = Application.GetRealWidth(337 - 20),
                Width = Application.GetMinRealAverage(28 + 30),
                Height = Application.GetMinRealAverage(28 + 29),
            };
            //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
            {
@@ -189,7 +189,7 @@
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                X = Application.GetRealWidth(16),
               Gravity = Gravity.CenterVertical,
                Gravity = Gravity.CenterVertical,
                UnSelectedImagePath = "Public/DownIcon.png",
            };
            floorChangeView.AddChidren(btnFloorDownIcon);
@@ -199,7 +199,7 @@
            btnFloor = new Button()
            {
                X = btnFloorDownIcon.Right,
               Gravity = Gravity.CenterVertical,
                Gravity = Gravity.CenterVertical,
                Width = Application.GetRealWidth(200),
                Height = Application.GetMinRealAverage(16),
                TextColor = CSS_Color.FirstLevelTitleColor,
@@ -207,30 +207,30 @@
                TextAlignment = TextAlignment.CenterLeft,
                Text = DB_ResidenceData.Instance.CurFloor.roomName,
            };
            floorChangeView.AddChidren(btnFloor);
            string nowSelectId = null;
            btnFloor.MouseUpEventHandler += (sender, e) =>
            {
                if (this.floorRoomSelectView == null)
                {
                    //先初始化
                    this.floorRoomSelectView = new FloorRoomSelectPopupView();
                }
                //显示下拉列表
                this.floorRoomSelectView.ShowSceneView(btnFloor, (selectId, listScene) =>
                {
                    nowSelectId = selectId;
                    //重新刷新场景列表
                    this.LoadSceneFunctionControlZone(listScene);
                }, nowSelectId);
            floorChangeView.AddChidren(btnFloor);
            string nowSelectId = null;
            btnFloor.MouseUpEventHandler += (sender, e) =>
            {
                if (this.floorRoomSelectView == null)
                {
                    //先初始化
                    this.floorRoomSelectView = new FloorRoomSelectPopupView();
                }
                //显示下拉列表
                this.floorRoomSelectView.ShowSceneView(btnFloor, (selectId, listScene) =>
                {
                    nowSelectId = selectId;
                    //重新刷新场景列表
                    this.LoadSceneFunctionControlZone(listScene);
                }, nowSelectId);
            };
            #endregion
            sceneFunctionView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(53),
                Y = Application.GetRealHeight(53),
                Height = Application.GetRealHeight(667 - 64 - 49 - 52 + 30),
            };
            scenePageView.AddChidren(sceneFunctionView);
@@ -250,15 +250,15 @@
            {
                int index = 0;
                //获取能够显示的场景
                if (listScene == null)
                {
                    //初始值
                    if (this.floorRoomSelectView == null)
                    {
                        //先初始化
                        this.floorRoomSelectView = new FloorRoomSelectPopupView();
                    }
                    listScene = this.floorRoomSelectView.GetCanShowListScene();
                if (listScene == null)
                {
                    //初始值
                    if (this.floorRoomSelectView == null)
                    {
                        //先初始化
                        this.floorRoomSelectView = new FloorRoomSelectPopupView();
                    }
                    listScene = this.floorRoomSelectView.GetCanShowListScene();
                }
                foreach (var scene in listScene)
                {
@@ -413,11 +413,6 @@
                    IsSelected = scene.collect,
                };
                view.AddChidren(btnCollection);
                //2020-12-16 如果是成员隐藏收藏功能
                //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
                //{
                //    view.AddChidren(btnCollection);
                //}
                btnCollection.MouseUpEventHandler = (sender, e) => {
                    scene.collect = btnCollection.IsSelected = !btnCollection.IsSelected;
                    scene.CollectScene();
@@ -503,7 +498,7 @@
            contentPageView.AddChidren(automationPage);
            UI2.Intelligence.Automation.MainView.automationPage = automationPage;
            UI2.Intelligence.Automation.MainView.MainShow();
        }
        }
        #endregion
    }
@@ -606,7 +601,8 @@
                else
                {
                    //跳转到逻辑界面
                    UI2.Intelligence.Automation.MainView.SkipAddLogicPage();
                    UI2.Intelligence.Automation.MainView logicMainView = new UI2.Intelligence.Automation.MainView();
                    logicMainView.SkipAddLogicPage();
                }
            };
        }
@@ -615,7 +611,7 @@
        /// <summary>
        /// 加载场景控制事件
        /// </summary>
        void LoadEvent_ControlScene(Button btnCoverd, Button btnName, Button btnZone,Button btnShowDelay, Scene scene)
        void LoadEvent_ControlScene(Button btnCoverd, Button btnName, Button btnZone, Button btnShowDelay, Scene scene)
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs
@@ -105,6 +105,7 @@
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(603 - 50),
                //BackgroundColor = CSS_Color.DividingLineColor,
            };
            bodyView.AddChidren(contentView);
            contentView.AddChidren(new Button() { Height = Application.GetRealWidth(12) });
@@ -113,7 +114,7 @@
            {
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(252),
                Height = Application.GetRealWidth(188 + 24),
                Height = Application.GetRealWidth(184),
                Radius = (uint)Application.GetRealWidth(12),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
@@ -325,27 +326,28 @@
            functionListView = new VerticalScrolViewLayout()
            {
                Height = 0,
                Height = Application.GetRealHeight(228+48),
                BackgroundColor = CSS_Color.DividingLineColor,
                ScrollEnabled = false,
            };
            contentView.AddChidren(functionListView);
            LoadFunctionRow(functionListView);
            Button btnLine1 = new Button()
            {
                //Y = sceneDelayRow.Bottom,
                Height = Application.GetRealHeight(8),
                BackgroundColor = CSS_Color.DividingLineColor,
            };
            contentView.AddChidren(btnLine1);
            //Button btnLine1 = new Button()
            //{
            //    //Y = sceneDelayRow.Bottom,
            //    Height = Application.GetRealHeight(8),
            //};
            //contentView.AddChidren(btnLine1);
            Button btnLine2 = new Button()
            {
                //Y = sceneDelayRow.Bottom,
                Height = Application.GetRealHeight(228),
                BackgroundColor = CSS_Color.DividingLineColor,
            };
            contentView.AddChidren(btnLine2);
            //Button btnLine2 = new Button()
            //{
            //    //Y = sceneDelayRow.Bottom,
            //    Height = Application.GetRealHeight(228),
            //    BackgroundColor = CSS_Color.DividingLineColor,
            //};
            //contentView.AddChidren(btnLine2);
            #endregion
            Button btnBottomLine = new Button()
@@ -379,7 +381,10 @@
        void LoadFunctionRow(VerticalScrolViewLayout functionListView)
        {
            functionListView.RemoveAll();
            functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count);
            if (scene.functions.Count > 4)
            {
                functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count);
            }
            foreach (var scenefunction in scene.functions)
            {
                var row = new RowLayout()
@@ -482,7 +487,10 @@
                btnDelSceneFunction.MouseUpEventHandler = (sender, e) => {
                    scene.functions.Remove(scenefunction);
                    row.RemoveFromParent();
                    functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count);
                    if (scene.functions.Count > 4)
                    {
                        functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count);
                    }
                };
            }
        }
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
@@ -331,6 +331,7 @@
            functionListView = new VerticalScrolViewLayout() {
                Height = 0,
                ScrollEnabled  = false,
            };
            contentView.AddChidren(functionListView);
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs
@@ -170,11 +170,7 @@
            }
            foreach (var function in functions)
            {
                if (function.Spk_Prefix != FunctionCategory.Light &&
                    function.Spk_Prefix != FunctionCategory.AC &&
                    function.Spk_Prefix != FunctionCategory.FloorHeat &&
                    function.Spk_Prefix != FunctionCategory.Curtain
                    )
                if (!MainPage.SceneSupportFunctionList.Contains(function.spk))
                {
                    continue;
                }
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -49,6 +49,7 @@
                        LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.SetTemp));
                        break;
                    case FunctionAttributeKey.Mode:
                        LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Mode));
                        break;
                    case FunctionAttributeKey.FanSpeed:
@@ -206,15 +207,72 @@
            };
            row.AddChidren(btnRight);
            var showCode = "";
            if (sceneStatus.key == FunctionAttributeKey.Mode)
            {
                if (DB_ResidenceData.Instance.GatewayType == 0)
                {
                    if (SPK.AcSpkList().Contains(sceneFunction.localFunction.spk))
                    {
                        //0 制冷1制热,2通风,3自动,4除湿
                        switch (sceneStatus.value)
                        {
                            case "0":
                                showCode = "cool";
                                break;
                            case "1":
                                showCode = "heat";
                                break;
                            case "2":
                                showCode = "fan";
                                break;
                            case "3":
                                showCode = "auto";
                                break;
                            case "4":
                                showCode = "dry";
                                break;
                        }
                    }
                    else if (SPK.FhSpkList().Contains(sceneFunction.localFunction.spk))
                    {
                        //1:普通,2:白天,3:夜晚,4:离开,5:时间
                        switch (sceneStatus.value)
                        {
                            case "5":
                                showCode = "timer";
                                break;
                            case "1":
                                showCode = "normal";
                                break;
                            case "2":
                                showCode = "day";
                                break;
                            case "3":
                                showCode = "night";
                                break;
                            case "4":
                                showCode = "away";
                                break;
                        }
                    }
                }
            }
            var btnFunctionText = new Button()
            {
                Width = Application.GetRealWidth(330),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = sceneStatus.GetValueText() + sceneStatus.GetUintString()
                Text = sceneStatus.GetValueText(showCode) + sceneStatus.GetUintString()
            };
            row.AddChidren(btnFunctionText);
            if (sceneStatus.key == FunctionAttributeKey.OnOff)
            {
                btnOnText = btnFunctionText;
@@ -897,6 +955,65 @@
            var lastText = "";
            Dialog dialog = new Dialog();
            if(DB_ResidenceData.Instance.GatewayType == 0)
            {
                if (SPK.AcSpkList().Contains(sceneFunction.localFunction.spk))
                {
                    //0 制冷1制热,2通风,3自动,4除湿
                    for (int i = 0; i < statusList.Count; i++)
                    {
                        if (statusList[i] == "0")
                        {
                            statusList[i] = "cool";
                        }
                        else if (statusList[i] == "1")
                        {
                            statusList[i] = "heat";
                        }
                        else if (statusList[i] == "2")
                        {
                            statusList[i] = "fan";
                        }
                        else if (statusList[i] == "3")
                        {
                            statusList[i] = "auto";
                        }
                        else if (statusList[i] == "4")
                        {
                            statusList[i] = "dry";
                        }
                    }
                }
                else if (SPK.FhSpkList().Contains(sceneFunction.localFunction.spk))
                {
                    //1:普通,2:白天,3:夜晚,4:离开,5:时间
                    for (int i = 0; i < statusList.Count; i++)
                    {
                        if (statusList[i] == "5")
                        {
                            statusList[i] = "timer";
                        }
                        else if (statusList[i] == "1")
                        {
                            statusList[i] = "normal";
                        }
                        else if (statusList[i] == "2")
                        {
                            statusList[i] = "day";
                        }
                        else if (statusList[i] == "3")
                        {
                            statusList[i] = "night";
                        }
                        else if (statusList[i] == "4")
                        {
                            statusList[i] = "away";
                        }
                    }
                }
            }
            var pView = new FrameLayout()
            {
                BackgroundColor = CSS_Color.DialogTransparentColor1,
@@ -1003,7 +1120,7 @@
                    TextColor = CSS_Color.FirstLevelTitleColor,
                    TextSize = CSS_FontSize.TextFontSize,
                    Tag = m,
                    Text = trait.GetValueText()
                    Text = trait.GetValueText(m)
                };
                row.AddChidren(btnPropertyTitle);
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -102,10 +102,6 @@
            bool isFrist = true;
            foreach (var device in deviceList)
            {
                //if (!FunctionList.List.DeviceSpk.Contains(device.spk))
                //{
                //    continue;
                //}
                FrameLayout row = new FrameLayout()
                {
                    Height = Application.GetRealHeight(50),
@@ -164,7 +160,10 @@
                    switch (device.spk)
                    {
                        case SPK.IrModule:
                            new UI2.PersonalCenter.PirDevice.PirMethod().MainView(this, device,()=> {});
                            new UI2.PersonalCenter.PirDevice.PirMethod().MainView(this, device, () =>
                            {
                                contentView.BeginHeaderRefreshing();
                            });
                            break;
                        case SPK.SenesorMegahealth:
                            var smPage = new SenesorMegahealthManagerPage();
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
@@ -56,7 +56,7 @@
            FrameLayout frameLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64 + 84),
                Height = Application.GetRealHeight(667 - 64 - 84),
                Height = Application.GetRealHeight(667 - 64 - 84-104),
                Width = Application.GetRealWidth(TextSize.view375),
            };
            this.AddChidren(frameLayout);
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
@@ -82,7 +82,7 @@
            quyuPatchView.frameLayout.Y = namePatchView.frameLayout.Bottom;
            this.AddChidren(quyuPatchView.FLayoutView());
            quyuPatchView.btnText1.TextID = StringId.suoshuquyu;
            quyuPatchView.btnText2.Text = Intelligence.Automation.LogicMethod.GetGetRoomName(GetFunction(control.deviceId));
            quyuPatchView.btnText2.Text = Intelligence.Automation.LogicMethod.CurrLogicMethod.GetGetRoomName(GetFunction(control.deviceId));
            //继续添加
            Button addBtn = new Button
@@ -137,7 +137,7 @@
                method.ManagementPosition(GetFunction(control.deviceId), () =>
                {
                    //更新区域
                    quyuPatchView.btnText2.Text = Intelligence.Automation.LogicMethod.GetGetRoomName(GetFunction(control.deviceId));
                    quyuPatchView.btnText2.Text = Intelligence.Automation.LogicMethod.CurrLogicMethod.GetGetRoomName(GetFunction(control.deviceId));
                });
            };
            //继续添加点击事件
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/EditControl.cs
@@ -43,7 +43,7 @@
            //遥控器所属区域:
            FrameLayout50 areaFLayout = new FrameLayout50(); 
            areaFLayout.btnText.Text = Language.StringByID(StringId.yaokongqiquyu);
            areaFLayout.btnEditText.Text = Intelligence.Automation.LogicMethod.GetGetRoomName(control);
            areaFLayout.btnEditText.Text = Intelligence.Automation.LogicMethod.CurrLogicMethod.GetGetRoomName(control);
            areaFLayout.frameLayout.Y = editNameFLayout.frameLayout.Bottom;
            viewLayout.AddChidren(areaFLayout.FLayoutView());
            #endregion
@@ -77,7 +77,7 @@
                method.ManagementPosition(control, () =>
                {
                    //更新区域
                    areaFLayout.btnEditText.Text = Intelligence.Automation.LogicMethod.GetGetRoomName(control);
                    areaFLayout.btnEditText.Text = Intelligence.Automation.LogicMethod.CurrLogicMethod.GetGetRoomName(control);
                });
            };
            #endregion
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Matching.cs
@@ -323,9 +323,9 @@
                                    value = "on";
                                }
                                break;
                            case StringId.zhongsu:
                            case StringId.fengsuqiehuan:
                                {
                                    key = "middle";
                                    key = "speed";
                                    value = "";
                                }
                                break;
@@ -532,7 +532,7 @@
                                break;
                            case 2:
                                {
                                    textValue = StringId.zhongsu;
                                    textValue = StringId.fengsuqiehuan;
                                }
                                break;
                            case 3:
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -197,7 +197,7 @@
                //遥控器名称
                controlView.nameBtn.Text = control.name;
                //遥控器存放区域
                controlView.areaBtn.Text = Intelligence.Automation.LogicMethod.GetGetRoomName(control);
                controlView.areaBtn.Text = Intelligence.Automation.LogicMethod.CurrLogicMethod.GetGetRoomName(control);
                //标记遥控器
                controlView.delBtn.Tag = control;
                //删除点击事件
@@ -236,7 +236,7 @@
                    {
                        //回调更新名字/区域
                        controlView.nameBtn.Text = device.name;
                        controlView.areaBtn.Text = Intelligence.Automation.LogicMethod.GetGetRoomName(device);
                        controlView.areaBtn.Text = Intelligence.Automation.LogicMethod.CurrLogicMethod.GetGetRoomName(device);
                    });
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs
@@ -8,7 +8,6 @@
{
    public class PirMethod
    {
        /// <summary>
        /// 红外宝程序主入口
        /// </summary>
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
@@ -37,6 +37,7 @@
            }
        }
        /// <summary>
        /// 乐橙subAccessToken
        /// </summary>
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs
@@ -40,14 +40,19 @@
                        {
                            try
                            {
                                var oldName = floor.roomName;
                                floor.roomName = newName;
                                var editResult = SpatialInfo.CurrentSpatial.UpdateFloor(floor);
                                Application.RunOnMainThread(() =>
                                {
                                    if (editResult == DAL.Server.StateCode.SUCCESS)
                                    {
                                        floor.roomName = newName;
                                        btn.Text = newName;
                                    }
                                    else
                                    {
                                        floor.roomName = oldName;
                                    }
                                });
                            }
                            catch { }
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -196,8 +196,10 @@
                Height = Application.GetRealWidth(40),
                UnSelectedImagePath = "FunctionIcon/AC/SweepIconNullOn.png",
            };
            FrameWhiteCentet1.AddChidren(btnSwing);
            if (device.GetAttribute(FunctionAttributeKey.Swing) != null)
            {
                FrameWhiteCentet1.AddChidren(btnSwing);
            }
            btnWindSpeed = new Button()
@@ -327,8 +329,7 @@
                    btnModeIcon.IsSelected = btnModeText.IsSelected = true;
                    device.SetAttrState(FunctionAttributeKey.Mode, m);
                    btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(m);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    //btnMode.UnSelectedImagePath = btnModeIcon.UnSelectedImagePath;
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.Mode, m);
                    Control.Ins.SendWriteCommand(device, d);
                    dialog.Close();
@@ -594,8 +595,8 @@
                {
                    Gravity = Gravity.CenterHorizontal,
                    Y = Application.GetRealHeight(334 + 80),
                    Width = Application.GetRealWidth(30),
                    Height = Application.GetRealWidth(30),
                    Width = Application.GetRealWidth(35),
                    Height = Application.GetRealWidth(35),
                    UnSelectedImagePath = "FunctionIcon/AC/More.png",
                };
                FrameWhiteCentet1.AddChidren(btnMore);
HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs
@@ -31,7 +31,7 @@
            //初始化第一个索引页的内容
            this.InitFrameWhiteContent1();
            ;
        }
        /// <summary>
@@ -44,7 +44,7 @@
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(88),
                Width = Application.GetRealWidth(134),
                Height = Application.GetRealHeight(134),
                Height = Application.GetRealWidth(134),
                UnSelectedImagePath = "FunctionIcon/IrFan/FanIcon.png",
            };
            FrameWhiteCentet1.AddChidren(btnIcon);
@@ -184,7 +184,7 @@
            btnTitle = new Button()
            {
                Y = btnIcon.Bottom,
                Y = Application.GetRealWidth(28),
                Text = title,
                Height = Application.GetRealHeight(30),
                TextColor = CSS_Color.TextualColor,
HDL_ON/UI/UI2/FuntionControlView/Electrical/PjtPage.cs
@@ -47,7 +47,6 @@
        #endregion
        #region 区域变量
        //TV tvTemp = new TV();
        Function device;
        Button btnCollection_Out;
        Button btnFunctionName_Out;
@@ -323,8 +322,6 @@
            #endregion
            new TopViewDiv(bodyView, Language.StringByID(StringId.PJT)).LoadTopView_FunctionTop(device, actionRefresh);
            DriverLayer.Control.Ins.SendReadCommand(device);
            LoadEventList();
        }
@@ -345,8 +342,8 @@
            var bodyView = new FrameLayout()
            {
                Y = Application.GetRealHeight(427),//667
                Height = Application.GetRealHeight(240),
                Y = Application.GetRealHeight(417),//667
                Height = Application.GetRealHeight(250),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            div.AddChidren(bodyView);
@@ -356,6 +353,7 @@
                Y = Application.GetRealHeight(16),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(296 + 200),
                Height = Application.GetRealHeight(234),
            };
            bodyView.AddChidren(contentView);
@@ -505,9 +503,6 @@
            dialog.Show();
        }
        /// <summary>
        /// 加载事件列表
        /// </summary>
HDL_ON/UI/UI2/FuntionControlView/Electrical/StbPage.cs
@@ -46,7 +46,7 @@
        #endregion
        #region 区域变量
        Function function;
        Function device;
        Button btnCollection_Out;
        Button btnFunctionName_Out;
        Button btnFromFloor_Out;
@@ -59,7 +59,7 @@
        public StbPage(Function func)
        {
            bodyView = this;
            function = func;
            device = func;
        }
@@ -89,7 +89,7 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
                Text = function.name,
                Text = device.name,
            };
            controlView.AddChidren(btnFunctionName);
@@ -102,7 +102,7 @@
                TextColor = CSS_Color.PromptingColor1,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = function.GetRoomListName()
                Text = device.GetRoomListName()
            };
            controlView.AddChidren(btnFromFoorAndRoom);
@@ -114,7 +114,7 @@
                Height = Application.GetMinRealAverage(40),
                SelectedImagePath = "Collection/CollectionIcon.png",
                UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
                IsSelected = function.collect
                IsSelected = device.collect
            };
            controlView.AddChidren(btnCollection);
            //2020-12-16 如果是成员隐藏收藏功能
@@ -317,11 +317,14 @@
            {
                X = Application.GetRealWidth(116),
                Y = Application.GetRealHeight(466),
                Width = Application.GetRealWidth(32),
                Height = Application.GetRealWidth(32),
                Width = Application.GetRealWidth(35),
                Height = Application.GetRealWidth(35),
                UnSelectedImagePath = "FunctionIcon/AC/More.png",
            };
            controlView.AddChidren(btnMore);
            btnMore.MouseUpEventHandler = (sender, e) => {
                LoadDialog_IrMoreView();
            };
            btnPower = new Button()
            {
@@ -337,9 +340,7 @@
            LoadEventList();
            new TopViewDiv(bodyView, Language.StringByID(StringId.STB)).LoadTopView_FunctionTop(function, actionRefresh);
            DriverLayer.Control.Ins.SendReadCommand(function);
            new TopViewDiv(bodyView, Language.StringByID(StringId.STB)).LoadTopView_FunctionTop(device, actionRefresh);
        }
@@ -426,7 +427,7 @@
                    {
                        Dictionary<string, string> d = new Dictionary<string, string>();
                        d.Add($"number_{index}", "");
                        Control.Ins.SendWriteCommand(function, d);
                        Control.Ins.SendWriteCommand(device, d);
                    }
                };
                btn.MouseDownEventHandler = (sender, e) => {
@@ -449,9 +450,9 @@
            //回退刷新信息事件
            actionRefresh = () => {
                btnFunctionName.Text = btnFunctionName_Out.Text = function.name;
                btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
                function.UpdataFuncitonInfo();
                btnFunctionName.Text = btnFunctionName_Out.Text = device.name;
                btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = device.GetRoomListName();
                device.UpdataFuncitonInfo();
            };
        }
@@ -461,8 +462,8 @@
        void LoadCollectionEvent()
        {
            btnCollection.MouseUpEventHandler += (sender, e) => {
                btnCollection.IsSelected = function.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
                function.CollectFunction();
                btnCollection.IsSelected = device.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected;
                device.CollectFunction();
            };
        }
@@ -477,7 +478,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("av_tv", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnChlPlus.MouseUpEventHandler = (sender, e) =>
@@ -486,7 +487,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("ch+", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnChlReduce.MouseUpEventHandler = (sender, e) =>
@@ -495,7 +496,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("ch-", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnVolPlus.MouseUpEventHandler = (sender, e) =>
@@ -504,7 +505,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("volume+", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnVolReduce.MouseUpEventHandler = (sender, e) =>
@@ -513,7 +514,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("volume-", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnBack.MouseUpEventHandler = (sender, e) =>
@@ -522,7 +523,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("return", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
@@ -532,7 +533,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("menu", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btn123.MouseUpEventHandler = (sender, e) =>
@@ -545,7 +546,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("mute", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnPower.MouseUpEventHandler = (sender, e) =>
@@ -554,7 +555,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("on_off", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
@@ -581,7 +582,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("menu", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnTopMenuUp.MouseUpEventHandler = (sender, e) => {
@@ -590,7 +591,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("up", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnTopMenuLeft.MouseUpEventHandler = (sender, e) => {
@@ -599,7 +600,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("left", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnTopMenuRight.MouseUpEventHandler = (sender, e) => {
@@ -608,7 +609,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("right", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnTopMenuDown.MouseUpEventHandler = (sender, e) => {
@@ -617,7 +618,7 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("down", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
            btnOk.MouseUpEventHandler = (sender, e) => {
@@ -626,12 +627,189 @@
                {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add("ok", "");
                    Control.Ins.SendWriteCommand(function, d);
                    Control.Ins.SendWriteCommand(device, d);
                }
            };
        }
        /// <summary>
        /// 加载额外对红外按钮界面
        /// </summary>
        void LoadDialog_IrMoreView()
        {
            Dialog dialog = new Dialog();
            var div = new FrameLayout();
            dialog.AddChidren(div);
            div.MouseUpEventHandler = (sender, e) => {
                dialog.Close();
            };
            var bodyView = new FrameLayout()
            {
                Y = Application.GetRealHeight(417),//667
                Height = Application.GetRealHeight(250),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            div.AddChidren(bodyView);
            var contentView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(16),
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(296 + 200),
                Height = Application.GetRealHeight(234),
            };
            bodyView.AddChidren(contentView);
            var row = new FrameLayout()
            {
                Height = Application.GetRealHeight(60),
                Width = Application.GetRealWidth(296),
                Gravity = Gravity.CenterHorizontal,
            };
            contentView.AddChidren(row);
            int index = 0;
            List<FunctionAttributes> attrList = new List<FunctionAttributes>();
            attrList.AddRange(device.attributes);
            attrList.Add(new FunctionAttributes()
            {
                key = "+",
            });
            foreach (var attr in attrList)
            {
                if (attr.key == "up"
                    || attr.key == "down"
                    || attr.key == "right"
                    || attr.key == "left"
                    || attr.key == "zoom+"
                    || attr.key == "zoom-"
                    || attr.key == "volume+"
                    || attr.key == "volume-"
                    || attr.key == "back"
                    || attr.key == "menu"
                    || attr.key == FunctionAttributeKey.OnOff
                    )
                {
                    continue;
                }
                if (index != 0 && index % 3 == 0)
                {
                    row = new FrameLayout()
                    {
                        Height = Application.GetRealHeight(56),
                        Width = Application.GetRealWidth(296),
                        Gravity = Gravity.CenterHorizontal,
                    };
                    contentView.AddChidren(row);
                }
                if (attr.key == "+")
                {
                    var addView = new FrameLayout()
                    {
                        Gravity = Gravity.CenterVertical,
                        Width = Application.GetRealWidth(88),
                        Height = Application.GetRealHeight(40),
                        Radius = (uint)Application.GetRealHeight(18),
                        BorderColor = CSS_Color.PromptingColor1,
                        BorderWidth = (uint)Application.GetRealWidth(2),
                    };
                    if (index % 3 == 1)
                    {
                        addView.Gravity = Gravity.Center;
                    }
                    else if (index % 3 == 2)
                    {
                        addView.X = Application.GetRealWidth(208);
                    }
                    row.AddChidren(addView);
                    var btnAdd = new Button()
                    {
                        Gravity = Gravity.Center,
                        UnSelectedImagePath = "Public/PlusSignIcon.png",
                        Width = Application.GetRealWidth(32),
                        Height = Application.GetRealWidth(32),
                    };
                    addView.AddChidren(btnAdd);
                    btnAdd.MouseUpEventHandler = (sender, e) =>
                    {
                        dialog.Close();
                        Action action = () => {
                            LoadDialog_IrMoreView();
                        };
                        var addButton = new AcControlPage_AddIrButton(action);
                        MainPage.BasePageView.AddChidren(addButton);
                        addButton.Show(device);
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                    };
                }
                else
                {
                    var btn = new Button()
                    {
                        Gravity = Gravity.CenterVertical,
                        Width = Application.GetRealWidth(88),
                        Height = Application.GetRealHeight(40),
                        Radius = (uint)Application.GetRealHeight(18),
                        BorderColor = CSS_Color.PromptingColor1,
                        BorderWidth = (uint)Application.GetRealWidth(2),
                        TextAlignment = TextAlignment.Center,
                        TextSize = CSS_FontSize.TextFontSize,
                        TextColor = CSS_Color.FirstLevelTitleColor,
                        SelectedTextColor = CSS_Color.MainBackgroundColor,
                        SelectedBackgroundColor = CSS_Color.MainColor,
                    };
                    if (attr.value.Count > 0)
                    {
                        btn.Text = attr.value[0];
                    }
                    if (index % 3 == 1)
                    {
                        btn.Gravity = Gravity.Center;
                    }
                    else if (index % 3 == 2)
                    {
                        btn.X = Application.GetRealWidth(208);
                    }
                    row.AddChidren(btn);
                    btn.MouseUpEventHandler = (sender, e) =>
                    {
                        Dictionary<string, string> d = new Dictionary<string, string>();
                        d.Add(attr.key, "");
                        Control.Ins.SendWriteCommand(device, d);
                        new System.Threading.Thread(() =>
                        {
                            System.Threading.Thread.Sleep(2000);
                            Application.RunOnMainThread(() =>
                            {
                                btn.IsSelected = false;
                            });
                        })
                        { IsBackground = true }.Start();
                    };
                }
                index++;
            }
            dialog.Show();
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs
@@ -339,7 +339,6 @@
            LoadEventList();
            new TopViewDiv(bodyView, Language.StringByID(StringId.TV)).LoadTopView_FunctionTop(function, actionRefresh);
            DriverLayer.Control.Ins.SendReadCommand(function);
        }
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -271,8 +271,53 @@
            int index = 0;
            foreach (var sensor in FunctionList.List.GetEnvirSensorsList())
            {
                LoadSensorDiv(sensor, index);
                index++;
                if(sensor.spk == SPK.SensorEnvironment)
                {
                    foreach (var seTemp in sensor.attributes)
                    {
                        var newTemp = new Function()
                        {
                            name = sensor.name,
                            sid = sensor.sid,
                            deviceId = sensor.deviceId,
                            attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = seTemp.state, curValue = seTemp.curValue } },
                        };
                        switch (seTemp.key)
                        {
                            case "co2":
                                newTemp.spk = SPK.SensorCO2;
                                break;
                            case "pm25":
                                newTemp.spk = SPK.SensorPm25;
                                break;
                            case "humidity":
                                newTemp.spk = SPK.SensorHumidity;
                                break;
                            case "temperature":
                                newTemp.spk = SPK.SensorTemperature;
                                break;
                            case "tvoc":
                                newTemp.spk = SPK.SensorTVOC;
                                break;
                        }
                        LoadSensorDiv(newTemp, index);
                        index++;
                    }
                }
                else
                {
#if DEBUG
                    continue;
#endif
                    LoadSensorDiv(sensor, index);
                    index++;
                }
                new System.Threading.Thread(() =>
                {
                    Control.Ins.SendReadCommand(sensor);
                })
                { IsBackground = true }.Start();
            }
        }
@@ -283,10 +328,9 @@
        {
            var levelColorList = sensorTemp.GetLevelColorList(sensor.spk);
            var levelTextList = sensorTemp.GetLevelTextList(sensor.spk);
            if (room.roomId == "" || sensor.roomIds.Contains(room.roomId))
            {
                var sensorTag = sensor.sid;
                var sensorTag = sensor.spk + sensor.sid + sensor.deviceId;
                FrameLayout sensorView = new FrameLayout()
                {
                    X = Application.GetRealWidth(7),
@@ -411,12 +455,6 @@
                    #endregion
                };
                new System.Threading.Thread(() =>
                {
                    Control.Ins.SendReadCommand(sensor);
                })
                { IsBackground = true }.Start();
            }
        }
@@ -710,9 +748,45 @@
                {
                    if (bodyView != null)
                    {
                        if (updateTemp.spk == SPK.SensorEnvironment)
                        {
                            foreach (var seTemp in updateTemp.attributes)
                            {
                                var newTemp = new Function()
                                {
                                    name = updateTemp.name,
                                    sid = updateTemp.sid,
                                    deviceId = updateTemp.deviceId,
                                    attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = seTemp.state ,curValue = seTemp.curValue} },
                                };
                                switch (seTemp.key)
                                {
                                    case "co2":
                                        newTemp.spk = SPK.SensorCO2;
                                        break;
                                    case "pm25":
                                        newTemp.spk = SPK.SensorPm25;
                                        break;
                                    case "humidity":
                                        newTemp.spk = SPK.SensorHumidity;
                                        break;
                                    case "temperature":
                                        newTemp.spk = SPK.SensorTemperature;
                                        break;
                                    case "tvoc":
                                        newTemp.spk = SPK.SensorTVOC;
                                        break;
                                }
                                if(!string.IsNullOrEmpty(newTemp.spk))
                                {
                                    LoadEvent_UpdataStatus(newTemp);
                                }
                            }
                        }
                        for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++)
                        {
                            var sensorTag = updateTemp.sid;
                            var sensorTag = updateTemp.spk + updateTemp.sid + updateTemp.deviceId;
                            var view = bodyView.sensorListView.GetChildren(i);
                            if (view.GetType() == typeof(FrameLayout))
                            {