Tong
2021-08-31 57c036644fae5019385829edbd72be9a7e00fa7d
Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into jpush_tst
21个文件已修改
583 ■■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Sensor.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,43 +1,15 @@
<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI1-Login/LoginPage.cs">
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/MainPage.cs">
    <Files>
      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="830" Column="41" />
      <File FileName="HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs" />
      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="469" Column="16" />
      <File FileName="HDL-ON_iOS/Info.plist" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FaceSettingPage.cs" Line="1" Column="1" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" Line="206" Column="1" />
      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="2667" Column="87" />
      <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="665" Column="22" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" Line="837" Column="162" />
      <File FileName="HDL_ON/Entity/Function/Sensor.cs" Line="240" Column="39" />
      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="216" Column="55" />
      <File FileName="HDL_ON/UI/MainPage.cs" Line="28" Column="55" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="HDL_APP_Project" expanded="True">
            <Node name="HDL_ON" expanded="True">
              <Node name="DAL" expanded="True">
                <Node name="Server" expanded="True" />
              </Node>
              <Node name="Entity" expanded="True">
                <Node name="Function" expanded="True" />
              </Node>
              <Node name="UI" expanded="True">
                <Node name="UI1-Login" expanded="True">
                  <Node name="LoginPage.cs" selected="True" />
                </Node>
                <Node name="UI2" expanded="True">
                  <Node name="4-PersonalCenter" expanded="True" />
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="EnvironmentalScience" expanded="True" />
                  </Node>
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_iOS" expanded="True" />
            <Node name="HDL-ON_Android" expanded="True" selected="True" />
          </Node>
        </State>
      </Pad>
@@ -49,7 +21,7 @@
    <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
    <String>Shared.IOS/Shared.IOS.csproj</String>
  </DisabledProjects>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore>
@@ -58,10 +30,9 @@
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" line="747" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs" line="106" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" line="168" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs" line="71" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" line="468" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="467" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="524" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" line="461" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="481" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="541" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="314" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/DriverLayer/Control.cs" relfile="HDL_ON/DAL/DriverLayer/Control.cs" line="783" column="1" />
    </BreakpointStore>
HDL-ON_Android/Assets/Language.ini
@@ -494,6 +494,9 @@
506=Face input succeeded
507=Face input failed
508=Formaldehyde
509=Please enter security name.
510=Please select the deployment target.
 
1000=Room Humidity
1001=V-chip
@@ -955,9 +958,9 @@
7101=*Please set the value in this range (1 ~ 100).
7102=No set value.
7103=Excellent: 0 ~ 35ug/m3
7104=Good: 35 ~ 75ug/m3
7105=Light pollution: 75 ~ 115ug/m3
7106=Moderate pollution: 115 ~ 150ug/m3
7104=Good: 36 ~ 75ug/m3
7105=Light pollution: 76 ~ 115ug/m3
7106=Moderate pollution: 116 ~ 150ug/m3
7107=Heavy pollution: > 150ug/m3
7108=Leak/No Leak
7109=Leak
@@ -1002,6 +1005,8 @@
7148=Disarm
7149=Manually
7150=Smart
7151=Good
    
@@ -1605,6 +1610,10 @@
506=人脸录入成功
507=人脸录入失败
508=甲醛
509=请输入安防名称。
510=请选择布防目标。
 
1000=室内湿度
1001=童锁
@@ -2049,9 +2058,9 @@
7101=*请在这个范围(1~100)设置值。
7102=还没有设置值。
7103=优:0~35ug/m³
7104=良:35~75ug/m³
7105=轻度污染:75~115ug/m³
7106=中度污染:115~150ug/m³
7104=良:36~75ug/m³
7105=轻度污染:76~115ug/m³
7106=中度污染:116~150ug/m³
7107=重度污染:>150ug/m³
7108=泄漏/无泄漏
7109=泄漏
@@ -2096,6 +2105,8 @@
7148=撤防
7149=手动
7150=智能
7151=良好
 
9000=请使用新的手机账号登录APP
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="202108273" android:versionName="1.2.202108273" package="com.hdl.onpro">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202108301" android:versionName="1.2.202108301" package="com.hdl.onpro">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
    <!-- 乐橙可视对讲需要的权限 -->
    <!--<uses-permission android:name="android.permission.INTERNET" />-->
HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>CFBundleShortVersionString</key>
    <string>1.2.202108272</string>
    <string>1.2.202108301</string>
    <key>CFBundleVersion</key>
    <string>1.2.08272</string>
    <string>1.2.08301</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Use geographic location to provide services such as weather</string>
    <key>NSAppleMusicUsageDescription</key>
HDL-ON_iOS/Resources/Language.ini
@@ -494,6 +494,9 @@
506=Face input succeeded
507=Face input failed
508=Formaldehyde
509=Please enter security name.
510=Please select the deployment target.
 
1000=Room Humidity
1001=V-chip
@@ -955,9 +958,9 @@
7101=*Please set the value in this range (1 ~ 100).
7102=No set value.
7103=Excellent: 0 ~ 35ug/m3
7104=Good: 35 ~ 75ug/m3
7105=Light pollution: 75 ~ 115ug/m3
7106=Moderate pollution: 115 ~ 150ug/m3
7104=Good: 36 ~ 75ug/m3
7105=Light pollution: 76 ~ 115ug/m3
7106=Moderate pollution: 116 ~ 150ug/m3
7107=Heavy pollution: > 150ug/m3
7108=Leak/No Leak
7109=Leak
@@ -1002,6 +1005,8 @@
7148=Disarm
7149=Manually
7150=Smart
7151=Good
    
@@ -1605,6 +1610,10 @@
506=人脸录入成功
507=人脸录入失败
508=甲醛
509=请输入安防名称。
510=请选择布防目标。
 
1000=室内湿度
1001=童锁
@@ -2049,9 +2058,9 @@
7101=*请在这个范围(1~100)设置值。
7102=还没有设置值。
7103=优:0~35ug/m³
7104=良:35~75ug/m³
7105=轻度污染:75~115ug/m³
7106=中度污染:115~150ug/m³
7104=良:36~75ug/m³
7105=轻度污染:76~115ug/m³
7106=中度污染:116~150ug/m³
7107=重度污染:>150ug/m³
7108=泄漏/无泄漏
7109=泄漏
@@ -2096,6 +2105,8 @@
7148=撤防
7149=手动
7150=智能
7151=良好
 
