db1b76418c083e74fe16a65cddddf578de3d09cc..9189e6c3fa549717e95a4d29de890941197eee03
2021-04-20 wei
增加二次调试开关
9189e6 对比 | 目录
2021-04-19 wxr
Merge branch 'wxr4' into temp-wxr
bbcd6c 对比 | 目录
2021-04-19 wxr
合并温居城代码
39eb1c 对比 | 目录
2021-04-16 JLChen
2021-4-16-1
d26664 对比 | 目录
2021-04-07 JLChen
2021-4-7-1
fce62d 对比 | 目录
2个文件已添加
52个文件已修改
1 文件已重命名
1515 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/ApiUtlis.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/FileUtlis.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/OnAppConfig.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 176 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/DB_ResidenceData.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/SecurityAlarm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/FunctionList.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs 112 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Room.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Stan/Logic/HdlCloudReceiveLogic.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs 107 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPageBLL.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPageBLL.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,48 +1,18 @@
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.26569F89-0BA9-4C06-81F2-764A3AF2E1B7" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs">
<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/1-HomePage/HomePage.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs" Line="66" Column="1" />
      <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="367" Column="38" />
      <File FileName="HDL_ON/Entity/FunctionList.cs" Line="143" Column="31" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="565" Column="50" />
      <File FileName="HDL_ON/Entity/Enumerative/MyEnum.cs" Line="171" Column="9" />
      <File FileName="HDL_ON/Entity/Room.cs" Line="58" Column="23" />
      <File FileName="HDL_ON/UI/BindingResidence/BindingResidencePage.cs" Line="1" Column="1" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs" Line="1" Column="1" />
      <File FileName="HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs" Line="66" Column="22" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" Line="203" Column="92" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="165" Column="14" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs" Line="145" Column="60" />
      <File FileName="HDL_ON/Entity/DB_ResidenceData.cs" Line="29" Column="16" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="HDL_APP_Project" expanded="True">
            <Node name="HDL_ON" expanded="True">
              <Node name="Common" expanded="True" />
              <Node name="DAL" expanded="True">
                <Node name="Server" expanded="True" />
              </Node>
              <Node name="Entity" expanded="True">
                <Node name="Enumerative" expanded="True" />
                <Node name="Function" expanded="True" />
              </Node>
              <Node name="UI" expanded="True">
                <Node name="BindingResidence" expanded="True" />
                <Node name="UI2" expanded="True">
                  <Node name="1-HomePage" expanded="True">
                    <Node name="MessageCenterPage.cs" selected="True" />
                  </Node>
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="ArmCenter" expanded="True" />
                  </Node>
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_Android" expanded="True">
              <Node name="Assets" expanded="True" />
            </Node>
            <Node name="HDL-ON_iOS" expanded="True">
              <Node name="Other" expanded="True" />
              <Node name="Resources" expanded="True" />
            </Node>
            <Node name="HDL-ON_iOS" expanded="True" selected="True" />
          </Node>
        </State>
      </Pad>
@@ -54,8 +24,8 @@
    <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
    <String>Shared.IOS/Shared.IOS.csproj</String>
  </DisabledProjects>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" />
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore>
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" line="34" column="1" />
HDL-ON_Android/Assets/Language.ini
@@ -1564,6 +1564,16 @@
7120=防拆功能
7121=在线
7122=不在线
7123=空气质量
7124=优
7125=良
7126=差
7127=发送通知
7128=通知内容
7129=(100字内)
7130=账号选择
7131=App推送
9000=请使用新的手机账号登录APP
9001=请使用新的邮箱账号登录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="202104131" android:versionName="1.2.202104131" package="com.hdl.onpro">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202104191" android:versionName="1.2.202104191" package="com.hdl.onpro">
    <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" />
    <!--  可视对讲权限-->
    <uses-permission android:name="android.permission.CAMERA" />
HDL-ON_iOS/Info.plist
@@ -104,9 +104,9 @@
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>CFBundleShortVersionString</key>
    <string>1.2.202104131</string>
    <string>1.2.202104201</string>
    <key>CFBundleVersion</key>
    <string>202104131</string>
    <string>202104201</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Use geographic location to provide services such as weather</string>
    <key>NSAppleMusicUsageDescription</key>