9000=请使用新的手机账号登录APP
HDL_ON/Common/R.cs
@@ -4,6 +4,15 @@
{
    public static class StringId
    {
        /// <summary>
        ///
        /// </summary>
        public const int PleaseSelectTheDeploymentTarget = 510;
        /// <summary>
        /// 请输入安防名称
        /// </summary>
        public const int PleaseEnterSecurityName = 509;
        /// <summary>
        /// 甲醛
        /// </summary>
@@ -2403,15 +2412,15 @@
        /// </summary>
        public const int pmyou = 7103;
        /// <summary>
        /// 良:35~75ug/m³
        /// 良:36~75ug/m³
        /// </summary>
        public const int pmliang = 7104;
        /// <summary>
        /// 轻度污染:75~115ug/m³
        /// 轻度污染:76~115ug/m³
        /// </summary>
        public const int pmqingdu= 7105;
        /// <summary>
        /// 中度污染:115~150ug/m³
        /// 中度污染:116~150ug/m³
        /// </summary>
        public const int pmzhongdu = 7106;
        /// <summary>
@@ -2590,6 +2599,10 @@
        /// smart:智能
        /// </summary>
        public const int zhineng = 7150;
        /// <summary>
        /// 良好
        /// </summary>
        public const int lianghao = 7151;
HDL_ON/DAL/DriverLayer/Control.cs
@@ -772,7 +772,7 @@
                        {
                            Ins.GatewayId = device.device_mac;
                        }
                        reportIp = "239.0.168.188";// device.ip_address;//主播地址也能控制设备
                        reportIp = device.ip_address;//主播地址也能控制设备//"239.0.168.188";//
                    }
                }
                else if (receiveObj.Topic == CommunicationTopic.ct.ReadStatus + "_reply" ||
@@ -964,6 +964,7 @@
                                }
                                break;
                            case SPK.FloorHeatStandard:
                                localFunction.lastState = "";
                                switch (localFunction.GetAttrState(FunctionAttributeKey.Mode))
                                {
                                    case "normal":
HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,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>
HDL_ON/Entity/Function/Sensor.cs
@@ -81,10 +81,10 @@
                    _intervalValue.Add("33°C ~");
                    break;
                case SPK.SensorTVOC:
                    _intervalValue.Add("0 ~ 0.6");
                    _intervalValue.Add("0.61 ~ 2");
                    _intervalValue.Add("2.01 ~ 5");
                    _intervalValue.Add("5 ~");
                    _intervalValue.Add("0 ~ 600");
                    _intervalValue.Add("601 ~ 2000");
                    _intervalValue.Add("2001 ~ 5000");
                    _intervalValue.Add("5001 ~");
                    break;
                case SPK.SensorHumidity:
                    _intervalValue.Add("70 ~");
@@ -257,13 +257,13 @@
                        level = 7;
                    break;
                case SPK.SensorTVOC:
                    if (values < 0.6)
                    if (values < 600)
                        level = 1;
                    else if (values < 2)
                    else if (values < 2000)
                        level = 2;
                    else if (values < 5)
                    else if (values < 5000)
                        level = 3;
                    else if (values > 5)
                    else if (values >= 5000)
                        level = 4;
                    break;
                case SPK.SensorHumidity:
HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string VersionString = "1.2.0827";
        public static string VersionString = "1.2.0830";
        ///// <summary>
        ///// 客户端类型
        ///// </summary>
@@ -108,7 +108,7 @@
            SPK.AcIr,SPK.AcStandard,
            SPK.FloorHeatStandard,
            SPK.AirFreshStandard,
            SPK.AirSwitch,
        };
        /// <summary>
        /// 房间功能列表不加载的功能列表
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -210,7 +210,7 @@
                    //etAccount.Text = "18022428438";//wjc
                    //etAccount.Text = "13602944661";//kx
                    etAccount.Text = "13226233133";//豆豆
                    //etAccount.Text = "18316672920";
                    etAccount.Text = "18316672920";
                    //etAccount.Text = "18316120654";//tujie
                    //etAccount.Text = "15626203746";
                    //etAccount.Text = "13450425807";//黄竹溪 knx项目
@@ -232,7 +232,7 @@
                    //etAccount.Text = "15217626103";//昆明金茂项目
                    //etAccount.Text = "18598273624";
                    etAccount.Text = "fslcjm5@163.com";
                    etAccount.Text = "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
                    //etAccount.Text = "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
                }
                b = !b;
                etPassword.Text = "123456";
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -359,6 +359,21 @@
                        };
                    }
                    break;
                //甲醛
                case SPK.SensorHcho:
                    {
                        ///hcho
                        LogicView.FunTypeView hchoView = new LogicView.FunTypeView();
                        hchoView.btnText.TextID = StringId.tvoc;
                        fLayout.AddChidren(hchoView.FLayoutView());
                        ///hcho点击事件
                        hchoView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            PmCo2TvocAction(this, device, "hcho", StringId.Formaldehyde, index, edit);
                        };
                    }
                    break;
            }
            #region  保存
            ///保存View
@@ -608,7 +623,7 @@
        /// <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 = "")
        public void PmCo2TvocAction(FrameLayout frame, Entity.Function device, string key, int title, int index, bool edit, string stateValue = "")
        {
            if (edit)
            {
@@ -621,15 +636,30 @@
                    dicSateteList = inputs.condition;
                }
            }
            PublicInterface view = new PublicInterface();
            var listStr = view.GetViewList(key);
            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","in");
                   Save(device,index, edit);
                   selectedState = device.spk + "_" + key;
                   switch (device.spk)
                   {
                       case SPK.SensorTemperature:
                       case SPK.SensorHumidity:
                       case SPK.SensorCO2:
                       case SPK.SensorPm25:
                       case SPK.SensorTVOC:
                       case SPK.SensorHcho:
                           {
                               ///公司传感器key的健值是“value”;
                               key = "value";
                           }
                           break;
                   }
                   AddDictionary(key, value, "integer", "in");
                   Save(device, index, edit);
               });
        }
        /// <summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -381,34 +381,41 @@
                                case SPK.SensorTemperature:
                                    {
                                       
                                        string str =new InpOrOutLogicMethod { }.GetText(dicList);
                                        string str =new InpOrOutLogicMethod { }.GetText(dicList, "temperature");
                                        inputView.btnState.Text = str;
                                    }
                                    break;
                                case SPK.SensorHumidity:
                                    {
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList);
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList, "humidity");
                                        inputView.btnState.Text = str;
                                    }
                                    break;
                                case SPK.SensorCO2:
                                    {
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList);
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList, "co2");
                                        inputView.btnState.Text = str;
                                    }
                                    break;
                                case SPK.SensorPm25:
                                    {
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList);
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList, "pm25");
                                        inputView.btnState.Text = str;
                                    }
                                    break;
                                case SPK.SensorTVOC:
                                    {
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList);
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList, "tvoc");
                                        inputView.btnState.Text = str;
                                    }
                                    break;
                                case SPK.SensorHcho:
                                    {
                                        string str = new InpOrOutLogicMethod { }.GetText(dicList, "hcho");
                                        inputView.btnState.Text = str;
                                    }