HDL-ON_iOS/Resources/Language.ini
@@ -1564,6 +1564,15 @@
7120=防拆功能
7121=在线
7122=不在线
7123=空气质量
7124=优
7125=良
7126=差
7127=发送通知
7128=通知内容
7129=(100字内)
7130=账号选择
7131=App推送
9000=请使用新的手机账号登录APP
9001=请使用新的邮箱账号登录APP
HDL_ON/Common/ApiUtlis.cs
@@ -362,14 +362,14 @@
            var pack = Ins.HttpRequest.GetSecurityList();
            if (pack.Code == StateCode.SUCCESS)
            {
                var packList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Security>>(pack.Data.ToString());
                var packList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SecurityAlarm>>(pack.Data.ToString());
                var sidList = new List<string>();
                foreach (var function in packList)
                {
                    sidList.Add(function.sid);
                }
                var infoListPack = Ins.httpRequest.GetSecurityInfo(sidList, new List<string>());
                var infoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Security>>(infoListPack.Data.ToString());
                var infoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SecurityAlarm>>(infoListPack.Data.ToString());
                foreach (var function in infoList)
                {
                    function.SaveFile();
HDL_ON/Common/FileUtlis.cs
@@ -49,13 +49,13 @@
        {
            get
            {
                if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.RegionID == null)
                if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.id == null)
                {
                    return AccountPath;
                }
                if (string.IsNullOrEmpty(regionPath) || !regionPath.Contains(DB_ResidenceData.Instance.CurrentRegion.RegionID))
                if (string.IsNullOrEmpty(regionPath) || !regionPath.Contains(DB_ResidenceData.Instance.CurrentRegion.id))
                {
                    regionPath = Path.Combine(AccountPath, DB_ResidenceData.Instance.CurrentRegion.RegionID);
                    regionPath = Path.Combine(AccountPath, DB_ResidenceData.Instance.CurrentRegion.id);
                    if (!Directory.Exists(regionPath))
                    {
                        Directory.CreateDirectory(regionPath);
HDL_ON/Common/OnAppConfig.cs
@@ -75,7 +75,7 @@
        /// <summary>
        ///  账号注册服务器信息
        /// </summary>
        public string RequestHttpsHost = "https://china.hdlcontrol.com";
        public string RequestHttpsHost ="https://china.hdlcontrol.com";
        /// <summary>
        /// 
        /// </summary>
HDL_ON/Common/R.cs
@@ -1059,6 +1059,15 @@
        public const int fangchaigongneng = 7120;
        public const int zaixian = 7121;
        public const int buzaixian = 7122;
        public const int kongqizhiliang = 7123;
        public const int kongqiyou= 7124;
        public const int kongqiliang = 7125;
        public const int kongqicha = 7126;
        public const int fasongtongzhi = 7127;
        public const int tongzhineirong = 7128;
        public const int xianzhichangdu = 7129;
        public const int zhanghaoxuanze = 7130;
        public const int apptuisong = 7131;
        #region LE新增
        /// <summary>
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -189,38 +189,38 @@
                    };
                    var topicAlinkStatus = new MqttTopicFilter()
                    {
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/property/send",
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send",
                        QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
                    };
                    //App订阅红外宝 / 网关遥控器添加成功通知
                    var pirStatus = new MqttTopicFilter()
                    {
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found",
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found",
                        QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
                    };
                    //App订阅遥控器自学按键学习成功通知
                    var pirStudy = new MqttTopicFilter()
                    {
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/irCodeStudyDone/up",
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/irCodeStudyDone/up",
                        QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
                    };
                    #region 数据更新推送主题
                    //appHomeRefresh:住宅数据刷新通知
                    var appHomeRefresh = new MqttTopicFilter()
                    {
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appHomeRefresh/up",
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up",
                        QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
                    };
                    //appRoomRefresh:房间数据刷新通知
                    var appRoomRefresh = new MqttTopicFilter()
                    {
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appRoomRefresh/up",
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appRoomRefresh/up",
                        QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
                    };
                    //appDeviceRefresh:设备数据刷新通知
                    var appDeviceRefresh = new MqttTopicFilter()
                    {
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appDeviceRefresh/up",
                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up",
                        QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
                    };
                    #endregion
@@ -258,7 +258,7 @@
            {
                return;
            }
            if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.RegionID == null)
            if (DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.id == null)
            {
                return;
            }
@@ -326,14 +326,14 @@
                                    ReceiveNotifySqueezeAsync(mMes);
                                }
                                //App订阅红外宝/网关遥控器添加成功通知
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found")
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found")
                                {
                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
                                    var revString = Encoding.UTF8.GetString(bytes);
                                    HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.controldata = revString;
                                }
                                //App订阅遥控器自学按键学习成功通知
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/irCodeStudyDone/up")
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/irCodeStudyDone/up")
                                {
                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
                                    var revString = Encoding.UTF8.GetString(bytes);
@@ -341,13 +341,13 @@
                                }
                                #region 数据更新推送主题
                                //appHomeRefresh:住宅数据刷新通知
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appHomeRefresh/up")
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up")
                                {
                                    MainPage.Log("住宅数据刷新通知");
                                    new HttpServerRequest().GetHomePager();
                                }
                                //appRoomRefresh:房间数据刷新通知
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appRoomRefresh/up")
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appRoomRefresh/up")
                                {
                                    MainPage.Log("房间数据刷新通知");
                                    var roomResult = new HttpServerRequest().GetRoomList();
@@ -369,7 +369,7 @@
                                    }
                                }
                                //appDeviceRefresh:设备数据刷新通知
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/appDeviceRefresh/up")
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up")
                                {
                                    MainPage.Log("设备数据刷新通知");
                                    var deviceResult = new HttpServerRequest().GetDeviceList();
@@ -417,7 +417,7 @@
                                }
                                #endregion
                                //A网关设备状态-包含涂鸦设备
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/property/send")
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send")
                                {
                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
                                    var revString = Encoding.UTF8.GetString(bytes);
@@ -585,9 +585,9 @@
                    mqttEncryptKey = MqttInfoConfig.Current.HomeGatewayInfo.aesKey;
                    //解密密钥规则:已现有的住宅ID为基准,从右边一一获取值,最后如果不够16位,则往右补零
                    string aesKey = string.Empty;
                    for (int i = DB_ResidenceData.Instance.CurrentRegion.RegionID.Length - 1; i >= 0; i--)
                    for (int i = DB_ResidenceData.Instance.CurrentRegion.id.Length - 1; i >= 0; i--)
                    {
                        aesKey += DB_ResidenceData.Instance.CurrentRegion.RegionID[i].ToString();
                        aesKey += DB_ResidenceData.Instance.CurrentRegion.id[i].ToString();
                        if (aesKey.Length == 16) { break; }
                    }
                    aesKey = aesKey.PadRight(16, '0');
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -49,7 +49,7 @@
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("type", qType);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", new List<string>() { deviceId });
            d.Add("key", new List<string>() { deviceKey });
@@ -66,7 +66,7 @@
        public ResponsePackNew GetArmSensorHistory( string deviceId,string pageSize, string pageNo)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("pageSize", pageSize);
            d.Add("pageNo", pageNo);
@@ -465,33 +465,33 @@
            if (resultObj.Code == StateCode.SUCCESS)
            {
                UserInfo.Current.regionList = new List<RegionInfoRes>();
                var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoResNew>>(resultObj.Data.ToString());
                var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString());
                if (homeList == null || homeList.Count == 0)
                {
                }
                else
                {
                    foreach (var mHome in homeList)
                    foreach (var home in homeList)
                    {
                        var home = new RegionInfoRes()
                        {
                            RegionID = mHome.Id,
                            Name = mHome.homeName,
                            IsOthreShare = mHome.IsOtherShare,
                            accountType = mHome.accountType,
                            isRemoteControl = mHome.isRemoteControl,
                            isBindGateway = mHome.isBindGateway,
                            longitude = mHome.longitude,
                            latitude = mHome.latitude,
                            deliverstatus = mHome.deliverstatus,
                            homeType = mHome.homeType,
                            regionUrl = mHome.regionUrl,
                            emqUrl = mHome.emqUrl,
                            homeRegionName = mHome.homeRegionName,
                            homeRegionId = mHome.homeRegionId,
                            Address = mHome.homeAddress,
                            isAllowCreateScene = mHome.isAllowCreateScene,
                        };
                        //var home = new RegionInfoRes()
                        //{
                        //    RegionID = mHome.Id,
                        //    Name = mHome.homeName,
                        //    IsOthreShare = mHome.IsOtherShare,
                        //    accountType = mHome.accountType,
                        //    isRemoteControl = mHome.isRemoteControl,
                        //    isBindGateway = mHome.isBindGateway,
                        //    longitude = mHome.longitude,
                        //    latitude = mHome.latitude,
                        //    deliverstatus = mHome.deliverstatus,
                        //    homeType = mHome.homeType,
                        //    regionUrl = mHome.regionUrl,
                        //    emqUrl = mHome.emqUrl,
                        //    homeRegionName = mHome.homeRegionName,
                        //    homeRegionId = mHome.homeRegionId,
                        //    Address = mHome.homeAddress,
                        //    isAllowCreateScene = mHome.isAllowCreateScene,
                        //};
                        if (home.isBindGateway)
                        {
                            UserInfo.Current.regionList.Add(home);
@@ -502,7 +502,7 @@
                        return "null";
                    }
                    //-------如果账号是首次登录
                    if (DB_ResidenceData.Instance.CurrentRegion == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID))
                    if (DB_ResidenceData.Instance.CurrentRegion == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.id))
                    {
                        //刷新当前住宅
                        DB_ResidenceData.Instance.CurrentRegion = UserInfo.Current.regionList[0];
@@ -514,7 +514,7 @@
                    else
                    {
                        //住宅被删除
                        var findHome = UserInfo.Current.regionList.Find((obj) => obj.RegionID == DB_ResidenceData.Instance.CurrentRegion.RegionID);
                        var findHome = UserInfo.Current.regionList.Find((obj) => obj.id == DB_ResidenceData.Instance.CurrentRegion.id);
                        if (findHome == null)
                        {
                            Shared.Application.RunOnMainThread(() =>
@@ -556,7 +556,7 @@
        {
            var requestObj = new AddOrUpdateHomeObj()
            {
                homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID,
                homeId = DB_ResidenceData.Instance.CurrentRegion.id,
            };
            if (editId == 0)
@@ -579,14 +579,14 @@
        {
            try
            {
                if (string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) return "";
                var nowhomeId = DB_ResidenceData.Instance.CurrentRegion.RegionID;
                if (string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.id)) return "";
                var nowhomeId = DB_ResidenceData.Instance.CurrentRegion.id;
                var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = nowhomeId });
                var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_GetGatewayList, requestJson);
                if (revertObj.Code == StateCode.SUCCESS)
                {
                    var mHomeGatewayRes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<HomeGatewayInfo>>(revertObj.Data.ToString());
                    if (nowhomeId == DB_ResidenceData.Instance.CurrentRegion.RegionID)
                    if (nowhomeId == DB_ResidenceData.Instance.CurrentRegion.id)
                    {
                        if (mHomeGatewayRes != null)
                        {
@@ -622,7 +622,7 @@
            if (DB_ResidenceData.Instance.HomeGateway == null)
                return StateCode.NETWORK_ERROR;
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
            var jsonString = HttpUtil.GetSignRequestJson(d);
            var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGatewayInfo, jsonString);
@@ -643,7 +643,7 @@
        /// <returns></returns>
        public ResponsePackNew GetResidenceMemberAccount()
        {
            var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID });
            var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.id });
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_FindAll, requestJson);
        }
@@ -672,7 +672,7 @@
        {
            var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildNickNameObj()
            {
                homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID,
                homeId = DB_ResidenceData.Instance.CurrentRegion.id,
                childAccountId = childAccountId,
                nickName = nickName,
            });
@@ -689,7 +689,7 @@
        {
            var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildAllowCreateSceneObj()
            {
                homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID,
                homeId = DB_ResidenceData.Instance.CurrentRegion.id,
                childAccountId = childAccountId,
                isAllowCreateScene = isAllow,
            });
@@ -730,12 +730,13 @@
        {
            var requestJson = HttpUtil.GetSignRequestJson(new GetShareObj()
            {
                homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID,
                homeId = DB_ResidenceData.Instance.CurrentRegion.id,
                childAccountId = childAccountId,
            });
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Share_GetList, requestJson);
        }
        #endregion
        ///// <summary>
@@ -869,26 +870,27 @@
        public ResponsePackNew BindResidenceMemberAccount(string subAccount, string nickName)
        {
            //添加子账号
            var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, account = subAccount, nickName = nickName };
            var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.Instance.CurrentRegion.id, account = subAccount, nickName = nickName };
            var requestJson = HttpUtil.GetSignRequestJson(requestObj);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Add, requestJson);
        }
        ///// <summary>
        ///// 获取住宅下的成员账号信息
        ///// </summary>
        ///// <returns></returns>
        //public ResponsePack GetResidenceMemberAccountInfo(string account)
        //{
        //    Dictionary<string, object> d = new Dictionary<string, object>();
        //    d.Add("Account", account);
        //    string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d);
        //    return RequestHttps($"{severAddress}/ZigbeeUsers/GetSubAccountInfo", jsonString, true);
        //}
        /// <summary>
        /// 修改住宅调试权限
        /// </summary>
        /// <returns></returns>
        public ResponsePackNew ChangeResidenceDebugPerm(bool debugPerm)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("debugPerm", debugPerm);
            string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d);
            return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_Post_Home_UpdateDebugPerm, jsonString);
        }
        #endregion
        /// <summary>
@@ -1778,7 +1780,7 @@
        public ResponsePackNew GetDeviceList()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            //d.Add("gatewayId", DB_ResidenceData.residenceData.HomeGateway.gatewayId);
            //d.Add("roomId", DB_ResidenceData.residenceData.residecenInfo.RegionID);//可控参数,当需要分页获取,怎么知道分页总数
            //d.Add("searchType", DB_ResidenceData.residenceData.residecenInfo.RegionID);
@@ -1797,7 +1799,7 @@
        public ResponsePackNew Get3TyBrandBindDeviceList(string productPlatform, string productBrand)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("productPlatform", productPlatform);
            d.Add("productBrand", productBrand);
            d.Add("networkConfig", true);
@@ -1831,7 +1833,7 @@
        public ResponsePackNew GetDeviceInfo(string functionId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceIds", new List<string>() { functionId });
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -1845,7 +1847,7 @@
        public ResponsePackNew GetDeviceInfoList(List<string> functionIds)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceIds", functionIds);
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -1858,7 +1860,7 @@
        public ResponsePackNew RefreshDeviceStatus(List<string> functionIds)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceIds", functionIds);
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -1873,7 +1875,7 @@
        public ResponsePackNew ControlDevice(List<ApiAlinkControlActionObj> actionObjs)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway == null ? "0" : DB_ResidenceData.Instance.HomeGateway.gatewayId);//DriverLayer.Control.Ins.GatewayId);
            d.Add("actions", actionObjs);
@@ -1889,7 +1891,7 @@
        public ResponsePackNew UpdataDevcieInfo(Function function)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", function.deviceId);
            d.Add("name", function.name);
            d.Add("collect", function.collect);
@@ -1905,7 +1907,7 @@
        public ResponsePackNew UpdataDevcieBindRoomInfo(Function function)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", function.deviceId);
            d.Add("roomIds", function.roomIds);
@@ -1920,7 +1922,7 @@
        public ResponsePackNew BindDeviceToRoom(List<string> deviceIds,List<string> roomIds)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceIds", deviceIds);
            d.Add("roomIds", roomIds);