@@ -651,11 +658,6 @@
                                if (device.spk == SPK.SensorEnvironment
                                || device.spk == SPK.SensorEnvironment2
                                || device.spk == SPK.SensorEnvironment3
                                || device.spk == SPK.SensorTemperature
                                || device.spk == SPK.SensorHumidity
                                || device.spk == SPK.SensorCO2
                                || device.spk == SPK.SensorPm25
                                || device.spk == SPK.SensorTVOC
                                )
                                {
                                    //这个设备比较特殊
@@ -708,7 +710,6 @@
                                            case "pm25":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "pm25", StringId.pm25, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "tvoc":
@@ -716,8 +717,49 @@
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "tvoc", StringId.tvoc, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "hcho":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "hcho", StringId.tvoc, indexVulae, true, stateValue);
                                                }
                                                break;
                                        }
                                    }
                                }
                                else if (device.spk == SPK.SensorTemperature)
                                {
                                   new InpOrOutLogicMethod().SensorView(thisView, device, "temperature", indexVulae);
                                }
                                else if ( device.spk == SPK.SensorHumidity)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "humidity", indexVulae);
                                }
                                else if (device.spk == SPK.SensorCO2)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "co2", indexVulae);
                                }
                                else if (device.spk == SPK.SensorPm25)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "pm25", indexVulae);
                                }
                                else if (device.spk == SPK.SensorTVOC)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "tvoc", indexVulae);
                                }
                                else if (device.spk == SPK.SensorHcho)
                                {
                                    new InpOrOutLogicMethod().SensorView(thisView, device, "hcho", indexVulae);
                                }
                                else
@@ -2096,12 +2138,11 @@
        /// </summary>
        /// <param name="dicList">状态数据列表</param>
        /// <returns></returns>
        private string GetText(List<Dictionary<string, string>> dicList)
        private string GetText(List<Dictionary<string, string>> dicList,string key)
        {
            string strtext = "";
            foreach (var dic in dicList)
            {
                string key = dic["key"];
                string value = dic["value"];
                string comparator = dic["comparator"];
                switch (key)
@@ -2148,11 +2189,80 @@
                            strtext = Language.StringByID(StringId.tvoc) + new PublicInterface { }.GetString("tvoc", value);
                        }
                        break;
                    case "hcho":
                        {
                            strtext = Language.StringByID(StringId.Formaldehyde) + new PublicInterface { }.GetString("hcho", value);
                        }
                        break;
                }
            }
            return strtext;
        }
        private void SensorView(FrameLayout thisView, Function device,string key, int indexVulae) {
            //这个设备比较特殊
            ConditionDeviceFunList conditionDeviceFunList = new ConditionDeviceFunList();
            ///当前的索引值数据对象
            Input inputedit = Logic.currlogic.input[indexVulae];
            ///状态值
            string stateValue = "";
            foreach (var dic in inputedit.condition)
            {
                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;
                    case "hcho":
                        {
                            conditionDeviceFunList.PmCo2TvocAction(thisView, device, "hcho", StringId.tvoc, indexVulae, true, stateValue);
                        }
                        break;
                }
            }
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -367,6 +367,7 @@
                case SPK.SensorCO2:
                case SPK.SensorPm25:
                case SPK.SensorTVOC:
                case SPK.SensorHcho:
                    {
                        strPath = "LogicIcon/sensor.png";
                    }
@@ -438,6 +439,7 @@
                    || device.spk == SPK.SensorCO2
                      || device.spk == SPK.SensorPm25
                        || device.spk == SPK.SensorTVOC
                          || device.spk == SPK.SensorHcho
            );
            if (sensor != null)
            {
@@ -500,6 +502,7 @@
                functionTypeList.Add(SPK.SensorCO2);
                functionTypeList.Add(SPK.SensorPm25);
                functionTypeList.Add(SPK.SensorTVOC);
                functionTypeList.Add(SPK.SensorHcho);
            }
@@ -546,6 +549,7 @@
                        deviceTypeList.Add(SPK.SensorCO2);
                        deviceTypeList.Add(SPK.SensorPm25);
                        deviceTypeList.Add(SPK.SensorTVOC);
                        deviceTypeList.Add(SPK.SensorHcho);
                    }
                    break;
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
@@ -719,6 +719,15 @@
                      };
                    }
                    break;
                case "hcho":
                    {
                        list = new List<string> {
             Language.StringByID(StringId.youxiu)+ ":(0~0.08mg/m3)",
             Language.StringByID(StringId.lianghao)+":(0.09~0.1mg/m3)",
             Language.StringByID(StringId.chaobiao)+ ":>(0.1mg/m3)",
                      };
                    }
                    break;
                case "security":
                    {
                        list = new List<string> {
@@ -930,71 +939,98 @@
        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);
                        switch (strValue) {
                            case "(0,35]": {
                                    text = Language.StringByID(StringId.pmyou);
                                }
                                break;
                            case "(36,75]": {
                                    text = Language.StringByID(StringId.pmliang);
                                } break;
                            case "(76,115]": {
                                    text = Language.StringByID(StringId.pmqingdu);
                                } break;
                            case "(116,150]": {
                                    text = Language.StringByID(StringId.pmzhongdu);
                                } break;
                            case "(150,100000]": {
                                    text = Language.StringByID(StringId.pmzhongduwuran);
                                } break;
                        }
                        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 <= 1000)
                        switch (strValue)
                        {
                            text = Language.StringByID(StringId.zhengchang)+ ":0~1000PPM";
                        }
                        else if (intValue > 1000 && intValue <= 2000)
                        {
                            text = Language.StringByID(StringId.piangao) + ":1001~2000PPM";
                        }
                        else if (intValue > 2000)
                        {
                            text = Language.StringByID(StringId.chaobiao) + ":>2000PPM";
                            case "(0,1000]":
                                {
                                    text = Language.StringByID(StringId.zhengchang) + ":0~1000PPM";
                                }
                                break;
                            case "(1001,2000]":
                                {
                                    text = Language.StringByID(StringId.piangao) + ":1001~2000PPM";
                                }
                                break;
                            case "(2000,200000]":
                                {
                                    text = Language.StringByID(StringId.chaobiao) + ":>2000PPM";
                                }
                                break;
                        }
                    }
                    break;
                case "tvoc":
                    {
                        switch (strValue)
                        {
                            case "(0,399]":
                                {
                                    text = Language.StringByID(StringId.zhengchang) + ":0~399PPB";
                                }
                                break;
                            case "(400,699]":
                                {
                                    text = Language.StringByID(StringId.chaobiao) + ":400~699PPB";
                                }
                                break;
                            case "(700,70000]":
                                {
                                    text = Language.StringByID(StringId.yanzhong) + ":>700PPB";
                                }
                                break;
                        }
                        if (intValue >=1 && intValue <= 3)
                    }
                    break;
                case "hcho":
                    {
                        switch (strValue)
                        {
                            text = Language.StringByID(StringId.zhengchang) + ":0~399PPB";
                            case "(0,0.08]":
                                {
                                    text = Language.StringByID(StringId.youxiu) + ":(0~0.08mg/m3)";
                                }
                                break;
                            case "(0.09,0.1]":
                                {
                                    text = Language.StringByID(StringId.lianghao) + ":(0.09~0.1mg/m3)";
                                }
                                break;
                            case "(0.1,10000]":
                                {
                                    text = Language.StringByID(StringId.chaobiao) + ":>(0.1mg/m3)";
                                }
                                break;
                        }
                        else if (intValue >=4 && intValue<=6)
                        {
                            text = Language.StringByID(StringId.chaobiao) + ":400~699PPB";
                        }
                        else if (intValue >= 7 && intValue <= 9)
                        {
                            text = Language.StringByID(StringId.yanzhong) + ":>700PPB";
                        }
                    }
                    break;
            }