@@ -1933,7 +1935,7 @@
        public string UnbindDeviceToRoom(string deviceId, string roomId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceIds", new List<string>() { deviceId });
            d.Add("roomIds", new List<string>() { roomId });
@@ -1946,7 +1948,7 @@
        public string EditDeviceName(string deviceId, string deviceName)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("name", deviceName);
@@ -1959,7 +1961,7 @@
        public ResponsePackNew CollectDevice(string deviceId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceIds",new List<string>() { deviceId });
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -1971,7 +1973,7 @@
        public ResponsePackNew CancelCollectDevice(string deviceId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceIds", new List<string>() { deviceId });
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -1990,7 +1992,7 @@
        public ResponsePackNew GetSceneList(string roomId = null)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            if (roomId != null)
            {
                d.Add("roomId", roomId);
@@ -2034,7 +2036,7 @@
        public ResponsePackNew AddScene(Scene scene)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("scenes", new List<Scene>() { scene });
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2052,7 +2054,7 @@
        public ResponsePackNew EditScene(Scene scene)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("scenes", new List<Scene>() { scene });
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2065,7 +2067,7 @@
        public string DeleteScene(string userSceneId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("userSceneIds", new List<string>() { userSceneId });
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2078,7 +2080,7 @@
        public string ExecuteScene(string userSceneId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("userSceneIds", new List<string>() { userSceneId });
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2092,7 +2094,7 @@
        public string CollectScene(string userSceneId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("userSceneIds", new List<string>() { userSceneId });
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2106,7 +2108,7 @@
        public string CancelCollectScene(string userSceneId)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("userSceneIds", new List<string>() { userSceneId });
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2123,7 +2125,7 @@
        public ResponsePackNew GetRoomList(string GetType = "All")
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            if (GetType != "All")
            {
                d.Add("roomType", GetType);
@@ -2142,7 +2144,7 @@
        public ResponsePackNew AddRoom(List<SpatialInfo> rooms)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("rooms", rooms);
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2161,7 +2163,7 @@
        public ResponsePackNew UpdateRoom(List<SpatialInfo> rooms)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("rooms", rooms);
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2181,7 +2183,7 @@
        public ResponsePackNew DeleteRoom(List<string> roomIds)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("ids", roomIds);
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2199,7 +2201,7 @@
        public ResponsePackNew GetSecurityList()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_List, requestJson);
@@ -2214,7 +2216,7 @@
        public ResponsePackNew GetSecurityInfo(List<string> sidList, List<string> userSecurityIds)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
            //sids userSecurityIds 不能同时为空
            d.Add("sids", sidList);
@@ -2226,10 +2228,10 @@
        /// <summary>
        /// 添加安防
        /// </summary>
        public ResponsePackNew AddSecurity(List<Security> securities)
        public ResponsePackNew AddSecurity(List<SecurityAlarm> securities)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
            d.Add("securitys", securities);
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2239,10 +2241,10 @@
        /// <summary>
        /// 编辑安防
        /// </summary>
        public ResponsePackNew EditSecurity(List<Security> securities)
        public ResponsePackNew EditSecurity(List<SecurityAlarm> securities)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
            d.Add("securitys", securities);
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2258,7 +2260,7 @@
        public ResponsePackNew DeleteSecurity(List<string> sidList, List<string> userSecurityIds)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
            //sids userSecurityIds 不能同时为空
            d.Add("sids", sidList);
@@ -2276,7 +2278,7 @@
        public ResponsePackNew ReadSecurityStatus(List<string> sidList, List<string> userSecurityIds)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
            //sids userSecurityIds 不能同时为空
            d.Add("sids", sidList);
@@ -2291,7 +2293,7 @@
        public ResponsePackNew SetSecurityStatus(List<SecurityState> securityStates)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("securitys", securityStates);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_StatusSet, requestJson);
@@ -2304,7 +2306,7 @@
        public ResponsePackNew SetSecurityBypass(List<SecurityBypass> securityBypassStates)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("securitys", securityBypassStates);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_BypassSet, requestJson);
@@ -2319,7 +2321,7 @@
        public ResponsePackNew ReadSecurityBypass(List<string> sidList, List<string> userSecurityIds)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId);
            //sids userSecurityIds 不能同时为空
            d.Add("sids", sidList);
@@ -2334,7 +2336,7 @@
        public ResponsePackNew GetSecurityLogList(string pageSize,string pageNo)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("pageSize", pageSize);
            d.Add("pageNo", pageNo);
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2347,7 +2349,7 @@
        public ResponsePackNew GetSecurityAlarmLogList(string pageSize, string pageNo)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("pageSize", pageSize);
            d.Add("pageNo", pageNo);
            var requestJson = HttpUtil.GetSignRequestJson(d);
@@ -2376,7 +2378,7 @@
        public ResponsePackNew Get3tyBindBrandList()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetBindBrandList, requestJson);
@@ -2406,7 +2408,7 @@
        public ResponsePackNew CheckFlVideo()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            var requestJson = HttpUtil.GetSignRequestJson(d);
            var pack = HttpUtil.RequestHttpsPostFroHome( NewAPI.API_POST_FL_Check, requestJson);
            return pack;
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";
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        /// <summary>
        /// RegionMark
        /// </summary>
@@ -153,6 +153,8 @@
                {
                    urlHead = OnAppConfig.Instance.RequestHttpsHost;
                }
                //"https://bahrain-gateway.hdlcontrol.com";
                 urlHead="https://china-gateway.hdlcontrol.com";
                string requestFullUrl = urlHead + apiPath;
HDL_ON/DAL/Server/NewAPI.cs
@@ -103,6 +103,10 @@
        /// 住宅迁移
        /// </summary>
        public const string API_POST_Home_Transfer = "/home-wisdom/app/home/transfer";
        /// <summary>
        /// 更改住宅权限
        /// </summary>
        public const string API_Post_Home_UpdateDebugPerm = "/home-wisdom/app/home/updateDebugPerm";
        #endregion
        #region ■ 子账号 -- 添加住宅成员___________________________
HDL_ON/Entity/DB_ResidenceData.cs
@@ -30,7 +30,7 @@
            {
                if (MainPage.NoLoginMode)
                {
                    return new RegionInfoRes() { Name = "本地模式" };
                    return new RegionInfoRes() { homeName = "本地模式" };
                }
                else
                {
HDL_ON/Entity/Function/SecurityAlarm.cs
File was renamed from HDL_ON/Entity/Function/Security.cs
@@ -4,7 +4,7 @@
namespace HDL_ON.Entity
{
    public class Security
    public class SecurityAlarm
    {
        /// <summary>
        /// 安防sid
HDL_ON/Entity/FunctionList.cs
@@ -140,7 +140,7 @@
        /// <summary>
        /// 安防列表
        /// </summary>
        public List<Security> securities = new List<Security>();
        public List<SecurityAlarm> securities = new List<SecurityAlarm>();
        /// <summary>
        /// 加载功能列表
@@ -191,7 +191,7 @@
            {
                var dataBytes = FileUtlis.Files.ReadFile(filePath);
                var dataString = System.Text.Encoding.UTF8.GetString(dataBytes);
                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<Security>(dataString);
                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityAlarm>(dataString);
                if (temp == null)
                {
                    MainPage.Log("null");
HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
@@ -54,23 +54,19 @@
        /// <summary>
        /// 住宅ID
        /// </summary>
        public string RegionID { get; set; }
        public string id { get; set; }
        /// <summary>
        /// 住宅名称
        /// </summary>
        public string Name { get; set; }
        public string homeName { get; set; }
        /// <summary>
        /// 住宅地址
        /// </summary>
        public string Address { get; set; }
        public string homeAddress { get; set; }
        /// <summary>
        /// 是否为其他主用户分享过来的住宅
        /// </summary>
        public bool IsOthreShare = false;
        /// <summary>
        ///
        /// </summary>
        public List<HomeGateways> homeGateways = new List<HomeGateways>();
        //2020-11-13 新增
        /// <summary>
@@ -81,7 +77,7 @@
        /// <summary>
        /// 是否支持远程
        /// </summary>
        public bool isRemoteControl;
        public bool isRemoteControl;//??
        /// <summary>
        /// 经度
        /// </summary>
@@ -99,15 +95,11 @@
        /// </summary>
        public string homeType;
        /// <summary>
        ///
        /// </summary>
        public string createonutc;
        /// <summary>
        /// 区域服务器
        /// </summary>
        public string regionUrl;
        /// <summary>
        /// 区域服务器
        /// emq服务器
        /// </summary>
        public string emqUrl;
        /// <summary>
@@ -115,97 +107,21 @@
        /// </summary>
        public string homeRegionId;
        /// <summary>
        /// 住宅区域名字
        /// </summary>
        public string homeRegionName;
        /// <summary>
        /// 是否允许创建场景
        /// </summary>
        public bool isAllowCreateScene;
        public bool isAllowCreateScene;//??
        /// <summary>
        /// 是否绑定网关
        /// </summary>
        public bool isBindGateway;
        /// <summary>
        /// 调试人员ID
        /// </summary>
        public string debugStaffUserId;
        /// <summary>
        /// 调试权限是否打开
        /// </summary>
        public bool debugPerm;
    }
    /// <summary>
    /// 新云端住宅列表返回字段
    /// </summary>
    [Serializable]
    public class RegionInfoResNew
    {
        /// <summary>
        /// 住宅ID
        /// </summary>
        public string Id;
        /// <summary>
        /// 住宅名字
        /// </summary>
        public string homeName;
        /// <summary>
        /// 是否为其他主用户分享过来的住宅
        /// </summary>
        public bool IsOtherShare;
        /// <summary>
        /// 仅子账号登陆的时候使用,当【IsOthreShare】为"true",
        /// 子账户类型 1.ORDINARY 2.DEBUG 3.ADMIN
        /// </summary>
        public string accountType;
        /// <summary>
        /// 是否支持远程
        /// </summary>
        public bool isRemoteControl;
        /// <summary>
        /// 住宅空间结构Id
        /// </summary>
        public string structId;
        /// <summary>
        /// 经度
        /// </summary>
        public double longitude;
        /// <summary>
        /// 纬度
        /// </summary>
        public double latitude;
        /// <summary>
        /// 交付状态
        /// </summary>
        public string deliverstatus;
        /// <summary>
        /// 住宅类型 Zigbee, Buspro, A
        /// </summary>
        public string homeType;
        /// <summary>
        ///
        /// </summary>
        public string createonutc;
        /// <summary>
        /// 区域服务器
        /// </summary>
        public string regionUrl;
        /// <summary>
        /// 区域服务器
        /// </summary>
        public string emqUrl;
        /// <summary>
        /// 住宅区域Id
        /// </summary>
        public string homeRegionId;
        /// <summary>
        /// 住宅区域名字
        /// </summary>
        public string homeRegionName;
        /// <summary>
        /// 是否绑定网关
        /// </summary>
        public bool isBindGateway;
        /// <summary>
        /// 住宅地址
        /// </summary>
        public string homeAddress;
        /// <summary>
        /// 是否允许创建场景
        /// </summary>
        public bool isAllowCreateScene;
    }
}
HDL_ON/Entity/Room.cs
@@ -46,7 +46,7 @@
        public SpatialInfo(string spatialType)
        {
            roomType = "FLOOR";
            parentId = DB_ResidenceData.Instance.CurrentRegion.RegionID;
            parentId = DB_ResidenceData.Instance.CurrentRegion.id;
        }
        public string roomId = "";
HDL_ON/HDL_ON.projitems
@@ -397,8 +397,10 @@
    <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\Security.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\SecurityAlarm.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)DAL\" />
HDL_ON/UI/MainPage.cs
@@ -20,7 +20,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string VersionString = "1.2.0413";
        public static string VersionString = "1.2.0420";
        ///// <summary>
        ///// 客户端类型
        ///// </summary>
HDL_ON/UI/UI0-Stan/Logic/HdlCloudReceiveLogic.cs
@@ -59,7 +59,7 @@
        public bool CloudOverallMsgReceiveEx(string topic, byte[] byteData, string mqttEncryptKey, string homeIdEncryptKey)
        {
            //设备入网上报主题
            if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found")
            if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found")
            {
                if (string.IsNullOrEmpty(homeIdEncryptKey) == false)
                {
@@ -84,7 +84,7 @@
            if (ListCloudEvent.Count == 0) { return false; }
            //设备入网上报主题(目前只有红外宝)
            if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found")
            if (topic == $"/user/{Entity.DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/topo/found")
            {
                for (int i = 0; i < this.ListCloudEvent.Count; i++)
                {
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -199,15 +199,16 @@
                //return;
                if (b)
                {
                    etAccount.Text = "18316672920";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654";
                    etAccount.Text = "13226233133";//豆豆
                    //etAccount.Text = "18316672920";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654";
                    // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 
                }
                else
                {
                    //etAccount.Text = "BB01010101@evoyo.com";//可视对讲
                    //etAccount.Text = "13168123446";
                    //etAccount.Text = "13602944661";//kx
                    etAccount.Text = "18316120654";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374
                    etAccount.Text = "13602944661";//kx
                    //etAccount.Text = "18316120654";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374
                    //etAccount.Text = "15971583093";// gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 国外服务器测试
                }
                b = !b;
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -164,7 +164,7 @@
                    TextColor = CSS_Color.MainBackgroundColor,
                    TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
                    TextAlignment = TextAlignment.CenterLeft,
                    Text = DB_ResidenceData.Instance.CurrentRegion.Name,
                    Text = DB_ResidenceData.Instance.CurrentRegion.homeName,
                    IsBold = true
                };
                topView.AddChidren(btnResidenceName);
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
@@ -46,7 +46,7 @@
            shiwaiView.frameLayout.Y = functionView.frameLayout.Bottom;
            shiwaiView.btnText.TextID = StringId.shiwaibainhua;
            shiwaiView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png";
            //viewLayout.AddChidren(shiwaiView.FLayoutView());
            viewLayout.AddChidren(shiwaiView.FLayoutView());
            #endregion
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -111,26 +111,37 @@
            #region  执行推送 发送通知
            ///上下间隔12像素
            viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
            /////执行推送iew
            //LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView();
            //push.frameLayout.Height = Application.GetRealHeight(50);
            //push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            //push.btnText.TextID = StringId.push;
            //push.btnNextIcon.Width = Application.GetRealWidth(36);
            //push.btnNextIcon.Height = Application.GetRealWidth(36);
            //push.btnNextIcon.X = Application.GetRealWidth(305);
            //push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png";
            //push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png";
            //viewLayout.AddChidren(push.FLayoutView());
            /////发送通知View
            //LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView();
            //notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
            //notification.btnText.TextID = StringId.notification;
            //viewLayout.AddChidren(notification.FLayoutView());
            /////上下间隔62像素
            //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) });
            ///执行推送iew
            LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView();
            push.frameLayout.Height = Application.GetRealHeight(50);
            push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            push.btnText.TextID = StringId.push;
            push.btnNextIcon.Width = Application.GetRealWidth(36);
            push.btnNextIcon.Height = Application.GetRealWidth(36);
            push.btnNextIcon.X = Application.GetRealWidth(305);
            push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png";
            push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png";
            push.btnClick.Width = Application.GetRealWidth(305);
            viewLayout.AddChidren(push.FLayoutView());
            ///发送通知View
            LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView();
            notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
            notification.btnText.TextID = StringId.notification;
            notification.btnLine.BackgroundColor = CSS.CSS_Color.textWhiteColor;
            viewLayout.AddChidren(notification.FLayoutView());
            if (Logic.currlogic.pushConfigs.Count > 0)
            {
                push.btnNextIcon.IsSelected = true;
            }
            else
            {
                push.btnNextIcon.IsSelected = false;
            }
            ///上下间隔62像素
            viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) });
            #endregion
            #region  保存
            ///保存View
            LogicView.SaveView saveView = new LogicView.SaveView();
@@ -175,6 +186,63 @@
            cyclicTitle.btnClick.MouseUpEventHandler += (sender, e) =>
            {
                DateMethod(cyclicTitle.btnText);
            };
            ///是否要推送点击事件
            //初始化对象
            PushConfigs pushConfigs = new PushConfigs();
            if (Logic.currlogic.pushConfigs.Count > 0)
            {
                pushConfigs = Logic.currlogic.pushConfigs[0];
            }
            else
            {
                if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo))
                {
                    //默认推送当前账号
                    pushConfigs.pushTarget.Add(UserInfo.Current.userMobileInfo);
                }
                else
                {
                    //默认推送当前账号
                    pushConfigs.pushTarget.Add(UserInfo.Current.userEmailInfo);
                }
            }
            push.btnNextIcon.MouseUpEventHandler += (sender, e) =>
            {
               push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected;
                if (push.btnNextIcon.IsSelected)
                {
                    if (Logic.currlogic.pushConfigs.Count > 0)
                    {
                        //清空之前旧配置数据
                        Logic.currlogic.pushConfigs.Clear();
                    }
                    //增加配置数据
                    Logic.currlogic.pushConfigs.Add(pushConfigs);
                }
                else
                {
                    if (Logic.currlogic.pushConfigs.Count > 0)
                    {
                        //默认取第一个赋值
                        pushConfigs = Logic.currlogic.pushConfigs[0];
                        //清空配置数据
                        Logic.currlogic.pushConfigs.Clear();
                    }
                }
            };
            ///输入推送文本
            notification.btnClick.MouseUpEventHandler += (sender, e) =>
            {
                InputPushText inputPushText = new InputPushText();
                MainPage.BasePageView.AddChidren(inputPushText);
                inputPushText.Show(pushConfigs);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                inputPushText.action += (pushConfigsIfon) =>
                {
                    //赋值
                    pushConfigs = pushConfigsIfon;
                };
            };
            ///保存点击事件
            saveView.btnClick.MouseUpEventHandler += (sender, e) =>
@@ -460,7 +528,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/AirQuality.cs
New file
@@ -0,0 +1,132 @@
using System;
using System.Collections.Generic;
using Shared;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public class AirQuality : FrameLayout
    {
        public AirQuality()
        {
            Tag = "Logic";
        }
        public void Show()
        {
            #region  界面布局
            LogicView.TopView topView = new LogicView.TopView();
            topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
            this.AddChidren(topView.FLayoutView());
            topView.topNameBtn.TextID = StringId.selectionCondition;
            topView.Location();
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                RemoveFromParent();
            };
            FrameLayout viewLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64 + 20),
                Width = Application.GetRealWidth(LogicView.TextSize.view375),
                Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 20),
                BackgroundColor = CSS.CSS_Color.viewMiddle,
            };
            this.AddChidren(viewLayout);
            #endregion
            var list = new List<string> {
                Language.StringByID(StringId.kongqiyou),
                Language.StringByID(StringId.kongqiliang),
                Language.StringByID(StringId.kongqicha),
            };
            for (int i = 0; i < list.Count; i++)
            {
                LogicView.SelectTypeView view = new LogicView.SelectTypeView();
                view.frameLayout.Y = Application.GetRealHeight(i * 50);
                view.btnIcon.Visible = false;
                view.btnNextIcon.Visible = false;
                view.btnText.X = Application.GetRealWidth(16);
                view.btnLine.X = Application.GetRealWidth(16);
                view.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
                view.btnText.Text = list[i];
                view.btnClick.Tag = list[i];
                viewLayout.AddChidren(view.FLayoutView());
                view.btnClick.MouseUpEventHandler += (sen, e) =>
                {
                    string value = "";
                    string text = view.btnClick.Tag.ToString();
                    if (text == Language.StringByID(StringId.kongqiyou))
                    {
                        //优
                        value = "excellent";
                    }
                    else if (text == Language.StringByID(StringId.kongqiliang))
                    {
                        //良
                        value = "good";
                    }
                    else if (text == Language.StringByID(StringId.kongqicha))
                    {
                        //差
                        value = "poor";
                    }
                    AddDic(value);
                };
            }
        }
        /// <summary>
        /// 封装数据
        /// </summary>
        /// <param name="value"></param>
        private void AddDic(string value)
        {
            Input input = new Input();
            input.sid = LogicMethod.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);
            input.condition.Add(dic);
            AddCondition(input);
        }
        /// <summary>
        /// 添加条件
        /// </summary>
        /// <param name="input"></param>
        private void AddCondition(Input input)
        {
            ///记录索引值
            int index = -1;
            for (var i = 0; i < Logic.currlogic.input.Count; i++)
            {
                var condition_type = Logic.currlogic.input[i].condition_type;
                if (condition_type == "9")
                {
                    ///找到标记索引,退出循环体
                    index = i;
                    break;
                }
            }
            if (index != -1)
            {
                //移除旧数据
                Logic.currlogic.input.RemoveAt(index);
                //新数据插入旧数据的位置
                Logic.currlogic.input.Insert(index, input);
            }
            else
            {
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -391,6 +391,40 @@
                            }
                        }
                        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;
                }
                //再次编辑条件状态点击事件