@@ -1016,23 +1052,23 @@
                    {
                        if (text == Language.StringByID(StringId.pmyou))
                        {
                            value = "10";
                            value = "(0,35]";
                        }
                        else if (text == Language.StringByID(StringId.pmliang))
                        {
                            value = "50";
                            value = "(36,75]";
                        }
                        else if (text == Language.StringByID(StringId.pmqingdu))
                        {
                            value = "90";
                            value = "(76,115]";
                        }
                        else if (text == Language.StringByID(StringId.pmzhongdu))
                        {
                            value = "130";
                            value = "(116,150]";
                        }
                        else if (text == Language.StringByID(StringId.pmzhongduwuran))
                        {
                            value = "170";
                            value = "(150,100000]";
                        }
                    }
                    break;
@@ -1040,15 +1076,15 @@
                    {
                        if (text == Language.StringByID(StringId.zhengchang) + ":0~1000PPM")
                        {
                            value = "400";
                            value = "(0,1000]";
                        }
                        else if (text == Language.StringByID(StringId.piangao) + ":1001~2000PPM")
                        {
                            value = "1850";
                            value = "(1001,2000]";
                        }
                        else if (text == Language.StringByID(StringId.chaobiao) + ":>2000PPM")
                        {
                            value = "2200";
                            value = "(2000,200000]";
                        }
                    }
                    break;
@@ -1056,15 +1092,31 @@
                    {
                        if (text == Language.StringByID(StringId.zhengchang) + ":0~399PPB")
                        {
                            value = "2";
                            value = "(0,399]";
                        }
                        else if (text == Language.StringByID(StringId.chaobiao) + ":400~699PPB")
                        {
                            value = "5";
                            value = "(400,699]";
                        }
                        else if (text == Language.StringByID(StringId.yanzhong) + ":>700PPB")
                        {
                            value = "8";
                            value = "(700,70000]";
                        }
                    }
                    break;
                case "hcho":
                    {
                        if (text == Language.StringByID(StringId.youxiu) + ":(0~0.08mg/m3)")
                        {
                            value = "(0,0.08]";
                        }
                        else if (text == Language.StringByID(StringId.lianghao) + ":(0.09~0.1mg/m3)")
                        {
                            value = "(0.09,0.1]";
                        }
                        else if (text == Language.StringByID(StringId.chaobiao) + ":>(0.1mg/m3)")
                        {
                            value = "(0.1,10000]";
                        }
                    }
                    break;
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -280,6 +280,8 @@
                logicjArray.Add(logicIfon);
                var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } };
                string str = jObject.ToString();
                responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update,5);
                //如果是token过期则刷新token
                if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -438,7 +438,6 @@
                            }
                        case SPK.AcStandard:
                        case SPK.FloorHeatStandard:
                        case SPK.AirFreshStandard:
                            {
                                //做了一个特殊处理;
                                bool _bool = false;
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -110,7 +110,7 @@
            };
            FrameWhiteCentet1.AddChidren(arcBar);
            arcBar.ThumbImagePath = device.GetAttrState(FunctionAttributeKey.OnOff) == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png";
            arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off";
            arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min;
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
@@ -67,20 +67,6 @@
            btnFan.MouseUpEventHandler += (sender, e) =>
            {
                ShowFanSelectView();
                //return;
                //if ( !btnSwitch.IsSelected){return;}
                //var curFanSpeedIndex = fanSpeedList.IndexOf(device.GetAttrState(FunctionAttributeKey.FanSpeed));
                //var sendFanSpeedIndex = curFanSpeedIndex == fanSpeedList.Count - 1 ? 0 : 1+curFanSpeedIndex;
                //device.SetAttrState(FunctionAttributeKey.FanSpeed, fanSpeedList[sendFanSpeedIndex]);
                //new System.Threading.Thread(() =>
                //{
                //    Dictionary<string, string> d = new Dictionary<string, string>();
                //    d.Add(FunctionAttributeKey.FanSpeed, fanSpeedList[sendFanSpeedIndex]);
                //    Control.Ins.SendWriteCommand(device, d);
                //})
                //{ IsBackground = true }.Start();
                //RefreshFanSpeed();
            };
            //风速文本
            this.btnFanView = new NormalViewControl(this.FrameWhiteCentet1.Width / 3, Application.GetRealHeight(18), false);
@@ -208,41 +194,6 @@
                });
            }
            //if (fanAttr.value.Contains("low"))
            //{
            //    //1档
            //    var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low" ? "FunctionIcon/AirFresh/Fan1Select.png" : "FunctionIcon/AirFresh/Fan1.png";
            //    menuContr.AddRowMenu(Language.StringByID(StringId.FanOneGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low", () =>
            //    {
            //        frameBack.Close();
            //        //发送档位命令
            //        this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "low");
            //    });
            //}
            //if (fanAttr.value.Contains("medium"))
            //{
            //    //2档
            //    var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium" ? "FunctionIcon/AirFresh/Fan2Select.png" : "FunctionIcon/AirFresh/Fan2.png";
            //    menuContr.AddRowMenu(Language.StringByID(StringId.FanTwoGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium", () =>
            //    {
            //        frameBack.Close();
            //        //发送档位命令
            //        this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "medium");
            //    });
            //}
            //if (fanAttr.value.Contains("high"))
            //{
            //    //3档
            //    var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high" ? "FunctionIcon/AirFresh/Fan3Select.png" : "FunctionIcon/AirFresh/Fan3.png";
            //    menuContr.AddRowMenu(Language.StringByID(StringId.FanThreeGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high", () =>
            //    {
            //        frameBack.Close();
            //        //发送档位命令
            //        this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "high");
            //    });
            //}
        }
        #endregion
@@ -323,29 +274,14 @@
            HdlThreadLogic.Current.RunThread(() =>
            {
                //获取发送命令的样板(bus协议是需要一次性把全部命令一起发送的)
                var dic = this.GetSendComandSample();
                dic[comadKey] = comadValue;
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add(comadKey, comadValue);
                Control.Ins.SendWriteCommand(this.device, dic);
                HdlThreadLogic.Current.RunMain(() =>
                {
                    btnIcon.CanClick = true;
                });
            });
        }
        /// <summary>
        /// 获取发送命令的样板(bus协议是需要一次性把全部命令一起发送的)
        /// </summary>
        /// <returns></returns>
        private Dictionary<string, string> GetSendComandSample()
        {
            var dic = new Dictionary<string, string>();
            //开关
            dic[FunctionAttributeKey.OnOff] = this.device.GetAttrState(FunctionAttributeKey.OnOff);
            //风速
            dic[FunctionAttributeKey.FanSpeed] = this.device.GetAttrState(FunctionAttributeKey.FanSpeed);
            return dic;
        }
        #endregion
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs
@@ -190,7 +190,7 @@
                {
                    var tip = new Tip()
                    {
                        Text = "请输入安防名称",
                        Text = Language.StringByID(StringId.PleaseEnterSecurityName),// = "请输入安防名称",
                        CloseTime = 3,
                        Direction = AMPopTipDirection.None
                    };
@@ -202,7 +202,7 @@
                {
                    var tip = new Tip()
                    {
                        Text = "请选择布防目标",
                        Text = Language.StringByID(StringId.PleaseSelectTheDeploymentTarget),// "请选择布防目标",
                        CloseTime = 3,
                        Direction = AMPopTipDirection.None
                    };
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs
@@ -141,20 +141,13 @@
                BackgroundColor = CSS_Color.MainColor,
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.MainBackgroundColor,
                Text = "撤防",
                TextID = StringId.chefang,// = "撤防",
                Radius = (uint)Application.GetRealWidth(20),
                Gravity = Gravity.CenterHorizontal,
            };
            disarmView.AddChidren(btnDisarm);
            btnDisarm.MouseUpEventHandler = (sender, e) => {
                //foreach (var temp in FunctionList.List.securities)
                //{
                //    if (temp.status == "enable")
                //    {
                //        Control.Ins.ControlSecurity(temp, "disable");
                //        break;
                //    }
                //}
                if(InDefenseMode!= null)
                {
                    Control.Ins.ControlSecurity(InDefenseMode, "disable");