@@ -549,6 +583,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;
                    }
                };
                ///删除控件
HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs
New file
@@ -0,0 +1,144 @@
using System;
using Shared;
using System.Collections.Generic;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public class InputPushText : FrameLayout
    {
        public InputPushText()
        {
            Tag = "Logic";
        }
        public  Action<PushConfigs> action;
        public void Show(PushConfigs pushConfigs)
        {
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
            LogicView.TopView topView = new LogicView.TopView();
            topView.topNameBtn.TextID = StringId.fasongtongzhi;
            this.AddChidren(topView.FLayoutView());
            FrameLayout viewLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64),
                Width = Application.GetRealWidth(LogicView.TextSize.view375),
                Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 76),
                BackgroundColor = CSS.CSS_Color.viewMiddle,
            };
            this.AddChidren(viewLayout);
            #region  通知内容
            LogicView.AddOutputInputTextView addInputTextView = new LogicView.AddOutputInputTextView();
            addInputTextView.btnIf.TextID = StringId.tongzhineirong;
            viewLayout.AddChidren(addInputTextView.FLayoutView(46, 12));
            ///输入推送文本
            EditTextView textBox = new EditTextView//EditText
            {
                Y = Application.GetRealHeight(42),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(152),
                TextAlignment = TextAlignment.TopLeft,
                Radius=(uint)Application.GetRealHeight(12),
                Text= pushConfigs.pushContent,
                TextSize = LogicView.TextSize.text14,
                TextColor= CSS.CSS_Color.textColor,
                PlaceholderText =Language.StringByID(StringId.xianzhichangdu),//"(100字以内)",
                PlaceholderTextColor = CSS.CSS_Color.textCancelColor,
                BackgroundColor = CSS.CSS_Color.textWhiteColor,
            };
            viewLayout.AddChidren(textBox);
            textBox.TextChangeEventHandler += (sender, e) =>
            {
                var leng = e.Length;
                if (leng > 100)
                {
                    textBox.Text = e.Substring(0,100);
#if __Android__
                    textBox.SetSelectionEnd();
#endif
                }
                pushConfigs.pushContent = textBox.Text.Trim();
            };
            #endregion
            #region  App推送
            LogicView.LogicTypeTitleView appPush = new LogicView.LogicTypeTitleView();
            appPush.frameLayout.Y = Application.GetRealHeight(206);
            appPush.frameLayout.Radius = (uint)Application.GetRealHeight(12);
            appPush.btnText.TextID = StringId.apptuisong;
            appPush.btnText.X = Application.GetRealWidth(12);
            viewLayout.AddChidren(appPush.FLayoutView());
            appPush.btnClick.MouseUpEventHandler += (sender, e) =>
            {
                //定义一个局部账号列表用来记录选中数据;
                List<string> accountList = new List<string>();
                Loading loading = new Loading();
                this.AddChidren(loading);
                loading.Start();
                new System.Threading.Thread(() =>
                {
                    try
                    {
                        var userList = Send.GetResidenceMemberAccount();
                        for (int i = 0; i < userList.Count; i++)
                        {
                            var user = userList[i];
                            accountList.Add(user.Account);
                        }
                    }
                    catch { }
                    finally
                    {
                        Application.RunOnMainThread(() =>
                        {
                            loading.Hide();
                            if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo))
                            {
                                //默认推送当前账号
                                accountList.Insert(0, UserInfo.Current.userMobileInfo);
                            }
                            else
                            {
                                //默认推送当前账号
                                accountList.Insert(0, UserInfo.Current.userEmailInfo);
                            }
                            PublicInterface view = new PublicInterface();
                            view.FrameOrVvList(this, accountList, pushConfigs.pushTarget, StringId.zhanghaoxuanze
                               , (list) =>
                               {
                                   pushConfigs.pushTarget = list;
                               });
                        });
                    }
                })
                { IsBackground = true }.Start();
            };
            #endregion
            #region  确认
            LogicView.SaveView saveView = new LogicView.SaveView();
            saveView.btnSave.TextID = StringId.queren;
            saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            this.AddChidren(saveView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                action(pushConfigs);
                RemoveFromParent();
            };
            saveView.btnClick.MouseUpEventHandler += (e, sen) =>
            {
                action(pushConfigs);
                RemoveFromParent();
            };
            #endregion
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
@@ -5,6 +5,7 @@
    /// <summary>
    /// 逻辑存储数据对象
    /// </summary>
    [Serializable]
    public class Logic
    {
@@ -48,12 +49,17 @@
        /// 逻辑输出目标数组
        /// </summary>
        public List<Output> output = new List<Output>();
        /// <summary>
        /// 推送配置
        /// </summary>
        public List<PushConfigs> pushConfigs = new List<PushConfigs>();
    }
    /// <summary>
    /// 执行周期对象
    /// </summary>
    [Serializable]
    public class Cycle
    {
        /// <summary>
@@ -66,6 +72,7 @@
    /// <summary>
    /// 输入条件对象
    /// </summary>
    [Serializable]
    public class Input
    {
        /// <summary>
@@ -85,10 +92,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>
@@ -104,7 +116,44 @@
        public string target_type = "";
        public List<Dictionary<string, string>> status = new List<Dictionary<string, string>>();
    }
    /// <summary>
    /// 地理围栏配置
    /// </summary>
    [Serializable]
    public class Fence
    {
        /// <summary>
        /// 经度
        /// </summary>
        public string longitude = string.Empty;
        /// <summary>
        /// 纬度
        /// </summary>
        public string latitude = string.Empty;
        /// <summary>
        /// 单位米
        /// </summary>
        public string radius = string.Empty;
    }
    /// <summary>
    /// 推送配置
    /// </summary>
    [Serializable]
    public class PushConfigs
    {
        /// <summary>
        /// 推送方式(APP/SMS)
        /// </summary>
        public string pushMethod = "APP";
        /// <summary>
        /// 推送内容
        /// </summary>
        public string pushContent = string.Empty;
        /// <summary>
        /// 推送目标
        /// </summary>
        public List<string> pushTarget = new List<string> {};
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -519,7 +519,7 @@
        {
            get
            {
                return Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID;
                return Entity.DB_ResidenceData.Instance.CurrentRegion.id;
            }
        }
        /// <summary>
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/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
@@ -123,7 +123,7 @@
        /// <summary>
        ///  按+跳转到逻辑界面的方法
        /// </summary>
        public static void SkipAddLogicPage()
        public void SkipAddLogicPage()
        {
            Logic.currlogic = new Logic();
            var addLogic = new AddLogic();
@@ -244,7 +244,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
@@ -478,12 +478,12 @@
            }
        }
    }
    class Date
    class LogicData
    {
        /// <summary>
        /// 云端唯一id
        /// </summary>
        public string userLogicId = "";
        public string userLogicId = "";
        /// <summary>
        /// 网关id
        /// </summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
@@ -388,6 +388,157 @@
        }
        /// <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>
        /// 获取界面列表
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -4,11 +4,33 @@
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>
@@ -105,6 +127,25 @@
                    outputArray.Add(outputTypeJOb);
                }
                var pushConfigsArray = new JArray { };
                if (logic.pushConfigs.Count > 0)
                {   // 推送文本
                    foreach (var pushConfig in logic.pushConfigs)
                    {
                        var pushConfigJob = new JObject { };
                        pushConfigJob.Add("pushMethod", pushConfig.pushMethod);
                        pushConfigJob.Add("pushContent", pushConfig.pushContent);
                        var accountArray = new JArray { };
                        foreach (var account in pushConfig.pushTarget)
                        {
                            accountArray.Add(account);
                        }
                        pushConfigJob.Add("pushTarget", accountArray);
                        pushConfigsArray.Add(pushConfigJob);
                    }
                }
                var logicjArray = new JArray { };
                var logicIfon = new JObject { };
                logicIfon.Add("sid", logic.sid);
@@ -115,6 +156,7 @@
                logicIfon.Add("cycle", cycleJObject);
                logicIfon.Add("input", inputArray);
                logicIfon.Add("output", outputArray);
                logicIfon.Add("pushConfigs", pushConfigsArray);
                logicjArray.Add(logicIfon);
                var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
                responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add);
@@ -192,6 +234,25 @@
                    outputArray.Add(outputTypeJOb);
                }
                var pushConfigsArray = new JArray { };
                if (logic.pushConfigs.Count > 0)
                {   // 推送文本
                    foreach (var pushConfig in logic.pushConfigs)
                    {
                        var pushConfigJob = new JObject { };
                        pushConfigJob.Add("pushMethod", pushConfig.pushMethod);
                        pushConfigJob.Add("pushContent", pushConfig.pushContent);
                        var accountArray = new JArray { };
                        foreach (var account in pushConfig.pushTarget)
                        {
                            accountArray.Add(account);
                        }
                        pushConfigJob.Add("pushTarget", accountArray);
                        pushConfigsArray.Add(pushConfigJob);
                    }
                }
                var logicjArray = new JArray { };
                var logicIfon = new JObject { };
                logicIfon.Add("userLogicId", logic.userLogicId);
@@ -203,6 +264,8 @@
                logicIfon.Add("cycle", cycleJObject);
                logicIfon.Add("input", inputArray);
                logicIfon.Add("output", outputArray);
                logicIfon.Add("pushConfigs", pushConfigsArray);
                logicjArray.Add(logicIfon);
                var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
                responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update);
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();
HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs
@@ -46,6 +46,15 @@
            weatherView.btnText.TextID = StringId.tianqibianhua;
            viewLayout.AddChidren(weatherView.FLayoutView());
            //空气质量
            LogicView.SelectTypeView kongqiViewk = new LogicView.SelectTypeView();
            kongqiViewk.frameLayout.Y = weatherView.frameLayout.Bottom;
            kongqiViewk.btnIcon.Visible = false;
            kongqiViewk.btnText.X = Application.GetRealWidth(16);
            kongqiViewk.btnLine.X = Application.GetRealWidth(16);
            kongqiViewk.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            kongqiViewk.btnText.TextID = StringId.kongqizhiliang;
            viewLayout.AddChidren(kongqiViewk.FLayoutView());
            #endregion
            #region  所有点击事件
@@ -64,7 +73,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();
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -606,7 +606,8 @@
                else
                {
                    //跳转到逻辑界面
                    UI2.Intelligence.Automation.MainView.SkipAddLogicPage();
                    UI2.Intelligence.Automation.MainView logicMainView = new UI2.Intelligence.Automation.MainView();
                    logicMainView.SkipAddLogicPage();
                }
            };
        }
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs
@@ -350,7 +350,7 @@
        private void RefreshMiniRemoteControlInfo(Action<Entity.Function> successEvent)
        {
            var pra = new Dictionary<string, object>();
            pra.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID);
            pra.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.id);
            pra.Add("spk", Entity.SPK.IrModule);
            var requestJson = DAL.Server.HttpUtil.GetSignRequestJson(pra);
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPageBLL.cs
@@ -79,7 +79,7 @@
                    var deleteShareObj = new DeleteShareObj()
                    {
                        shareDatas = funs_Del,
                        homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID,
                        homeId = DB_ResidenceData.Instance.CurrentRegion.id,
                    };
                    LoadMethod_DelSharedData(deleteShareObj);
@@ -101,7 +101,7 @@
                    {
                        shareDatas = funs_NeedAdd,
                        childAccountIds = childAccountIds,
                        homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID,
                        homeId = DB_ResidenceData.Instance.CurrentRegion.id,
                    };
                    result = LoadMethod_AddShareData(addShareObj);
@@ -247,7 +247,7 @@
            var addShareObj = new AddShareObj()
            {
                childAccountIds = childAccountIds,
                homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID,
                homeId = DB_ResidenceData.Instance.CurrentRegion.id,
                shareDatas = roomList
            };
            var responePack = new HttpServerRequest().AddShareData(addShareObj);
@@ -277,7 +277,7 @@
            var deleteShareObj = new DeleteShareObj()
            {
                shareDatas = roomList,
                homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID,
                homeId = DB_ResidenceData.Instance.CurrentRegion.id,
            };
            var responePack = new HttpServerRequest().DeleteShareData(deleteShareObj);
            if (responePack.Code != StateCode.SUCCESS)
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPageBLL.cs
@@ -176,7 +176,7 @@
                    var deleteShareObj = new DeleteShareObj()
                    {
                        shareDatas = funs_Del,
                        homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID,
                        homeId = DB_ResidenceData.Instance.CurrentRegion.id,
                    };
                    result = LoadMethod_DelSharedData(deleteShareObj);
@@ -251,7 +251,7 @@
            var deleteShareObj = new DeleteShareObj()
            {
                shareDatas = roomList,
                homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID,
                homeId = DB_ResidenceData.Instance.CurrentRegion.id,
            };
            var responePack = new HttpServerRequest().DeleteShareData(deleteShareObj);
            if (responePack.Code != StateCode.SUCCESS)
HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs
@@ -144,7 +144,7 @@
                    var resultObj = DAL.Server.HttpUtil.RequestHttpsPost(DAL.Server.NewAPI.API_POST_Gethomepager, requestJson);
                    if (resultObj.Code == DAL.Server.StateCode.SUCCESS)
                    {
                        var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoResNew>>(resultObj.Data.ToString());
                        var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString());
                        if (homeList == null || homeList.Count == 0)
                        {
                            //如果还没有住宅的话,继续下一次检测
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs
@@ -294,7 +294,7 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
                Text = DB_ResidenceData.Instance.CurrentRegion.Name,
                Text = DB_ResidenceData.Instance.CurrentRegion.homeName,
                IsBold = true
            };
            residenceInfoView.AddChidren(btnCurResidenceName);
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -139,11 +139,11 @@
                        TextAlignment = TextAlignment.CenterLeft,
                        TextColor = CSS.CSS_Color.FirstLevelTitleColor,
                        SelectedTextColor = CSS.CSS_Color.MainColor,
                        Text = home.Name,
                        TextSize = home.Name.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize,
                        IsSelected = DB_ResidenceData.Instance.CurrentRegion.RegionID == home.RegionID,
                        Text = home.homeName,
                        TextSize = home.homeName.Length > 14 ? CSS.CSS_FontSize.TextFontSize : CSS.CSS_FontSize.SubheadingFontSize,
                        IsSelected = DB_ResidenceData.Instance.CurrentRegion.id == home.id,
                        IsMoreLines = true,
                        Tag = home.RegionID
                        Tag = home.id
                    };
                    contentView.AddChidren(btnHomeName);
@@ -178,13 +178,13 @@
        /// <param name="homeTemp"></param>
        void LoadEvent_ChangeCurHome(RegionInfoRes homeTemp)
        {
            if (DB_ResidenceData.Instance.CurrentRegion.RegionID == homeTemp.RegionID)
            if (DB_ResidenceData.Instance.CurrentRegion.id == homeTemp.id)
            {
                return;
            }
            DB_ResidenceData.Instance.CurrentRegion = homeTemp;
            DB_ResidenceData.Instance.SaveResidenceData();
            btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.Name;
            btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.homeName;
            DB_ResidenceData.Instance.EixtAccount();
            //刷新住宅数据
            Common.ApiUtlis.Ins.DownloadData();
@@ -200,7 +200,7 @@
                {
                    Action updateResidenceName = () =>
                    {
                        btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.Name;
                        btnCurResidenceName.Text = DB_ResidenceData.Instance.CurrentRegion.homeName;
                    };
                    var residentialManagePage = new ResidentialManagePage(updateResidenceName);
                    MainPage.BasePageView.AddChidren(residentialManagePage);
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
@@ -33,7 +33,7 @@
        {
            get
            {
                return Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID;
                return Entity.DB_ResidenceData.Instance.CurrentRegion.id;
            }
        }
        /// <summary>
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/RoomBinglingFloorPage.cs
@@ -96,7 +96,7 @@
            {
                try
                {
                    var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.RegionID };
                    var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.id };
                    var addResult = SpatialInfo.CurrentSpatial.AddFloor(f, out f);
                    if (addResult == DAL.Server.StateCode.SUCCESS)
                    {
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs
@@ -132,7 +132,7 @@
                {
                    try
                    {
                        var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.RegionID };
                        var f = new SpatialInfo("FLOOR") { roomName = floorName, parentId = DB_ResidenceData.Instance.CurrentRegion.id };
                        var addResult = SpatialInfo.CurrentSpatial.AddFloor(f, out f);
                        if (addResult == DAL.Server.StateCode.SUCCESS)
                        {
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
@@ -52,12 +52,12 @@
        /// </summary>
        Button btnRoomManagementTitle;
        #region F3阶段
        /// <summary>
        /// 调试权限开关按钮
        /// </summary>
        //Button btnCommissioningAuthoritySwitchIcon;
        Button btnCommissioningAuthoritySwitchIcon;
        #region F3阶段
        #region 管理员权限迁移
        //FrameLayout administratorPermissionMigrationRow;
        //Button btnAdministratorPermissionMigrationTitle;
@@ -98,11 +98,17 @@
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(StringId.ResidenceManage)).LoadTopView();
            //new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.ResidenceManage));
            VerticalScrolViewLayout contentView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(667 - 64),
                ScrollEnabled = false,
            };
            bodyView.AddChidren(contentView);
            #region 住宅名称
            FrameLayout residenceNameRow;
@@ -112,7 +118,7 @@
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(residenceNameRow);
            contentView.AddChidren(residenceNameRow);
            Button btnResidenceNameTitle = new Button()
            {
                X = Application.GetRealWidth(16),
@@ -128,7 +134,7 @@
            {
                X = Application.GetRealWidth(2) + btnResidenceNameTitle.Right,
                Width = Application.GetRealWidth(200),
                Text = DB_ResidenceData.Instance.CurrentRegion.Name,
                Text = DB_ResidenceData.Instance.CurrentRegion.homeName,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.TextualColor,
@@ -162,7 +168,7 @@
                            Height = Application.GetRealHeight(50),
                            BackgroundColor = CSS_Color.MainBackgroundColor,
                        };
                        bodyView.AddChidren(residenceAddressRow);
                        contentView.AddChidren(residenceAddressRow);
                        var btnResidenceAddressTitle = new Button()
                        {
@@ -189,7 +195,7 @@
                        {
                            X = Application.GetRealWidth(2) + btnResidenceNameTitle.Right,
                            Width = Application.GetRealWidth(200),
                            Text = DB_ResidenceData.Instance.CurrentRegion.Address,
                            Text = DB_ResidenceData.Instance.CurrentRegion.homeAddress,
                            TextSize = CSS_FontSize.TextFontSize,
                            TextAlignment = TextAlignment.CenterLeft,
                            TextColor = CSS_Color.TextualColor,
@@ -197,13 +203,14 @@
                        residenceAddressRow.AddChidren(btnResidenceAddress);
            #endregion
            #region 楼层管理
            contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
            floorManagementRow = new FrameLayout()
            {
                Y = Application.GetRealHeight(8) + residenceNameRow.Bottom,// residenceAddressRow.Bottom,
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(floorManagementRow);
            contentView.AddChidren(floorManagementRow);
            btnFloorManagementTitle = new Button()
            {
@@ -244,7 +251,7 @@
                Height = Application.GetRealHeight(50),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(roomManagementRow);
            contentView.AddChidren(roomManagementRow);
            btnRoomManagementTitle = new Button()
            {
@@ -271,13 +278,13 @@
            #region F3阶段
            #region 管理员权限迁移
            //contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
            //administratorPermissionMigrationRow = new FrameLayout()
            //{
            //    Y = Application.GetRealHeight(8) + roomManagementRow.Bottom,
            //    Height = Application.GetRealHeight(65),
            //    BackgroundColor = CSS_Color.MainBackgroundColor,
            //};
            //bodyView.AddChidren(administratorPermissionMigrationRow);
            //contentView.AddChidren(administratorPermissionMigrationRow);
            //btnAdministratorPermissionMigrationTitle = new Button()
            //{
@@ -336,7 +343,7 @@
            //    Height = Application.GetRealHeight(65),
            //    BackgroundColor = CSS_Color.MainBackgroundColor,
            //};
            //bodyView.AddChidren(transferRow);
            //contentView.AddChidren(transferRow);
            //btnTransferTitle = new Button()
            //{
@@ -376,55 +383,66 @@
            #endregion
            #endregion
            #region F3阶段
            #region 调试权限
            //FrameLayout commissioningAuthorityRow;
            //commissioningAuthorityRow = new FrameLayout()
            //{
            //    Y = Application.GetRealHeight(8) + transferRow.Bottom,
            //    Height = Application.GetRealHeight(65),
            //    BackgroundColor = CSS_Color.MainBackgroundColor,
            //};
            //bodyView.AddChidren(commissioningAuthorityRow);
            contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) });
            FrameLayout commissioningAuthorityRow;
            commissioningAuthorityRow = new FrameLayout()
            {
                Height = Application.GetRealHeight(65),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(commissioningAuthorityRow);
            //var btnCommissioningAuthorityTitle = new Button()
            //{
            //    X = Application.GetRealWidth(16),
            //    Y = Application.GetRealHeight(10),
            //    Width = Application.GetRealWidth(308),
            //    Height = Application.GetRealHeight(24),
            //    TextID = StringId.CommissioningAuthority,
            //    TextAlignment = TextAlignment.CenterLeft,
            //    TextSize = CSS_FontSize.SubheadingFontSize,
            //    TextColor = CSS_Color.FirstLevelTitleColor,
            //};
            //commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityTitle);
            var btnCommissioningAuthorityTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(10),
                Width = Application.GetRealWidth(308),
                Height = Application.GetRealHeight(24),
                TextID = StringId.CommissioningAuthority,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
            };
            commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityTitle);
            //var btnCommissioningAuthorityExplan = new Button()
            //{
            //    X = Application.GetRealWidth(16),
            //    Y = btnCommissioningAuthorityTitle.Bottom,
            //    Width = Application.GetRealWidth(308),
            //    Height = Application.GetRealHeight(21),
            //    TextID = StringId.CommissioningAuthorityExPlan,
            //    TextAlignment = TextAlignment.CenterLeft,
            //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            //    TextColor = CSS_Color.PromptingColor1,
            //};
            //commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityExplan);
            var btnCommissioningAuthorityExplan = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = btnCommissioningAuthorityTitle.Bottom,
                Width = Application.GetRealWidth(308),
                Height = Application.GetRealHeight(21),
                TextID = StringId.CommissioningAuthorityExPlan,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                TextColor = CSS_Color.PromptingColor1,
            };
            commissioningAuthorityRow.AddChidren(btnCommissioningAuthorityExplan);
            //btnCommissioningAuthoritySwitchIcon = new Button()
            //{
            //    X = Application.GetRealWidth(314),
            //    Gravity = Gravity.CenterVertical,
            //    Width = Application.GetMinRealAverage(48),
            //    Height = Application.GetMinRealAverage(36),
            //    UnSelectedImagePath = "Public/Switch.png",
            //    SelectedImagePath = "Public/SwitchOn.png",
            //};
            //commissioningAuthorityRow.AddChidren(btnCommissioningAuthoritySwitchIcon);
            #endregion
            btnCommissioningAuthoritySwitchIcon = new Button()
            {
                X = Application.GetRealWidth(314),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(48),
                Height = Application.GetMinRealAverage(36),
                UnSelectedImagePath = "Public/Switch.png",
                SelectedImagePath = "Public/SwitchOn.png",
                IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm
            };
            commissioningAuthorityRow.AddChidren(btnCommissioningAuthoritySwitchIcon);
            btnCommissioningAuthoritySwitchIcon.MouseUpEventHandler = (sender, e) => {
                DB_ResidenceData.Instance.CurrentRegion.debugPerm = !DB_ResidenceData.Instance.CurrentRegion.debugPerm;
                btnCommissioningAuthoritySwitchIcon.IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm;
                new System.Threading.Thread(() =>
                {
                    new DAL.Server.HttpServerRequest().ChangeResidenceDebugPerm(DB_ResidenceData.Instance.CurrentRegion.debugPerm);
                })
                { IsBackground = true }.Start();
            };
            #endregion
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs
@@ -56,7 +56,7 @@
                                    btnResidenceName.Text = str;
                                    upateResidenceName();
                                });
                                DB_ResidenceData.Instance.CurrentRegion.Name = str;
                                DB_ResidenceData.Instance.CurrentRegion.homeName = str;
                                DB_ResidenceData.Instance.SaveResidenceData();
                            }
                            else
@@ -83,7 +83,7 @@
                    })
                    { IsBackground = true }.Start();
                };
                new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceName, DB_ResidenceData.Instance.CurrentRegion.Name, callBack,StringId.HouseNameCannotBeEmpty,0,new List<string>());
                new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceName, DB_ResidenceData.Instance.CurrentRegion.homeName, callBack,StringId.HouseNameCannotBeEmpty,0,new List<string>());
            };
            btnResidenceName.MouseUpEventHandler = eventHandler;
            btnEditResidenceNameIcon.MouseUpEventHandler = eventHandler;
@@ -104,7 +104,7 @@
                    if (responsePack.Code.ToUpper() == StateCode.SUCCESS)
                    {
                        btnResidenceAddress.Text = str;
                        DB_ResidenceData.Instance.CurrentRegion.Address = str;
                        DB_ResidenceData.Instance.CurrentRegion.homeAddress = str;
                        DB_ResidenceData.Instance.SaveResidenceData();
                        //OnAppConfig.Instance.SaveUserConfig();
                    }
@@ -113,7 +113,7 @@
                        IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code);
                    }
                };
                new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceAddress, DB_ResidenceData.Instance.CurrentRegion.Name, callBack, StringId.HouseAddressCannotBeEmpty, 0, new List<string>());
                new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceAddress, DB_ResidenceData.Instance.CurrentRegion.homeName, callBack, StringId.HouseAddressCannotBeEmpty, 0, new List<string>());
            };
            btnResidenceAddress.MouseUpEventHandler = eventHandler;
            btnLocationAddressIcon.MouseUpEventHandler = eventHandler;
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
@@ -4,7 +4,6 @@
using Shared;
using HDL_ON.Stan;
using ZXing.QrCode.Internal;
using static HDL_ON.UI.UI2.FuntionControlView.Video.VideoMethod;
namespace HDL_ON.UI.UI2.FuntionControlView.Video
{
@@ -348,13 +347,13 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.baolu30,
            };
            bjFl.AddChidren(regionBtn);
            //bjFl.AddChidren(regionBtn);
            var vv = new VerticalRefreshLayout
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(58 + 17),
                Height = Application.GetRealHeight(458 - 17),
                Y = Application.GetRealHeight(58),
                Height = Application.GetRealHeight(458),
                Width = Application.GetRealWidth(295),
            };
            bjFl.AddChidren(vv);
@@ -394,7 +393,6 @@
                    frameLayout60.btnTime.Text = getTime(call.callTime);
                    ///呼叫状态(0:未接;1:已接;2:拒接);是否开锁;
                    frameLayout60.btnStateText.Text = getStateText(call.callStatus) + "," + getUnlockText(call.isUnlock);
                }
            }
@@ -461,7 +459,10 @@
        {
            var utcTime = Convert.ToDateTime(str);
            var dateTime = TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local);
            return dateTime.ToString("HH") + ":" + dateTime.ToString("mm");
            // var monday = dateTime.ToString("MM") + Language.StringByID(StringId.month) + dateTime.ToString("dd") + Language.StringByID(StringId.day);
            var monday = dateTime.ToString("MM") + "/" + dateTime.ToString("dd");
            var time = dateTime.ToString("HH") + ":" + dateTime.ToString("mm");
            return monday + " " + time;
        }
        /// <summary>
        /// 获取呼叫状态文本
@@ -498,16 +499,14 @@
        /// <returns></returns>
        private string getUnlockText(bool if_bool)
        {
            string s = "";
            if (if_bool)
            {
                s = Language.StringByID(StringId.yikaisuo);
                return Language.StringByID(StringId.yikaisuo);
            }
            else
            {
                s = Language.StringByID(StringId.weikaisuo);
                return Language.StringByID(StringId.weikaisuo);
            }
            return s;
        }
        /// <summary>
        /// 获取uuid
HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs
@@ -90,13 +90,29 @@
                    var str = HttpWebRequest(NewAPI.API_POST_FL_QRcode, jobject.ToString(), "POST");
                    if (!string.IsNullOrEmpty(str))
                    {
                        var json = JObject.Parse(str);
                        if (json != null)
                        if (str.Contains("status"))
                        {
                            var stateCode = json["status"].ToString();
                            if (stateCode == "0")
                            //var json = JObject.Parse(str);
                            //if (json != null)
                            //{
                            //    var stateCode = json["status"].ToString();
                            //    if (stateCode == "0")
                            //    {
                            //        if_bool = true;
                            //    }
                            //}
                            if_bool = true;
                        }
                        else {
                            var json = JObject.Parse(str);
                            if (json != null)
                            {
                                if_bool = true;
                                var stateCode = json["desc"].ToString();
                                Application.RunOnMainThread(() =>
                                {
                                    //错误提示
                                    new Intelligence.Automation.LogicView.TipPopView().FlashingBox(stateCode);
                                });
                            }
                        }
                    }
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs
@@ -8,10 +8,10 @@
        /// <summary>
        /// 主控件View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        public RowLayout frameLayout = new RowLayout
        {
            Height = Application.GetRealHeight(50),
            // BackgroundColor = CSS.CSS_Color.view,
            LineColor = CSS.CSS_Color.view,
        };
        /// <summary>
        /// 文本描述
@@ -36,7 +36,7 @@
        /// View的方法
        /// </summary>
        /// <returns></returns>
        public FrameLayout FLayoutView()
        public RowLayout FLayoutView()
        {
            frameLayout.AddChidren(btnText);
            frameLayout.AddChidren(btnClick);
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs
@@ -8,10 +8,10 @@
        /// <summary>
        /// 主控件View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        public RowLayout frameLayout = new RowLayout
        {
            Height = Application.GetRealHeight(60),
            //BackgroundColor = CSS.CSS_Color.view,
            LineColor = CSS.CSS_Color.view,
        };
        /// <summary>
@@ -37,10 +37,10 @@
            Y = Application.GetRealHeight(10),
            Width = Application.GetRealWidth(120),
            Height = Application.GetRealHeight(20),
            TextColor = CSS.CSS_Color.textColor,
            TextColor = CSS.CSS_Color.textCancelColor,
            TextSize = TextSize.text14,
            TextAlignment=TextAlignment.CenterLeft,
            Text = "15:01",
            //Text = "15:01",
        };
        /// <summary>
        /// 状态文本
@@ -53,7 +53,6 @@
            TextSize = TextSize.text12,
            TextColor = CSS.CSS_Color.textCancelColor,
            TextAlignment = TextAlignment.CenterLeft,
            Text = "已接听, 已开锁",
        };
@@ -88,7 +87,7 @@
        /// View的方法
        /// </summary>
        /// <returns></returns>
        public FrameLayout FLayoutView()
        public RowLayout FLayoutView()
        {
            frameLayout.AddChidren(btnText);
            frameLayout.AddChidren(btnTime);
HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs
@@ -125,12 +125,12 @@
            //密码
            Button btnpaw = new Button()
            {
                X=Application.GetRealWidth(100),
                X=Application.GetRealWidth(95),
                Y = Application.GetRealHeight(62),
                Height = Application.GetRealHeight(32),
                Width = Application.GetRealWidth(82),
                Width = Application.GetRealWidth(82+5),
                TextColor = MusicColor.SelectedColor,
                TextSize =24,
                TextSize =20,//24
                TextAlignment = TextAlignment.Center,
                IsBold = true,
                Text = str1,