wei
2021-07-05 90fadf3023d54d780154eaa2a839e2106317297f
代码合并整理
1个文件已添加
29个文件已修改
1727 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/TopViewDiv.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation.zip 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 358 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 425 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TimeView.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/OnePortAutomation.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/OutdoorEnvironment.cs 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs 242 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,51 +1,14 @@
<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Electrical/PjtPage.cs">
<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget." />
  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs">
    <Files>
      <File FileName="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs" Line="15" Column="35" />
      <File FileName="HDL_ON/Common/HDLCommon.cs" />
      <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs" />
      <File FileName="HDL-ON_Android/Application.cs" />
      <File FileName="HDL_ON/UI/MainPage.cs" Line="359" Column="40" />
      <File FileName="HDL_ON/UI/BindingResidence/BindingResidencePage.cs" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs" />
      <File FileName="HDL-ON_iOS/Resources/Language.ini" Line="1" Column="1" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" Line="11" Column="27" />
      <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="14" Column="78" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs" Line="87" Column="59" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="946" Column="53" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" Line="406" Column="26" />
      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" Line="148" Column="49" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/StbPage.cs" Line="341" Column="13" />
      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/PjtPage.cs" Line="309" Column="1" />
      <File FileName="HDL_ON/Entity/Enumerative/Command.cs" Line="16" Column="1" />
      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs" Line="200" Column="80" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="HDL_APP_Project" expanded="True">
            <Node name="HDL_ON" expanded="True">
              <Node name="Entity" expanded="True">
                <Node name="Function" expanded="True" />
              </Node>
              <Node name="UI" expanded="True">
                <Node name="UI0-Public" expanded="True" />
                <Node name="UI2" expanded="True">
                  <Node name="1-HomePage" expanded="True" />
                  <Node name="2-Classification" expanded="True" />
                  <Node name="FuntionControlView" expanded="True">
                    <Node name="Electrical" expanded="True">
                      <Node name="PjtPage.cs" selected="True" />
                    </Node>
                  </Node>
                </Node>
              </Node>
            </Node>
            <Node name="HDL-ON_Android" expanded="True" />
            <Node name="HDL-ON_iOS" expanded="True">
              <Node name="Resources" expanded="True" />
            </Node>
          </Node>
          <Node name="HDL_APP_Project" expanded="True" />
        </State>
      </Pad>
    </Pads>
@@ -56,8 +19,8 @@
    <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
    <String>Shared.IOS/Shared.IOS.csproj</String>
  </DisabledProjects>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.822QECU5228FU" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore />
  </MonoDevelop.Ide.DebuggingService.Breakpoints>
HDL_ON/DAL/Server/HttpUtil.cs
@@ -163,10 +163,6 @@
                string requestFullUrl = urlHead + apiPath;
                ////**************测试**************
                string requestFullUrl = GlobalRequestHttpsHost + apiPath;
                ////**************测试**************
                RestClient client = new RestClient(requestFullUrl);
                RestRequest request = new RestRequest(method);
HDL_ON/DAL/Server/NewAPI.cs
@@ -151,7 +151,7 @@
        /// 下载账号头像
        /// </summary>
        public const string API_POST_DownloadHeadImage = "/home-wisdom/app/head/portrait/downWithAccount";
        #region 数据分享
        /// <summary>
        /// 分享指定文件给指定成员
@@ -310,14 +310,14 @@
        /// <summary>
        /// 检测更新,是否需要强制更新
        /// </summary>
        public const string API_POST_CheckAppVersion= "/smart-footstone/app/appVersion/check";
        public const string API_POST_CheckAppVersion = "/smart-footstone/app/appVersion/check";
        ///// <summary>
        ///// 查询APP最新版本
        ///// </summary>
        //public const string API_POST_GetAppVersion = "/smart-footstone/app/getAppVersion";
        #endregion
        #region ■  -- 房间场景背景图片上传下载接口___________________________
        /// <summary>
@@ -348,7 +348,7 @@
        /// 获取设备详情
        /// </summary>
        public const string Api_Post_GetDevcieInfoList = "/home-wisdom/app/device/info";
        /// <summary>
        /// 刷新设备状
        /// </summary>
@@ -450,6 +450,53 @@
        #endregion
        #region Kaede -- 安防接口____________________________
        /// <summary>
        /// 获取安防列表
        /// </summary>
        public const string Api_Post_Security_List = "/home-wisdom/app/security/list";
        /// <summary>
        /// 获取安防详情
        /// </summary>
        public const string Api_Post_Security_Info = "/home-wisdom/app/security/info";
        /// <summary>
        /// 添加安防
        /// </summary>
        public const string Api_Post_Security_Add = "/home-wisdom/app/security/add";
        /// <summary>
        /// 编辑安防
        /// </summary>
        public const string Api_Post_Security_Edit = "/home-wisdom/app/security/update";
        /// <summary>
        /// 删除安防
        /// </summary>
        public const string Api_Post_Security_Delete = "/home-wisdom/app/security/delete";
        /// <summary>
        /// 读取安防防区状态
        /// </summary>
        public const string Api_Post_Security_StatusRead = "/home-wisdom/app/security/statusRead";
        /// <summary>
        /// 设置安防防区状态
        /// </summary>
        public const string Api_Post_Security_StatusSet = "/home-wisdom/app/security/statusSet";
        /// <summary>
        /// 安防bypass设置
        /// </summary>
        public const string Api_Post_Security_BypassSet = "/home-wisdom/app/security/bypassSet";
        /// <summary>
        /// 安防bypass读取
        /// </summary>
        public const string Api_Post_Security_BypassRead = "/home-wisdom/app/security/bypassRead";
        /// <summary>
        /// 查询安防所有记录
        /// </summary>
        public const string Api_Post_Security_ListSecurityLog = "/home-wisdom/app/security/listSecurityLog";
        /// <summary>
        /// 查询安防报警记录
        /// </summary>
        public const string Api_Post_Security_ListAlarmLog = "/home-wisdom/app/security/listAlarmLog";
        #endregion
        #region ■  -- 房间、设备、场景分享___________________________
@@ -553,13 +600,13 @@
        /// 河东获取萤石云子账号token的接口
        /// </summary>
        public const string API_POST_EZ_GetChildToken = "/home-wisdom/platform/childToken";
        #endregion
        #region  ■  -- 丰林相关相关接口___________________________
        /// <summary>
        /// 检查住宅是否绑定丰林
        /// 检查住宅是否绑定丰林,并获取门口机列表
        /// </summary>
        public const string API_POST_FL_Check = "/home-wisdom/app/fl/vi/check";
        /// <summary>
@@ -573,7 +620,7 @@
        /// <summary>
        /// 开锁成功
        /// </summary>
        public const string API_POST_FL_Unlock= "/home-wisdom/app/fl/vi/unlock";
        public const string API_POST_FL_Unlock = "/home-wisdom/app/fl/vi/unlock";
        /// <summary>
        /// 通话视频截图上传
        /// </summary>
@@ -585,8 +632,7 @@
        /// <summary>
        /// 获取通话记录
        /// </summary>
        //public const string API_POST_FL_GetCallList = "/home-wisdom/app/fl/vi/list";
        public const string API_POST_FL_GetCallList = "/home-wisdom/platform/imou/listCallRecords";
        public const string API_POST_FL_GetCallList = "/home-wisdom/app/fl/vi/list";
        /// <summary>
        /// 删除通话记录
        /// </summary>
@@ -600,6 +646,7 @@
        /// </summary>
        public const string API_POST_FL_QRcode = "http://112.74.164.111:180/api.php/Device/setdynamicpwd";
        #endregion
        #region 可视对讲标准通用接口
        /// <summary>
@@ -616,7 +663,9 @@
        public const string API_POST_VideoDevice_UpdateCallStatus = "/home-wisdom/platform/imou/updateCallStatus";
        #endregion
        #region 可视对讲标准通用接口
        #region  ■  -- 门锁相关接口_______________________________
        /// <summary>
        /// 判断门锁是否第一使用
        /// </summary>
HDL_ON/HDL_ON.projitems
@@ -142,46 +142,6 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\1-HomePage\MessageCenterPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\1-HomePage\HomePage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\IntelligencePage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Send.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\FunTpye.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\OutdoorEnvironment.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Weather.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\ConditionDeviceFunList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\TimeTpye.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Logic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\PublicInterface.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\MainView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Time3.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Set.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\WeatherCondition.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\TargetDeviceFunList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InpOrOutLogicMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\SpeciaTime.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddTarget.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddInputType.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\FunAllAreaView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\DateView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AreaView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\MonView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\LogicAddView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\FunTypeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SelectTypeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SwitchView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TemperatureView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\LogicTypeTitleView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TimeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TimeHorizonView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TextSize.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AddOutputInputView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TipPopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\brightnessView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AddOutputInputTextView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SaveView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\CheckView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SingleLogicView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneAddPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SceneEditPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SceneAddPage.cs" />
@@ -411,12 +371,9 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\ObjectClass.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneAddPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneCatchFunctionListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InputPushText.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AirQuality.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\ArmCenterPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\SecurityAlarm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmCenter\ArmDeploymentSettingPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\OnePortAutomation.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\EnvironmentalScience\EchartsOption_BrokenLine.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\SmartSpeaker\SmartSpeakerListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\SmartSpeaker\SmartSpeakerSelectDevicesPage.cs" />
@@ -489,6 +446,49 @@
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Room.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Device\DeviceModule.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Device\SBK_SceneListObj.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Send.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\FunTpye.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\OutdoorEnvironment.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Weather.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\ConditionDeviceFunList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\TimeTpye.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Logic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\PublicInterface.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AirQuality.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\MainView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\OnePortAutomation.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Time3.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Set.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InputPushText.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\WeatherCondition.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\TargetDeviceFunList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InpOrOutLogicMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\SpeciaTime.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddTarget.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AddInputType.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\FunAllAreaView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\DateView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AreaView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\MonView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\LogicAddView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\FunTypeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SelectTypeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SwitchView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TemperatureView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\LogicTypeTitleView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TimeView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TimeHorizonView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TextSize.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AddOutputInputView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\TipPopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\brightnessView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\AddOutputInputTextView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SaveView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\CheckView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\SingleLogicView.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -131,7 +131,7 @@
            LoadTopView();
        }
        public void LoadTopView_RoomTop(Action backAction ,Action editAction)
        public void LoadTopView_RoomTop(Action backAction, Action editAction)
        {
            this.backAction = backAction;
@@ -275,7 +275,7 @@
        /// <summary>
        /// 楼层管理顶部栏
        /// </summary>
        public void LoadTopView_FloorTopView(Action<string> callBack,Action action)
        public void LoadTopView_FloorTopView(Action<string> callBack, Action action)
        {
            LoadTopView();
@@ -340,7 +340,7 @@
        /// <summary>
        /// 成员顶部栏
        /// </summary>
        public void LoadTopView_MemberTopView(Action callBack, Action action)
        public void LoadTopView_MemberTopView(Action addAction, Action action)
        {
            LoadTopView();
            backAction = action;
HDL_ON/UI/UI2/3-Intelligence/Automation.zip
Binary files differ
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -252,7 +252,7 @@
                        ) =>
                    {
                        Logic.currlogic.name = logicName;
                        Logic.currlogic.sid = LogicMethod.CurrLogicMethod.NewSid();
                        Logic.currlogic.sid = LogicMethod.NewSid();
                        loading.Start();
                        new System.Threading.Thread(() =>
                        {
@@ -295,7 +295,7 @@
                                        }
                                        Logic.LogicList.Add(Logic.currlogic);
                                        LogicMethod.CurrLogicMethod.RemoveAllView();
                                        LogicMethod.RemoveAllView();
                                        MainView.MainShow();
                                    }
                                    else if (responsePackNew != null && responsePackNew.Code == "14005")
@@ -335,7 +335,7 @@
                                loading.Hide();
                                if (responsePackNew != null && responsePackNew.Code == "0")
                                {
                                    LogicMethod.CurrLogicMethod.RemoveAllView();
                                    LogicMethod.RemoveAllView();
                                    MainView.MainShow();
                                }
                                else if (responsePackNew != null && responsePackNew.Code == "14005")
@@ -504,7 +504,6 @@
        {
            //定义一个局部weekList列表用来记录选中数据;
            List<string> weekStateList = new List<string>();
            PublicInterface weekView = new PublicInterface();
            if (Logic.currlogic.cycle.type == "week")
            {
HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs
@@ -85,7 +85,7 @@
        /// </summary>
        public void SceneMethod()
        {
            var sceneList = LogicMethod.CurrLogicMethod.GetSceneList();
            var sceneList = LogicMethod.GetSceneList();
            List<string> nameList = new List<string>();
            for (int i = 0; i < sceneList.Count; i++) {
                var scene = sceneList[i];
@@ -101,7 +101,7 @@
                //没啥作用,为了发送数据格式统一;
                outputDevice.status = new List<Dictionary<string, string>> { new Dictionary<string, string> { { "key", "scene" }, { "value", "0" } } };
                AddOutput(outputDevice);
                LogicMethod.CurrLogicMethod.RemoveAllView();
                LogicMethod.RemoveAllView();
                AddLogic addLogic = new AddLogic();
                MainPage.BasePageView.AddChidren(addLogic);
                addLogic.Show();
@@ -168,11 +168,11 @@
                    return;
                }
                Output outputTime= new Output();
                outputTime.sid = LogicMethod.CurrLogicMethod.NewSid();
                outputTime.sid = LogicMethod.NewSid();
                outputTime.target_type = "3";
                Dictionary<string, string> dic = new Dictionary<string, string>();
                LogicMethod.CurrLogicMethod.dictionary(dic, "key", "delay");
                LogicMethod.CurrLogicMethod.dictionary(dic, "value", timepoint);
                LogicMethod.dictionary(dic, "key", "delay");
                LogicMethod.dictionary(dic, "value", timepoint);
                outputTime.status.Add(dic);
                if (edit)
                {
@@ -187,7 +187,7 @@
                    AddOutput(outputTime);
                }
                fLayout.RemoveFromParent();
                LogicMethod.CurrLogicMethod.RemoveAllView();
                LogicMethod.RemoveAllView();
                AddLogic addLogic = new AddLogic();
                MainPage.BasePageView.AddChidren(addLogic);
                addLogic.Show();
HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs
@@ -72,7 +72,7 @@
                    AddDic(value);
                };
            }
        }
        /// <summary>
        /// 封装数据
@@ -81,13 +81,13 @@
        private void AddDic(string value)
        {
            Input input = new Input();
            input.sid = LogicMethod.CurrLogicMethod.NewSid();
            input.sid = LogicMethod.NewSid();
            input.condition_type = "9";
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", "air_quality");
            LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", value);
            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);
        }
@@ -121,7 +121,7 @@
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.CurrLogicMethod.RemoveAllView();
            LogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -3,7 +3,6 @@
using System.Collections.Generic;
using HDL_ON.Entity;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public class ConditionDeviceFunList : FrameLayout
@@ -20,7 +19,6 @@
        /// 定义一个变量,记录选中状态
        /// </summary>
        private string selectedState = "unknown";
        public void Show(Entity.Function device, int index, bool edit)
        {
            #region 界面布局
@@ -71,7 +69,6 @@
                        }
                    }
                    break;
                //水浸传感器
                case SPK.SensorWater:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
@@ -88,9 +85,7 @@
                    }
                    break;
                //烟雾传感器
                case SPK.SensorSmoke:
                //燃气传感器
                case SPK.SensorGas:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
@@ -107,7 +102,6 @@
                    }
                    break;
                //干接点
                case SPK.SensorDryContact:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
@@ -124,11 +118,8 @@
                    }
                    break;
                //红外珊栏传感器
                case SPK.SensorShanLan:
                //红外对射传感器
                case SPK.SensorDuiShe:
                //红外移动传感器
                case SPK.SensorPir:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
@@ -144,7 +135,6 @@
                        }
                    }
                    break;
                //门窗传感器
                case SPK.SensorDoorWindow:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
@@ -160,7 +150,6 @@
                        }
                    }
                    break;
                //超声波传感器
                case SPK.SensoruUtrasonic:
                    {
@@ -186,11 +175,10 @@
                        }
                    }
                    break;
                //毫米波传感器
                case SPK.SenesorMegahealth:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
                        view.btnText.TextID = StringId.mubiaozhuangtai;//目标状态
                        view.btnText.TextID = StringId.mubiaozhuangtai ;//目标状态
                        fLayout.AddChidren(view.FLayoutView());
                        view.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
@@ -202,72 +190,7 @@
                        }
                    }
                    break;
                //环境检测传感器
                case SPK.SenesorEnvironment:
                    {
                        #region 界面
                        ///温度
                        LogicView.FunTypeView wenuView = new LogicView.FunTypeView();
                        wenuView.btnText.TextID = StringId.wendu;
                        fLayout.AddChidren(wenuView.FLayoutView());
                        ///湿度
                        LogicView.FunTypeView shiduView = new LogicView.FunTypeView();
                        shiduView.frameLayout.Y = wenuView.frameLayout.Bottom;
                        shiduView.btnText.TextID = StringId.shidu;
                        fLayout.AddChidren(shiduView.FLayoutView());
                        ///pm2.5
                        LogicView.FunTypeView pm25View = new LogicView.FunTypeView();
                        pm25View.frameLayout.Y = shiduView.frameLayout.Bottom;
                        pm25View.btnText.TextID = StringId.pm25;
                        fLayout.AddChidren(pm25View.FLayoutView());
                        ///co2
                        LogicView.FunTypeView co2View = new LogicView.FunTypeView();
                        co2View.frameLayout.Y = pm25View.frameLayout.Bottom;
                        co2View.btnText.TextID = StringId.co2;
                        fLayout.AddChidren(co2View.FLayoutView());
                        ///tvoc
                        LogicView.FunTypeView tvocView = new LogicView.FunTypeView();
                        tvocView.frameLayout.Y = co2View.frameLayout.Bottom;
                        tvocView.btnText.TextID = StringId.tvoc;
                        fLayout.AddChidren(tvocView.FLayoutView());
                        #endregion
                        #region 点击事件
                        ///温度点击事件
                        wenuView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            new PublicInterface { }.ViewZuHe(this, StringId.wendugaoyu, StringId.wendudiyu, (intText, view) =>
                            {
                                InputBoxAction(device,intText, index, edit);
                            });
                        };
                        ///湿度点击事件
                        shiduView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            new PublicInterface { }.ViewZuHe(this, StringId.shidugaoyu, StringId.shidudiyu, (intText, view) =>
                            {
                                InputBoxAction(device,intText, index, edit);
                            });
                        };
                        ///pm2.5点击事件
                        pm25View.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            PmCo2TvocAction(this,device, "pm25",StringId.pm25, index,edit);
                        };
                        ///co2点击事件
                        co2View.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            PmCo2TvocAction(this,device, "co2", StringId.co2, index, edit);
                        };
                        ///tvoc点击事件
                        tvocView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            PmCo2TvocAction(this,device, "tvoc", StringId.tvoc, index, edit);
                        };
                        #endregion
                    }
                    break;
            }
            #region  保存
            ///保存View
@@ -277,65 +200,55 @@
            this.AddChidren(saveView.FLayoutView());
            saveView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
                Save(device,index, edit);
            };
            #endregion
        }
        /// <summary>
        /// 保存输入条件
        /// </summary>
        /// <param name="index">索引值</param>
        /// <param name="edit"></param>
        private void Save(Entity.Function device,int index, bool edit)
        {
            if (selectedState != "unknown")
            {
                Input inputDevice = new Input();
                inputDevice.condition_type = "3";
                inputDevice.sid = device.sid;
                inputDevice.condition = dicSateteList;
                if (edit)
                if (selectedState != "unknown")
                {
                    //移除旧数据
                    Logic.currlogic.input.RemoveAt(index);
                    //新数据插入旧数据的位置;
                    Logic.currlogic.input.Insert(index, inputDevice);
                    Input inputDevice = new Input();
                    inputDevice.condition_type = "3";
                    inputDevice.sid = device.sid;
                    inputDevice.condition = dicSateteList;
                    if (edit)
                    {
                        //移除旧数据
                        Logic.currlogic.input.RemoveAt(index);
                        //新数据插入旧数据的位置;
                        Logic.currlogic.input.Insert(index, inputDevice);
                    }
                    else
                    {
                        //添加一个条件
                        AddCondition(inputDevice);
                    }
                }
                else
                {
                    //添加一个条件
                    AddCondition(inputDevice);
                }
            }
            else
            {
                if (!edit)
                {
                    //提示用户
                    if (!edit)
                    {
                        //提示用户
                        return;
                    }
                    this.RemoveFromParent();
                    return;
                }
                this.RemoveFromParent();
                return;
            }
            LogicMethod.CurrLogicMethod.RemoveAllView();
            if (MainView.IsGatewayType)
            { //A网关
                var addLogic = new AddLogic();
                MainPage.BasePageView.AddChidren(addLogic);
                addLogic.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            }
            else
            {
                //一端口网关
                var onePortAutomation = new OnePortAutomation();
                MainPage.BasePageView.AddChidren(onePortAutomation);
                onePortAutomation.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            }
                LogicMethod.RemoveAllView();
                if (MainView.IsGatewayType)
                { //A网关
                    var addLogic = new AddLogic();
                    MainPage.BasePageView.AddChidren(addLogic);
                    addLogic.Show();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
                else
                {
                    //一端口网关
                    var onePortAutomation = new OnePortAutomation();
                    MainPage.BasePageView.AddChidren(onePortAutomation);
                    onePortAutomation.Show();
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
            };
            #endregion
        }
        /// <summary>
@@ -345,8 +258,7 @@
        /// <param name="button">选中状态显示文本Btn控件</param>
        /// <param name="btnText1">属性状态值文本1</param>
        /// <param name="btnText2">属性状态值文本2</param>
        private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2)
        {
        private void DeviceView(Entity.Function device,Button button,int btnText1,int btnText2) {
            FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
            this.AddChidren(frame);
            LogicView.SwitchView switchView = new LogicView.SwitchView();
@@ -447,99 +359,10 @@
                //显示文本
                button.TextID = intValue;
                selectedState = device.spk + "_" + value;
                AddDictionary(keyVlaue, value, "string");
                AddDictionary(keyVlaue, value);
            });
        }
        /// <summary>
        /// 温度,湿度弹框设置值
        /// </summary>
        /// <param name="textInt">文本</param>
        /// <param name="stateValue">编辑之前的状态值,默认为20</param>
        public void InputBoxAction(Entity.Function device, int textInt, int index, bool edit, string stateValue = "20")
        {
            if (edit)
            {
                Input inputs = Logic.currlogic.input[index];
                //清除之前旧数据
                dicSateteList.Clear();
                if (inputs.condition.Count != 0)
                {
                    //有数据重新赋值
                    dicSateteList = inputs.condition;
                }
            }
            new LogicView.TipPopView { }.InputBox(textInt, stateValue, (value) =>
            {
                string keyValue = "20";
                string data_type = "integer";
                string comparator = "=";
                switch (textInt)
                {
                    case StringId.wendugaoyu:
                        {
                            keyValue = "temperature";
                            comparator = ">";
                            data_type = "float";
                        }
                        break;
                    case StringId.wendudiyu:
                        {
                            keyValue = "temperature";
                            comparator = "<";
                            data_type = "float";
                        }
                        break;
                    case StringId.shidugaoyu:
                        {
                            keyValue = "humidity";
                            comparator = ">";
                        }
                        break;
                    case StringId.shidudiyu:
                        {
                            keyValue = "humidity";
                            comparator = "<";
                        }
                        break;
                }
                selectedState = device.spk + "_" + value;
                AddDictionary(keyValue, value, data_type, comparator);
                Save(device,index, edit);
            });
        }
        /// PM2.5,Co2,Tvoc设置值
        /// </summary>
        /// <param name="frame">当前界面</param>
        /// <param name="key">属性值,云雀上定义好的<</param>
        /// <param name="title">标题文本</param>
        /// <param name="index"></param>
        /// <param name="edit"></param>
        /// <param name="stateValue">编辑之前的状态值,默认为""</param>
        public void PmCo2TvocAction(FrameLayout frame, Entity.Function device,string key,int title, int index, bool edit, string stateValue = "")
        {
            if (edit)
            {
                Input inputs = Logic.currlogic.input[index];
                //清除之前旧数据
                dicSateteList.Clear();
                if (inputs.condition.Count != 0)
                {
                    //有数据重新赋值
                    dicSateteList = inputs.condition;
                }
            }
            PublicInterface view = new PublicInterface();
            var listStr = view.GetViewList(key);
            view.SingleSelectionShow(frame, listStr, Language.StringByID(title), view.GetString(key, stateValue)
               , (text) =>
               {
                   var value = view.GetValue(key, text);
                   selectedState = device.spk + "_"+ key;
                   AddDictionary(key, value, "integer");
                   Save(device,index, edit);
               });
        }
        /// <summary>
        /// 显示编辑之前的设备状态
@@ -568,28 +391,36 @@
        /// </summary>
        /// <param name="KeyValue">设备属性值,云雀上定义好的</param>
        /// <param name="selectedValue">状态值</param>
        /// <param name="data_type">类型</param>
        /// <param name="comparator">比较关系</param>
        private void AddDictionary(string KeyValue, string selectedValue, string data_type, string comparator = "=")
        private void AddDictionary(string KeyValue, string selectedValue)
        {
            //数据封装
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", KeyValue);
            LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", comparator);
            LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", data_type);
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", selectedValue);
            AddDictionaryList(dic);
            LogicMethod.dictionary(dic, "key", KeyValue);
            LogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.dictionary(dic, "value", selectedValue);
            AddDictionaryList(KeyValue, dic);
        }
        /// <summary>
        /// 更新数据列表
        /// </summary>
        /// <param name="keyValue">设备属性值,云雀上定义好的</param>
        /// <param name="comparator">比较关系</param>
        /// <param name="keyValue">设备属性值,云雀上定义好的</param>
        /// <param name="dictionary">添加选中数据</param>
        /// <returns></returns>
        private void AddDictionaryList(Dictionary<string, string> dictionary)
        private void AddDictionaryList(string keyValue, Dictionary<string, string> dictionary)
        {
            var indexValue = IsContainsAll(dictionary, dicSateteList);
            int indexValue = -1;
            for (int i = 0; i < dicSateteList.Count; i++)
            {
                var dic = dicSateteList[i];
                if (dic.ContainsValue(keyValue))
                {
                    //判断是否存在
                    indexValue = i;
                    break;
                }
            }
            if (indexValue != -1)
            {
                //存在移除
@@ -615,13 +446,8 @@
            {
                if (Logic.currlogic.input[i].sid == input.sid)
                {
                    //有些设备比较特殊(例如:海林传感器还是要判断属性值,温湿度属性还要判断比较关系,才能确认是否已经存在该条件,其他设备条件直接用sid判断即可)
                    //加一级判断是为兼容特殊设备
                    if (IsContainsAll(input.condition, Logic.currlogic.input[i].condition))
                    {
                        indexValue = i;
                        break;
                    }
                    indexValue = i;
                    break;
                }
            }
@@ -636,53 +462,5 @@
            }
        }
        /// <summary>
        /// 判断dictionaryB列表是否完整包含另一个dictionaryA
        /// </summary>
        /// <param name="dictionaryA">对象</param>
        /// <param name="dictionaryB">列表</param>
        /// <returns>返回列表的索引值</returns>
        public int IsContainsAll(Dictionary<string, string> dictionaryA, List<Dictionary<string, string>> dictionaryB)
        {
            int valueInt = -1;
            for (int i = 0; i < dictionaryB.Count; i++)
            {
                var dic = dictionaryB[i];
                string key = dic["key"];
                string comparatorValue = dic["comparator"];
                if (dictionaryA["key"] == key && dictionaryA["comparator"] == comparatorValue)
                {
                    //判断是否存在
                    valueInt = i;
                    break;
                }
            }
            return valueInt;
        }
        /// <summary>
        /// 判断dictionaryB是否完整包含另一个dictionaryA
        /// </summary>
        /// <param name="dictionaryA"></param>
        /// <param name="dictionaryB"></param>
        /// <returns></returns>
        public bool IsContainsAll(List<Dictionary<string, string>> dictionaryA, List<Dictionary<string, string>> dictionaryB)
        {
            for (int i = 0; i < dictionaryA.Count; i++)
            {
                var dic = dictionaryA[i];
                string key = dic["key"];
                string comparatorValue = dic["comparator"];
                var list = dictionaryB.FindAll((dictionary) => dictionary["key"] == key && dictionary["comparator"] == comparatorValue);
                if (list.Count> 0)
                {
                    return true;
                }
            }
            return false;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -81,7 +81,7 @@
                    Width = Application.GetRealWidth(144),
                    Height = Application.GetRealHeight(44 * 5),
                };
                var roomList = LogicMethod.CurrLogicMethod.GetGatewayRoomList(Language.StringByID(StringId.allAreas));
                var roomList = LogicMethod.GetGatewayRoomList(Language.StringByID(StringId.allAreas));
               
                if (roomList.Count > 5)
                {
@@ -122,7 +122,7 @@
                        funAllAreaView.btnText2.Text = Language.StringByID(StringId.allFun);
                        selectedRoom = (areaView.btnClick.Tag as Entity.Room);
                        ///获取显示设备列表
                        var list = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room,if_type);
                        var list = LogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room,if_type);
                        DeviceListView(vv, list);
                    };
@@ -138,9 +138,9 @@
            EventHandler<MouseEventArgs> funClick = (sender3, e3) =>{
                //获取最终显示列表
                var functionList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
                var functionList = LogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
                //获取设备列表的类型(例如:灯光类,窗帘类。。。)
                var deviceTypeList = LogicMethod.CurrLogicMethod.GetDeviceTypeList(functionList);
                var deviceTypeList = LogicMethod.GetDeviceTypeList(functionList);
                if (deviceTypeList.Count==0) {
                    //没有类型直接返回去;
                    return;
@@ -219,9 +219,9 @@
                        fLayout.RemoveFromParent();
                        funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString();
                        ///获取单个类型(例如:灯光类。。)设备FunctionType列表
                        var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(areaView.btnClick.Tag.ToString());
                        var typeFunctionList = LogicMethod.GetDeviceTypeFunctionList(areaView.btnClick.Tag.ToString());
                        ///获取单个灯光类型(例如:灯光1,灯光2。。)显示设备列表
                        var lists = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, functionList);
                        var lists = LogicMethod.GetShowDeviceList(typeFunctionList, functionList);
                        DeviceListView(vv, lists);
                    };
                    if (deviceTypeList.Count - 1 == i)
@@ -234,7 +234,7 @@
            funAllAreaView.btnText2.MouseUpEventHandler += funClick;
            funAllAreaView.btnIcon2.MouseUpEventHandler += funClick;
            ///获取显示设备列表
            var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
            var deviceList = LogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
            DeviceListView(vv, deviceList);
        }
@@ -255,7 +255,7 @@
                funView.btnLine.X = Application.GetRealWidth(16);
                funView.btnLine.Width = Application.GetRealWidth(343);
                verticalScrolView.AddChidren(funView.FLayoutView());
                funView.btnIcon.UnSelectedImagePath = LogicMethod.CurrLogicMethod.GetIconPath(dev.spk);
                funView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(dev.spk);
                funView.btnDeviceName.Text = dev.name;
                funView.btnRoomName.Text = dev.GetRoomListName();
                funView.btnClick.MouseUpEventHandler += (sen,e) => {
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -20,14 +20,12 @@
                ///各种条件的View
                LogicView.AddOutputInputView inputView = new LogicView.AddOutputInputView();
                inputView.FLayoutView(viewLayout);
                //添加没有延时,隐藏延时按钮;
                inputView.btnDelay.Visible = false;
                ///记录条件类型
                inputView.btnClick.Name = inputCondition.condition_type;
                ///记录条件索引
                inputView.btnClick.Tag = inputCondition;
                inputView.btnClick.Tag = inputCondition.sid;
                ///条件状态数组
                List<Dictionary<string, string>> dicList = inputCondition.condition;
                List<Dictionary<string, string>> dicList = inputCondition.condition as List<Dictionary<string, string>>;
                //显示条件各种类型状态
                switch (inputCondition.condition_type)
                {
@@ -125,9 +123,9 @@
                    case "3":
                        {
                            //用sid找到设备;
                            var device = LogicMethod.CurrLogicMethod.GetDevice(inputCondition.sid);
                            var device = LogicMethod.GetDevice(inputCondition.sid);
                            //用设备的functionType类型找到对应图标;
                            inputView.btnIcon.UnSelectedImagePath = LogicMethod.CurrLogicMethod.GetIconPath(device.spk);
                            inputView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(device.spk);
                            //显示设备名称
                            inputView.btnText.Text = device.name;
                            //改变设备名称显示控件宽度
@@ -270,7 +268,7 @@
                                                    {
                                                        if (value == "true")
                                                        {
                                                            str += Language.StringByID(StringId.youren) + ";";
                                                            str+= Language.StringByID(StringId.youren)+";";
                                                        }
                                                        else
                                                        {
@@ -315,65 +313,6 @@
                                        }
                                    }
                                    break;
                                case SPK.SenesorEnvironment:
                                    {
                                        string strtext = "";
                                        foreach (var dic in dicList)
                                        {
                                            string key = dic["key"];
                                            string value = dic["value"];
                                            string comparator = dic["comparator"];
                                            switch (key)
                                            {
                                                case "temperature":
                                                    {
                                                        if (comparator == ">")
                                                        {
                                                            strtext = ">" + value + "℃";
                                                        }
                                                        else if (comparator == "<")
                                                        {
                                                            strtext = "<" + value + "℃";
                                                        }
                                                    }
                                                    break;
                                                case "humidity":
                                                    {
                                                        if (comparator == ">")
                                                        {
                                                            strtext = ">" + value + "%";
                                                        }
                                                        else if (comparator == "<")
                                                        {
                                                            strtext = "<" + value + "%";
                                                        }
                                                    }
                                                    break;
                                                case "co2":
                                                    {
                                                        strtext = Language.StringByID(StringId.co2) + new PublicInterface { }.GetString("co2", value);
                                                    }
                                                    break;
                                                case "pm25":
                                                    {
                                                        strtext = Language.StringByID(StringId.pm25) + new PublicInterface { }.GetString("pm25", value);
                                                    }
                                                    break;
                                                case "tvoc":
                                                    {
                                                        strtext = Language.StringByID(StringId.tvoc) + new PublicInterface { }.GetString("tvoc", value);
                                                    }
                                                    break;
                                            }
                                            inputView.btnState.Text = strtext;
                                        }
                                    }
                                    break;
                            }
                        }
@@ -393,7 +332,7 @@
                                {
                                    case "outdoor_temp":
                                        {
                                            strvalue = value + "℃";
                                            strvalue = value;
                                            if (comparator == ">")
                                            {
                                                strtext = Language.StringByID(StringId.wendugaoyu);
@@ -407,7 +346,7 @@
                                        break;
                                    case "outdoor_humity":
                                        {
                                            strvalue = value + "%";
                                            strvalue = value;
                                            if (comparator == ">")
                                            {
                                                strtext = Language.StringByID(StringId.shidugaoyu);
@@ -422,7 +361,7 @@
                                    case "pm2.5":
                                        {
                                            strtext = Language.StringByID(StringId.PM25);
                                            strvalue = new PublicInterface { }.GetString("pm25", value);
                                            strvalue = new OutdoorEnvironment { }.GetString(value);
                                        }
                                        break;
@@ -468,40 +407,57 @@
                            }
                        }
                        break;
                    case "9":
                        {
                            inputView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png";
                            foreach (var dic in dicList)
                            {
                                string strtext = "";
                                string value = dic["value"];
                                switch (value)
                                {
                                    case "excellent":
                                        {
                                            strtext = Language.StringByID(StringId.kongqiyou);
                                        }
                                        break;
                                    case "good":
                                        {
                                            strtext = Language.StringByID(StringId.kongqiliang);
                                        }
                                        break;
                                    case "poor":
                                        {
                                            strtext = Language.StringByID(StringId.kongqicha);
                                        }
                                        break;
                                }
                                inputView.btnText.TextID = StringId.kongqizhiliang;
                                inputView.btnState.Text = strtext;
                            }
                        }
                        break;
                }
                //再次编辑条件状态点击事件
                inputView.btnClick.MouseUpEventHandler += (sen, e) =>
                {
                    Button button = (Button)sen;
                    //当前编辑的条件
                    Input ckcliInput = inputView.btnClick.Tag as Input;
                    //找到当前编辑的索引
                    int indexVulae = 0;
                    for (int index = 0; index < Logic.currlogic.input.Count; index++)
                    {
                        Input input = Logic.currlogic.input[index];
                        if (input.sid == ckcliInput.sid)
                        if (input.sid == inputView.btnClick.Tag.ToString())
                        {
                            if (button.Name == "3")
                            {
                                //有些设备比较特殊(例如:海林传感器还是要判断属性值,温湿度属性还要判断比较关系,才能确认是否已经存在该条件,其他设备条件直接用sid判断即可)
                                //加一级判断是为兼容特殊设备
                                if (new ConditionDeviceFunList { }.IsContainsAll(ckcliInput.condition, input.condition))
                                {
                                    //用户可能删除数据,使列表索引发生改变;
                                    //通过唯一sid重新查找到索引且更新索引值
                                    indexVulae = index;
                                    break;
                                }
                            }
                            else
                            {
                                //用户可能删除数据,使列表索引发生改变;
                                //通过唯一sid重新查找到索引且更新索引值
                                indexVulae = index;
                                break;
                            }
                            //用户可能删除数据,使列表索引发生改变;
                            //通过唯一sid重新查找到索引且更新索引值
                            indexVulae = index;
                            break;
                        }
                    }
                    //标记编辑状态
@@ -514,7 +470,7 @@
                                Input _input = Logic.currlogic.input[indexVulae];
                                if (_input.condition_type == "1")
                                {
                                    var dicLists = _input.condition;
                                    var dicLists = _input.condition as List<Dictionary<string, string>>;
                                    foreach (var dic in dicLists)
                                    {
                                        string keyValue = dic["key"];
@@ -564,78 +520,11 @@
                        case "3":
                            {
                                //用sid找到设备;
                                var device = LogicMethod.CurrLogicMethod.GetDevice(inputCondition.sid);
                                if (device.spk == SPK.SenesorEnvironment)
                                {
                                    //这个设备比较特殊
                                    ConditionDeviceFunList conditionDeviceFunList = new ConditionDeviceFunList();
                                    ///当前的索引值数据对象
                                    Input inputedit = Logic.currlogic.input[indexVulae];
                                    ///状态值
                                    string stateValue = "";
                                    foreach (var dic in inputedit.condition)
                                    {
                                        string key = dic["key"];
                                        string comparator = dic["comparator"];
                                        stateValue = dic["value"];
                                        switch (key)
                                        {
                                            case "temperature":
                                                {
                                                    int titleInt = 0;
                                                    if (comparator == ">")
                                                    {
                                                        titleInt = StringId.wendugaoyu;
                                                    }
                                                    else if (comparator == "<")
                                                    {
                                                        titleInt = StringId.wendudiyu;
                                                    }
                                                    conditionDeviceFunList.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "humidity":
                                                {
                                                    int titleInt = 0;
                                                    if (comparator == ">")
                                                    {
                                                        titleInt = StringId.shidugaoyu;
                                                    }
                                                    else if (comparator == "<")
                                                    {
                                                        titleInt = StringId.shidudiyu;
                                                    }
                                                    conditionDeviceFunList.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "co2":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "co2", StringId.co2, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "pm25":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "pm25", StringId.pm25, indexVulae, true, stateValue);
                                                }
                                                break;
                                            case "tvoc":
                                                {
                                                    conditionDeviceFunList.PmCo2TvocAction(thisView, device, "tvoc", StringId.tvoc, indexVulae, true, stateValue);
                                                }
                                                break;
                                        }
                                    }
                                }
                                else
                                {
                                    ConditionDeviceFunList deviceFunList = new ConditionDeviceFunList();
                                    MainPage.BasePageView.AddChidren(deviceFunList);
                                    deviceFunList.Show(device, indexVulae, edit);
                                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                                }
                                var device = LogicMethod.GetDevice(inputCondition.sid);
                                ConditionDeviceFunList deviceFunList = new ConditionDeviceFunList();
                                MainPage.BasePageView.AddChidren(deviceFunList);
                                deviceFunList.Show(device, indexVulae, edit);
                                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                            }
                            break;
                        case "4":
@@ -710,6 +599,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;
                    }
                };
                ///删除控件
@@ -740,23 +638,22 @@
                ///记录条件索引
                targetView.btnClick.Tag = outputTarget.sid;
                ///条件状态数组
                List<Dictionary<string, string>> dicList = outputTarget.status;
                //显示状态值
                string stateStr = "";
                List<Dictionary<string, string>> dicList = outputTarget.status as List<Dictionary<string, string>>;
                //显示输出条件各种类型状态
                switch (outputTarget.target_type)
                {
                    case "1":
                        {
                            //用sid找到设备;
                            var device = LogicMethod.CurrLogicMethod.GetDevice(outputTarget.sid);
                            var device = LogicMethod.GetDevice(outputTarget.sid);
                            //用设备的functionType类型找到对应图标;
                            targetView.btnIcon.UnSelectedImagePath = LogicMethod.CurrLogicMethod.GetIconPath(device.spk);
                            targetView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(device.spk);
                            //显示设备名称
                            targetView.btnText.Text = device.name;
                            //改变设备名称显示控件宽度
                            targetView.btnText.Width = Application.GetRealWidth(80);
                            //第一个变量显示状态值
                            string stateStr = "";
                            //区别不同设备,显示不同设备状态
                            switch (device.spk)
                            {
@@ -776,6 +673,7 @@
                                                stateStr = Language.StringByID(StringId.offLogic);
                                            }
                                        }
                                        targetView.btnState.Text = stateStr;
                                    }
                                    break;
                                case SPK.LightRGB:
@@ -801,7 +699,7 @@
                                        {
                                            stateStr = brightness + "%";
                                        }
                                        targetView.btnState.Text = stateStr;
                                    }
                                    break;
                                case SPK.CurtainSwitch:
@@ -830,6 +728,7 @@
                                                    break;
                                            }
                                        }
                                        targetView.btnState.Text = stateStr;
                                    }
                                    break;
                                case SPK.AcStandard:
@@ -921,11 +820,11 @@
                                        }
                                        if (on_off != "" && on_off == "off")
                                        {
                                            stateStr = Language.StringByID(StringId.offLogic);
                                            targetView.btnState.Text = Language.StringByID(StringId.offLogic);
                                        }
                                        else
                                        {
                                            stateStr = stateStr.TrimEnd(',');
                                            targetView.btnState.Text = stateStr.TrimEnd(',');
                                        }
@@ -1019,11 +918,11 @@
                                        }
                                        if (on_off != "" && on_off == "off")
                                        {
                                            stateStr = Language.StringByID(StringId.offLogic);
                                            targetView.btnState.Text = Language.StringByID(StringId.offLogic);
                                        }
                                        else
                                        {
                                            stateStr = stateStr.TrimEnd(',');
                                            targetView.btnState.Text = stateStr.TrimEnd(',');
                                        }
                                    }
@@ -1034,11 +933,11 @@
                    case "2":
                        {
                            //用sid找到场景;
                            var scene = LogicMethod.CurrLogicMethod.GetSecne(outputTarget.sid);
                            var scene = LogicMethod.GetSecne(outputTarget.sid);
                            targetView.btnIcon.UnSelectedImagePath = "LogicIcon/scene.png";
                            targetView.btnNextIcon.Visible = false;
                            //显示场景名称
                            stateStr = scene.name;
                            targetView.btnText.Text = scene.name;
                        }
                        break;
                    case "3":
@@ -1047,19 +946,10 @@
                            foreach (var dic in dicList)
                            {
                                string value = dic["value"];
                                stateStr = value;
                                targetView.btnText.Text = value;
                            }
                        }
                        break;
                }
                if (outputTarget.target_type == "1")
                {
                    targetView.btnState.Text =new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr;
                }
                else
                {
                    targetView.btnText.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr;
                }
                //再次编辑条件状态点击事件
                targetView.btnClick.MouseUpEventHandler += (sen, e) =>
@@ -1085,7 +975,7 @@
                        case "1":
                            {
                                //用sid找到设备;
                                var device = LogicMethod.CurrLogicMethod.GetDevice(outputTarget.sid);
                                var device = LogicMethod.GetDevice(outputTarget.sid);
                                TargetDeviceFunList deviceFunList = new TargetDeviceFunList();
                                MainPage.BasePageView.AddChidren(deviceFunList);
                                deviceFunList.Show(device, indexVulae, edit);
@@ -1107,25 +997,6 @@
                            }
                            break;
                    }
                };
                //延时点击事件
                targetView.btnDelay.MouseUpEventHandler += (sen, e) =>
                {
                    InpOrOutLogicMethod inpOrOutLogicMethod = new InpOrOutLogicMethod();
                    inpOrOutLogicMethod.Delayed(thisView, outputTarget, (value) =>
                    {
                        outputTarget.delay = value.ToString();
                        if (outputTarget.target_type == "1")
                        {
                            targetView.btnState.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr;
                        }
                        else
                        {
                            targetView.btnText.Text = new InpOrOutLogicMethod { }.GetTimeText(outputTarget.delay) + stateStr;
                        }
                    });
                };
                ///删除控件
                targetView.btnDel.MouseUpEventHandler += (sender, e) =>
@@ -1188,11 +1059,7 @@
                                    break;
                                case "brightness":
                                    {
                                        if (button2 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        button2.Text = value + "%";
                                    }
                                    break;
@@ -1255,21 +1122,11 @@
                                    break;
                                case "set_temp":
                                    {
                                        if (button2 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        button2.Text = value + "℃";
                                    }
                                    break;
                                case "mode":
                                    {
                                        if (button3 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        switch (value)
                                        {
                                            case "cool":
@@ -1300,11 +1157,6 @@
                                    break;
                                case "fan":
                                    {
                                        if (button4 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        switch (value)
                                        {
                                            case "high":
@@ -1367,21 +1219,11 @@
                                    break;
                                case "set_temp":
                                    {
                                        if (button2 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        button2.Text = value + "℃";
                                    }
                                    break;
                                case "mode":
                                    {
                                        if (button3 == null)
                                        {
                                            //怕调试软件乱上东西导致抛异常
                                            break;
                                        }
                                        switch (value)
                                        {
                                            case "day":
@@ -1613,7 +1455,7 @@
                    case "3":
                        {
                            //用sid找到设备;
                            var device = LogicMethod.CurrLogicMethod.GetDevice(inputCondition.sid);
                            var device = LogicMethod.GetDevice(inputCondition.sid);
                            name = device.name + "-";
                        }
                        break;
@@ -1628,7 +1470,7 @@
                    case "1":
                        {
                            //用sid找到设备;
                            var device = LogicMethod.CurrLogicMethod.GetDevice(outputTarget.sid);
                            var device = LogicMethod.GetDevice(outputTarget.sid);
                            //显示设备名称
                            name += device.name;
                            string stateStr = "";
@@ -1733,7 +1575,7 @@
                    case "2":
                        {
                            //用sid找到场景;
                            var scene = LogicMethod.CurrLogicMethod.GetSecne(outputTarget.sid);
                            var scene = LogicMethod.GetSecne(outputTarget.sid);
                            name += scene.name;
                        }
@@ -1743,108 +1585,5 @@
            catch { }
            return name;
        }
        /// <summary>
        /// 延时时间方法
        /// </summary>
        /// <param name="fLayout">在哪个界面显示</param>
        /// <param name="edit">(true=编辑;false=新建)</param>
        /// <param name="index">编辑条件的索引</param>
        private void Delayed(FrameLayout thisFLayout, Output output, Action<int> action)
        {
            FrameLayout fLayout = new FrameLayout
            {
                BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
            };
            thisFLayout.AddChidren(fLayout);
            LogicView.TimeView timePointView = new LogicView.TimeView();
            timePointView.FLayoutView(fLayout);
            EventHandler<MouseEventArgs> RemovefLayout = (sender, e1) =>
            {
                //移除fLayout界面
                fLayout.RemoveFromParent();
            };
            //取消点击事件
            timePointView.btnCancel.MouseUpEventHandler += RemovefLayout;
            //加载数据界面的设置方法(列表互不联动)
            timePointView.mUIPickerView.setNPicker(timePointView.GetmStringList(), timePointView.GetsStringList(), null);
            //默认初始选中状态
            timePointView.mUIPickerView.setCurrentItems(0, 5, 0);
            //定义一个局部变量记录选中时间
            int timepoint = 5;
            if (output.delay != "0")
            {
                int intValue = int.Parse(output.delay);
                var m = intValue / 60;
                var s = intValue % 60;
                string timeValue = m.ToString() + ":" + s.ToString();
                int mIndex = timePointView.GetValueIndex(timeValue, 0, 1, timePointView.GetmIntList());
                int sIndex = timePointView.GetValueIndex(timeValue, 1, 0, timePointView.GetmIntList());
                //更新初始状态
                timePointView.mUIPickerView.setCurrentItems(mIndex, sIndex, 0);
                timepoint = intValue;
            }
            //选中时间回调方法,时间变化一次回调一次
            timePointView.mUIPickerView.OnSelectChangeEvent += (index1, index2, index3) =>
            {
                string minuet = timePointView.GethStringList0()[index1].Split(' ')[0];
                string second = timePointView.GetmStringList()[index2].Split(' ')[0];
                int minuetIntValue = int.Parse(minuet);
                int secondIntValue = int.Parse(second);
                timepoint = minuetIntValue * 60 + secondIntValue;
            };
            //确定点击事件
            timePointView.btnConfirm.MouseUpEventHandler += (sender, e3) =>
            {
                if (timepoint == 0)
                {
                    //提示
                    return;
                }
                fLayout.RemoveFromParent();
                action(timepoint);
            };
        }
        /// <summary>
        /// 获取时间文本描述
        /// </summary>
        /// <param name="strTimeValue">时间值(单位s秒)</param>
        /// <returns></returns>
        private string GetTimeText(string strTimeValue)
        {
            var timeValue = int.Parse(strTimeValue);
            string state = "";
            var minutes = timeValue / 60;
            var seconds = timeValue % 60;
            if (minutes != 0)
            {
                if (seconds == 0)
                {
                    state = minutes.ToString() + Language.StringByID(StringId.minute);
                }
                else
                {
                    state = minutes.ToString() + Language.StringByID(StringId.minute) + seconds.ToString() + Language.StringByID(StringId.s);
                }
            }
            else
            {
                if (seconds != 0)
                {
                    state = seconds.ToString() + Language.StringByID(StringId.s);
                }
            }
            if (!string.IsNullOrEmpty(state)) {
                state = Language.StringByID(StringId.delayLogic) + state;
            }
            return state;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
@@ -5,6 +5,7 @@
    /// <summary>
    /// 逻辑存储数据对象
    /// </summary>
    [Serializable]
    public class Logic
    {
@@ -62,6 +63,7 @@
    /// <summary>
    /// 执行周期对象
    /// </summary>
    [Serializable]
    public class Cycle
    {
        /// <summary>
@@ -74,6 +76,7 @@
    /// <summary>
    /// 输入条件对象
    /// </summary>
    [Serializable]
    public class Input
    {
        /// <summary>
@@ -93,20 +96,21 @@
        /// </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>
        /// 逻辑输出目标唯一标识
        /// </summary>
        public string sid = "";
        /// <summary>
        /// 逻辑输出目标延时间(单位用秒)
        /// </summary>
        public string delay = "0";
        /// <summary>
        /// 逻辑输出目标类型
        /// 设备=1;
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -8,22 +8,6 @@
    public class LogicMethod
    {
        private static LogicMethod logicMethod = null;
        public static LogicMethod CurrLogicMethod
        {
            get
            {
                if (logicMethod == null)
                {
                    return new LogicMethod();
                }
                return logicMethod;
            }
        }
        /// <summary>
        /// 表示是条件
        /// </summary>
@@ -35,15 +19,15 @@
        /// <summary>
        /// 移除所有"Logic"界面
        /// </summary>
        public void RemoveAllView()
        public static void RemoveAllView()
        {
            MainPage.BasePageView.RemoveViewByTag("Logic");
        }
        /// <summary> Converts an array of bytes into a formatted string of hex digits (ex: E4 CA B2)</summary>
        /// <param name="data"> The array of bytes to be translated into a string of hex digits. </param>
        /// <returns> Returns a well formatted string of hex digits with spacing. </returns>
        public string byteArrayToHexString(byte[] data)
        static string byteArrayToHexString(byte[] data)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            foreach (byte b in data)
@@ -62,7 +46,7 @@
  * @param i 一个int数字
  * @return byte[]
  */
        public byte[] int2ByteArray(int i)
        public static byte[] int2ByteArray(int i)
        {
            byte[] result = new byte[4];
            result[0] = (byte)((i >> 24) & 0xFF);
@@ -75,7 +59,7 @@
        /// 获取时间戳
        /// </summary>
        /// <returns></returns>
        public int getTimeStamp()
        static int getTimeStamp()
        {
            TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
            return (int)ts.TotalSeconds;
@@ -83,7 +67,7 @@
        /// <summary>
        /// 生成逻辑sid方法
        /// </summary>
        public string NewSid()
        public static string NewSid()
        {
            string logicId = "";
            try
@@ -127,7 +111,7 @@
        /// <param name="dic">Dictionary类</param>
        /// <param name="key">健</param>
        /// <param name="value">值</param>
        public void dictionary(Dictionary<string, string> dic, string key, string value)
        public static void dictionary(Dictionary<string, string> dic, string key, string value)
        {
            if (dic.ContainsKey(key)) //判断是否存在键值
            {
@@ -141,7 +125,7 @@
        /// 获取网关房间列表
        /// </summary>
        /// <returns></returns>
        public List<HDL_ON.Entity.Room> GetGatewayRoomList()
        public static List<HDL_ON.Entity.Room> GetGatewayRoomList()
        {
            return HDL_ON.Entity.SpatialInfo.CurrentSpatial.RoomList;
        }
@@ -149,7 +133,7 @@
        /// 获取网关房间列表
        /// </summary>
        /// <returns></returns>
        public List<HDL_ON.Entity.Room> GetGatewayRoomList(string name)
        public static List<HDL_ON.Entity.Room> GetGatewayRoomList(string name)
        {
            List<Entity.Room> roomList = new List<Entity.Room>();
            Entity.Room room1 = new Entity.Room();
@@ -174,7 +158,7 @@
        /// 获取网关设备列表
        /// </summary>
        /// <returns></returns>
        public List<HDL_ON.Entity.Function> GetGatewayDeviceList()
        public static List<HDL_ON.Entity.Function> GetGatewayDeviceList()
        {
            return Entity.FunctionList.List.GetDeviceFunctionList();
        }
@@ -182,7 +166,7 @@
        /// 获取网关场景列表
        /// </summary>
        /// <returns></returns>
        public List<HDL_ON.Entity.Scene> GetSceneList()
        public static List<HDL_ON.Entity.Scene> GetSceneList()
        {
            return HDL_ON.Entity.FunctionList.List.scenes;
        }
@@ -191,7 +175,7 @@
        /// </summary>
        /// <param name="room">当前房间</param>
        /// <returns></returns>
        public List<HDL_ON.Entity.Function> GetRoomDevice(HDL_ON.Entity.Room room)
        public static List<HDL_ON.Entity.Function> GetRoomDevice(HDL_ON.Entity.Room room)
        {
            List<HDL_ON.Entity.Function> deviceLists = new List<Entity.Function>();
            List<HDL_ON.Entity.Function> lists = GetGatewayDeviceList();
@@ -221,7 +205,7 @@
        /// </summary>
        /// <param name="sid">设备唯一标识</param>
        /// <returns></returns>
        public HDL_ON.Entity.Function GetDevice(string sid)
        public static HDL_ON.Entity.Function GetDevice(string sid)
        {
            HDL_ON.Entity.Function device = new Entity.Function() { name = "Unknown" };
            List<HDL_ON.Entity.Function> deviceLists = GetGatewayDeviceList();
@@ -242,7 +226,7 @@
        /// </summary>
        /// <param name="sid">场景唯一标识</param>
        /// <returns></returns>
        public HDL_ON.Entity.Scene GetSecne(string sid)
        public static HDL_ON.Entity.Scene GetSecne(string sid)
        {
            HDL_ON.Entity.Scene scene = new Entity.Scene() { name = "Unknown" };
            List<HDL_ON.Entity.Scene> sceneLists = GetSceneList();
@@ -262,7 +246,7 @@
        /// </summary>
        /// <param name="device">设备</param>
        /// <returns></returns>
        public string GetGetRoomName(HDL_ON.Entity.Function device)
        public static string GetGetRoomName(HDL_ON.Entity.Function device)
        {
            string roomName = "";
            List<HDL_ON.Entity.Room> roomLists = GetGatewayRoomList();
@@ -284,7 +268,7 @@
        /// </summary>
        /// <param name="functionType">设备类型</param>
        /// <returns></returns>
        public string GetIconPath(string functionType)
        public static string GetIconPath(string functionType)
        {
            string strPath = "";
            switch (functionType)
@@ -325,7 +309,6 @@
                case SPK.SensorDoorWindow:
                case SPK.SensoruUtrasonic:
                case SPK.SenesorMegahealth:
                case SPK.SenesorEnvironment:
                    {
                        strPath = "LogicIcon/sensor.png";
                    }
@@ -339,7 +322,7 @@
        /// </summary>
        /// <param name="deviceList">设备列表</param>
        /// <returns></returns>
        public List<string> GetDeviceTypeList(List<HDL_ON.Entity.Function> deviceList)
        public static List<string> GetDeviceTypeList(List<HDL_ON.Entity.Function> deviceList)
        {
            List<string> deviceStrTypeList = new List<string>();
            deviceStrTypeList.Clear();
@@ -384,7 +367,6 @@
            || device.spk == SPK.SensorDoorWindow
            || device.spk == SPK.SensoruUtrasonic
            || device.spk == SPK.SenesorMegahealth
            || device.spk == SPK.SenesorEnvironment
            );
            if (sensor != null)
            {
@@ -398,7 +380,7 @@
        /// </summary>
        /// <param name="deviceType">设备类型(灯光类,窗帘类。)</param>
        /// <returns></returns>
        public List<string> GetDeviceTypeFunctionList(string deviceType)
        public static List<string> GetDeviceTypeFunctionList(string deviceType)
        {
            List<string> functionTypeList = new List<string>();
            if (deviceType == Language.StringByID(StringId.Lights))
@@ -435,8 +417,6 @@
                functionTypeList.Add(SPK.SensorDoorWindow);
                functionTypeList.Add(SPK.SensoruUtrasonic);
                functionTypeList.Add(SPK.SenesorMegahealth);
                functionTypeList.Add(SPK.SenesorEnvironment);
            }
            return functionTypeList;
@@ -446,7 +426,7 @@
        /// 条件/目标支持设备
        /// </summary>
        /// <returns></returns>
        public List<string> GetSupportEquipment(string if_type)
        public static List<string> GetSupportEquipment(string if_type)
        {
            List<string> deviceTypeList = new List<string>();
            switch (if_type)
@@ -473,8 +453,6 @@
                        deviceTypeList.Add(SPK.SensorDoorWindow);
                        deviceTypeList.Add(SPK.SensoruUtrasonic);
                        deviceTypeList.Add(SPK.SenesorMegahealth);
                        deviceTypeList.Add(SPK.SenesorEnvironment);
                    }
                    break;
                case target_if:
@@ -501,7 +479,7 @@
        /// <param name="functionType">源数据列表1</param>
        /// <param name="deviceList">源数据列表2</param>
        /// <returns></returns>
        public List<Entity.Function> GetShowDeviceList(List<string> functionType, List<HDL_ON.Entity.Function> deviceList)
        public static List<Entity.Function> GetShowDeviceList(List<string> functionType, List<HDL_ON.Entity.Function> deviceList)
        {
            List<HDL_ON.Entity.Function> devList = new List<Entity.Function>();
            for (int i = 0; i < deviceList.Count; i++)
@@ -523,7 +501,7 @@
        /// <param name="room">当前房间</param>
        /// <param name="str">判断符(表示=输入设备和输出设备)</param>
        /// <returns></returns>
        public List<Entity.Function> GetFunctionDeviceList(Entity.Room room, string str)
        public static List<Entity.Function> GetFunctionDeviceList(Entity.Room room, string str)
        {
            List<string> functionTypeList = GetSupportEquipment(str);
            //返回房间设备列表
@@ -535,7 +513,7 @@
        /// <summary>
        /// 网关ID(获取嘉乐网关ID)
        /// </summary>
        public string GatewayId
        public static string GatewayId
        {
            get
            {
@@ -549,7 +527,7 @@
        /// <summary>
        /// 住宅ID
        /// </summary>
        public string HomeId
        public static string HomeId
        {
            get
            {
@@ -559,14 +537,12 @@
        /// <summary>
        /// 是否为其他主用户分享过来的住宅
        /// </summary>
        public bool IsOthreShare
        public static bool IsOthreShare
        {
            get
            {
                return Entity.DB_ResidenceData.Instance.CurrentRegion.isOtherShare;
            }
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs
@@ -35,7 +35,6 @@
            frameLayout.Height = Application.GetRealHeight(flHeight);
            btnIf.Y= Application.GetRealHeight(btnY);
            frameLayout.AddChidren(btnIf);
            return frameLayout;
        }
    }
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs
@@ -7,11 +7,11 @@
        /// <summary>
        /// 主控件View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        public FrameLayout frameLayout= new FrameLayout
        {
            Height = Application.GetRealHeight(44),
            Width = Application.GetRealWidth(343),
            BackgroundColor = CSS.CSS_Color.view,
           BackgroundColor= CSS.CSS_Color.view,
            X = Application.GetRealWidth(LogicView.TextSize.left16),
        };
@@ -23,28 +23,28 @@
            Height = Application.GetRealHeight(43),
            Width = Application.GetRealWidth(343),
            LineColor = CSS.CSS_Color.viewTranslucence,
            SubViewWidth = Application.GetRealWidth(68),
            SubViewWidth=Application.GetRealWidth(68),
        };
        /// <summary>
        /// (条件或者目标)图标
        /// </summary>
        public Button btnIcon = new Button
        public Button btnIcon= new Button
        {
            Width = Application.GetRealWidth(28),
            Height = Application.GetRealWidth(28),
            Width= Application.GetRealWidth(28),
            Height =Application.GetRealWidth(28),
            //Y = Application.GetRealHeight(8),
            X = Application.GetRealWidth(TextSize.left12),
        };
        /// <summary>
        /// (条件或者目标)文本描述
        /// </summary>
        public Button btnText = new Button
        public Button btnText= new Button
        {
            TextSize = TextSize.text14,
            Width = Application.GetRealWidth(250),
            Height = Application.GetRealHeight(20),
            TextColor = CSS.CSS_Color.textColor,
            TextColor= CSS.CSS_Color.textColor,
            //Y=Application.GetRealHeight(12),
            X = Application.GetRealWidth(52),
        };
@@ -58,9 +58,9 @@
            Width = Application.GetRealWidth(130),
            Height = Application.GetRealHeight(17),
            TextColor = CSS.CSS_Color.textCancelColor,
            Y = Application.GetRealHeight(14),
            Y=Application.GetRealHeight(14),
            X = Application.GetRealWidth(165),
            TextAlignment = TextAlignment.CenterRight,
            TextAlignment=TextAlignment.CenterRight,
        };
        /// <summary>
@@ -81,26 +81,13 @@
        /// </summary>
        public Button btnLine = new Button
        {
            Width = Application.GetRealWidth(279),
            Y = Application.GetRealHeight(44 - 1),
            Width=Application.GetRealWidth(279),
            Y = Application.GetRealHeight(44-1),
            X = Application.GetRealWidth(52),
            Height = 1,
            BackgroundColor = CSS.CSS_Color.viewLine,
        };
        /// <summary>
        /// 延时
        /// </summary>
        public Button btnDelay = new Button
        {
            BackgroundColor = CSS.CSS_Color.AuxiliaryColor1,
            TextID = StringId.delayLogic,
            TextSize = LogicView.TextSize.text16,
            TextColor = CSS.CSS_Color.view,
        };
        /// <summary>
        /// 删除
        /// </summary>
        public Button btnDel = new Button
        {
            BackgroundColor = CSS.CSS_Color.textRedColor,
@@ -108,6 +95,7 @@
            TextSize = LogicView.TextSize.text16,
            TextColor = CSS.CSS_Color.view,
        };
        public Button btnClick = new Button
        {
            Height = Application.GetRealHeight(44),
@@ -129,13 +117,12 @@
            rowLayout.AddChidren(btnText);
            rowLayout.AddChidren(btnState);
            rowLayout.AddChidren(btnNextIcon);
            rowLayout.AddRightView(btnDelay);
            rowLayout.AddRightView(btnDel);
            rowLayout.AddChidren(btnClick);
            btnLine.Y = frameLayout.Height - 1;
            frameLayout.AddChidren(btnLine);
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SelectTypeView.cs
@@ -132,7 +132,5 @@
            frameLayout.AddChidren(btnClick);
            return frameLayout;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TimeView.cs
@@ -72,6 +72,7 @@
        /// </summary>
        /// <returns></returns>
        public void FLayoutView(FrameLayout fLayout)
        //public void FLayoutView(FrameLayout fLayout, string currState, Action<string> action)
        {
           
            fLayout.AddChidren(frameLayout);
@@ -79,6 +80,7 @@
            frameLayout.AddChidren(btnCancel);
            frameLayout.AddChidren(btnConfirm);
            frameLayout.AddChidren(btnLine);
            //TimePoint(fLayout, action,currState);
        }
        /// <summary>
        /// 选中时间的方法
@@ -240,32 +242,6 @@
                {
                    //添加数据
                    mList.Add(i.ToString() + " " + Language.StringByID(StringId.m));
                }
            }
            return mList;
        }
        /// <summary>
        /// 获取60秒列表
        /// </summary>
        /// <returns></returns>
        public List<string> GetsStringList()
        {
            //初始化列表
            var mList = new List<string>();
            for (int i = 0; i < 60; i++)
            {
                if (i < 10)
                {
                    var a = "0" + i.ToString();
                    //添加数据
                    mList.Add(a + " " + Language.StringByID(StringId.s));
                }
                else
                {
                    //添加数据
                    mList.Add(i.ToString() + " " + Language.StringByID(StringId.s));
                }
            }
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs
@@ -9,7 +9,7 @@
        /// <summary>
        /// 最上面块View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        public FrameLayout frameLayout = new FrameLayout
        {
            BackgroundColor = CSS.CSS_Color.viewTop,
            Height = Application.GetRealHeight(64),
@@ -22,7 +22,7 @@
        {
            TextSize = TextSize.text18,
            TextColor = CSS.CSS_Color.textColor,
            Width = Application.GetRealWidth(TextSize.view375-60-60),
            Width = Application.GetRealWidth(TextSize.view375 - 60 - 60),
            Height = Application.GetRealHeight(25),
            Y = Application.GetRealHeight(30),
            X = Application.GetRealWidth(60)
@@ -62,7 +62,7 @@
        /// <summary>
        /// 设置图标增加热键大小
        /// </summary>
        public Button clickSetBtn = new Button
        public Button clickSetBtn = new Button
        {
            X = Application.GetRealWidth(337 - 37),
            Width = Application.GetRealWidth(28 + 37),
@@ -82,6 +82,35 @@
            return frameLayout;
        }
        #endregion
        /// <summary>
        /// 显示位置
        /// </summary>
        public void Location()
        {
            //获取宽度
            int widthValue = topNameBtn.GetTextWidth();
            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
            Button locationBtn = new Button
            {
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealWidth(18),
                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
                Y = Application.GetRealHeight(34 + 1),
                UnSelectedImagePath = "LogicIcon/location.png",
            };
            frameLayout.AddChidren(locationBtn);
            Button textBtn = new Button
            {
                Height = Application.GetRealHeight(14),
                Y = Application.GetRealHeight(57),
                TextSize = LogicView.TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                Text = "广东广州市番禺区石楼镇",
            };
            frameLayout.AddChidren(textBtn);
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -261,7 +261,7 @@
            if (idStr.Code == "0" && idStr.Data != null && idStr.Data.ToString() != "")
            {
                var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data);
                var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Date>>(date);
                var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicData>>(date);
                for (int i = 0; i < dateList.Count; i++)
                {
                    //添加逻辑ID
@@ -526,12 +526,12 @@
            }
        }
    }
    class Date
    class LogicData
    {
        /// <summary>
        /// 云端唯一id
        /// </summary>
        public string userLogicId = "";
        public string userLogicId = "";
        /// <summary>
        /// 网关id
        /// </summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/OnePortAutomation.cs
@@ -199,7 +199,7 @@
                        ) =>
                    {
                        Logic.currlogic.name = logicName;
                        Logic.currlogic.sid = LogicMethod.CurrLogicMethod.NewSid();
                        Logic.currlogic.sid = LogicMethod.NewSid();
                        loading.Start();
                        new System.Threading.Thread(() =>
                        {
@@ -242,7 +242,7 @@
                                        }
                                        Logic.LogicList.Add(Logic.currlogic);
                                        LogicMethod.CurrLogicMethod.RemoveAllView();
                                        LogicMethod.RemoveAllView();
                                        MainView.MainShow();
                                    }
                                    else if (responsePackNew != null && responsePackNew.Code == "14005")
@@ -282,7 +282,7 @@
                                loading.Hide();
                                if (responsePackNew != null && responsePackNew.Code == "0")
                                {
                                    LogicMethod.CurrLogicMethod.RemoveAllView();
                                    LogicMethod.RemoveAllView();
                                    MainView.MainShow();
                                }
                                else if (responsePackNew != null && responsePackNew.Code == "14005")
HDL_ON/UI/UI2/3-Intelligence/Automation/OutdoorEnvironment.cs
@@ -75,7 +75,7 @@
            pmhigherView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            pmhigherView.btnText.TextID = StringId.PM25;
            viewLayout.AddChidren(pmhigherView.FLayoutView());
            #endregion
@@ -110,7 +110,7 @@
                PmAction(this);
            };
            #endregion
        }
@@ -119,7 +119,7 @@
        /// </summary>
        /// <param name="textInt">文本</param>
        /// <param name="stateValue">编辑之前的状态值,默认为20</param>
        public void InputBoxAction(int textInt, string stateValue = "20")
        public void InputBoxAction(int textInt,string stateValue="20")
        {
            new LogicView.TipPopView { }.InputBox(textInt, stateValue, (value) =>
            {
@@ -164,11 +164,31 @@
        public void PmAction(FrameLayout frame, string stateValue = "")
        {
            PublicInterface pmView = new PublicInterface();
            var pmListStr = pmView.GetViewList("pm25");
            pmView.SingleSelectionShow(frame, pmListStr, Language.StringByID(StringId.PM25), pmView.GetString("pm25", stateValue)
            var pmListStr = pmView.GetViewList("pm2.5");
            pmView.SingleSelectionShow(frame, pmListStr, Language.StringByID(StringId.PM25), GetString(stateValue)
               , (text) =>
               {
                   var value= pmView.GetValue("pm25", text);
                   string value = "";
                   if (text == Language.StringByID(StringId.pmyou))
                   {
                       value = "10";
                   }
                   else if (text == Language.StringByID(StringId.pmliang))
                   {
                       value = "50";
                   }
                   else if (text == Language.StringByID(StringId.pmqingdu))
                   {
                       value = "90";
                   }
                   else if (text == Language.StringByID(StringId.pmzhongdu))
                   {
                       value = "130";
                   }
                   else if (text == Language.StringByID(StringId.pmzhongduwuran))
                   {
                       value = "170";
                   }
                   AddDic("pm2.5", "=", value);
               });
        }
@@ -181,13 +201,13 @@
        private void AddDic(string keyValue, string comparator, string value)
        {
            Input input = new Input();
            input.sid = LogicMethod.CurrLogicMethod.NewSid();
            input.sid = LogicMethod.NewSid();
            input.condition_type = "4";
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", keyValue);
            LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", comparator);
            LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "float");
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", value);
            LogicMethod.dictionary(dic, "key", keyValue);
            LogicMethod.dictionary(dic, "comparator", comparator);
            LogicMethod.dictionary(dic, "data_type", "float");
            LogicMethod.dictionary(dic, "value", value);
            input.condition.Add(dic);
            AddCondition(input, keyValue, comparator);
        }
@@ -197,7 +217,7 @@
        /// <param name="input"></param>
        /// <param name="keyValue"></param>
        /// <param name="comparator">比较关系</param>
        private void AddCondition(Input input, string keyValue, string comparator)
        private void AddCondition(Input input, string keyValue,string comparator)
        {
            ///记录索引值
            int index = -1;
@@ -227,7 +247,7 @@
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.CurrLogicMethod.RemoveAllView();
            LogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
@@ -241,7 +261,7 @@
        /// <param name="keyValue"></param>
        /// <param name="comparator">比较关系</param>
        /// <returns></returns>
        private bool ExistKey(List<Dictionary<string, string>> dicList, string keyValue, string comparator)
        private bool ExistKey(List<Dictionary<string, string>> dicList, string keyValue, string comparator)
        {
            for (int i = 0; i < dicList.Count; i++)
            {
@@ -257,6 +277,37 @@
            return false;
        }
        public string GetString(string strValue)
        {
            string text = "";
            int intValue = 0;
            if (strValue != "")
            {
                intValue = int.Parse(strValue);
            }
            if (intValue > 0 && intValue < 35)
            {
                text = Language.StringByID(StringId.pmyou);
            }
            else if (intValue > 35 && intValue < 75)
            {
                text = Language.StringByID(StringId.pmliang);
            }
            else if (intValue > 75 && intValue < 115)
            {
                text = Language.StringByID(StringId.pmqingdu);
            }
            else if (intValue > 115 && intValue < 150)
            {
                text = Language.StringByID(StringId.pmzhongdu);
            }
            else if (intValue > 150)
            {
                text = Language.StringByID(StringId.pmzhongduwuran);
            }
            return text;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
@@ -16,10 +16,6 @@
        /// <param name="textSize">显示文本字体大小</param>
        public void SingleSelectionShow(FrameLayout frame, List<string> list, string titleText, string stateText, Action<string> action, int textSize = LogicView.TextSize.text14)
        {
            if (list == null)
            {
                return;
            }
            FrameLayout frameLayout = new FrameLayout
            {
                BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
@@ -79,7 +75,7 @@
            };
        }
        /// <summary>
        /// 多选择
        /// </summary>
@@ -263,8 +259,7 @@
        /// <param name="list">显示数据源</param>
        /// <param name="titleText">标题</param>
        /// <param name="action">返回值索引值</param>
        public void FrameOrVv(FrameLayout frame, List<string> list, int titleText, Action<int> action)
        {
        public void FrameOrVv(FrameLayout frame, List<string>list, int titleText,Action<int> action) {
            int line = 0;
            if (list.Count == 0 || list.Count > 5)
@@ -401,7 +396,7 @@
        /// <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)
        public void FrameOrVvList(FrameLayout frame, List<string> list,List<string>stateList, int titleText, Action<List<string>> action)
        {
            int line = 0;
@@ -500,8 +495,7 @@
                {
                    verticalRefresh.AddChidren(checkView.FLayoutView());
                }
                if (stateList.Contains(strName))
                {
                if (stateList.Contains(strName)) {
                    checkView.btnClick.IsSelected = true;
                    checkView.btnCheckIcon.IsSelected = true;
                    selecetdList.Add(strName);
@@ -545,63 +539,6 @@
        }
        /// <summary>
        /// 温湿度组合界面
        /// </summary>
        /// <param name="frameLayout">父控件</param>
        /// <param name="text1">标题文本1</param>
        /// <param name="text2">标题文本2</param>
        /// <param name="action">回调函数</param>
        public void ViewZuHe(FrameLayout frameLayout, int text1, int text2, Action<int, FrameLayout> action)
        {
            FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewMiddle };
            frameLayout.AddChidren(frame);
            LogicView.TopView topView = new LogicView.TopView();
            topView.topNameBtn.TextID = StringId.wendu;
            frame.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                frame.RemoveFromParent();
            };
            FrameLayout viewLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64),
                Width = Application.GetRealWidth(LogicView.TextSize.view375),
                Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64),
                BackgroundColor = CSS.CSS_Color.viewMiddle,
            };
            frame.AddChidren(viewLayout);
            //温,湿度高于
            LogicView.SelectTypeView temperaturehigherView = new LogicView.SelectTypeView();
            temperaturehigherView.btnIcon.Visible = false;
            temperaturehigherView.btnText.X = Application.GetRealWidth(16);
            temperaturehigherView.btnLine.X = Application.GetRealWidth(16);
            temperaturehigherView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            temperaturehigherView.btnText.TextID = text1;
            viewLayout.AddChidren(temperaturehigherView.FLayoutView());
            //温,湿度低于
            LogicView.SelectTypeView temperatureunderView = new LogicView.SelectTypeView();
            temperatureunderView.frameLayout.Y = temperaturehigherView.frameLayout.Bottom;
            temperatureunderView.btnIcon.Visible = false;
            temperatureunderView.btnText.X = Application.GetRealWidth(16);
            temperatureunderView.btnLine.X = Application.GetRealWidth(16);
            temperatureunderView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
            temperatureunderView.btnText.TextID = text2;
            viewLayout.AddChidren(temperatureunderView.FLayoutView());
            //温,湿度高于
            temperaturehigherView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
                action(text1, frame);
            };
            //温,湿度低于
            temperatureunderView.btnClick.MouseUpEventHandler += (sen, e) =>
            {
                action(text2, frame);
            };
        }
        /// <summary>
        /// 获取界面列表
@@ -676,7 +613,7 @@
                      };
                    }
                    break;
                case "pm25":
                case "pm2.5":
                    {
                        list = new List<string> {
             Language.StringByID(StringId.pmyou),
@@ -684,24 +621,6 @@
             Language.StringByID(StringId.pmqingdu),
             Language.StringByID(StringId.pmzhongdu),
             Language.StringByID(StringId.pmzhongduwuran),
                      };
                    }
                    break;
                case "co2":
                    {
                        list = new List<string> {
             Language.StringByID(StringId.zhengchang),
             Language.StringByID(StringId.piangao),
             Language.StringByID(StringId.chaobiao),
                      };
                    }
                    break;
                case "tvoc":
                    {
                        list = new List<string> {
             Language.StringByID(StringId.zhengchang),
             Language.StringByID(StringId.chaobiao),
             Language.StringByID(StringId.yanzhong),
                      };
                    }
                    break;
@@ -878,157 +797,6 @@
            }
            return stateList;
        }
        /// <summary>
        /// 数值返回文本
        /// </summary>
        /// <param name="type">类型</param>
        /// <param name="strValue">值</param>
        /// <returns></returns>
        public string GetString(string type, string strValue)
        {
            string text = "";
            int intValue = 0;
            if (strValue != "")
            {
                intValue = int.Parse(strValue);
            }
            switch (type)
            {
                case "pm25":
                    {
                        if (intValue > 0 && intValue < 35)
                        {
                            text = Language.StringByID(StringId.pmyou);
                        }
                        else if (intValue > 35 && intValue < 75)
                        {
                            text = Language.StringByID(StringId.pmliang);
                        }
                        else if (intValue > 75 && intValue < 115)
                        {
                            text = Language.StringByID(StringId.pmqingdu);
                        }
                        else if (intValue > 115 && intValue < 150)
                        {
                            text = Language.StringByID(StringId.pmzhongdu);
                        }
                        else if (intValue > 150)
                        {
                            text = Language.StringByID(StringId.pmzhongduwuran);
                        }
                    }
                    break;
                case "co2":
                    {
                        if (intValue > 0 && intValue < 800)
                        {
                            text = Language.StringByID(StringId.zhengchang);
                        }
                        else if (intValue > 800 && intValue < 1100)
                        {
                            text = Language.StringByID(StringId.piangao);
                        }
                        else if (intValue > 1100)
                        {
                            text = Language.StringByID(StringId.chaobiao);
                        }
                    }
                    break;
                case "tvoc":
                    {
                        if (intValue >=1 && intValue <= 3)
                        {
                            text = Language.StringByID(StringId.zhengchang);
                        }
                        else if (intValue >=4 && intValue<=6)
                        {
                            text = Language.StringByID(StringId.chaobiao);
                        }
                        else if (intValue >= 7 && intValue <= 9)
                        {
                            text = Language.StringByID(StringId.yanzhong);
                        }
                    }
                    break;
            }
            return text;
        }
        /// <summary>
        /// 本文返回数值返回
        /// </summary>
        /// <param name="type">类型</param>
        /// <param name="text">文本</param>
        /// <returns></returns>
        public string GetValue(string type, string text)
        {
            string value = "";
            switch (type)
            {
                case "pm25":
                    {
                        if (text == Language.StringByID(StringId.pmyou))
                        {
                            value = "10";
                        }
                        else if (text == Language.StringByID(StringId.pmliang))
                        {
                            value = "50";
                        }
                        else if (text == Language.StringByID(StringId.pmqingdu))
                        {
                            value = "90";
                        }
                        else if (text == Language.StringByID(StringId.pmzhongdu))
                        {
                            value = "130";
                        }
                        else if (text == Language.StringByID(StringId.pmzhongduwuran))
                        {
                            value = "170";
                        }
                    }
                    break;
                case "co2":
                    {
                        if (text == Language.StringByID(StringId.zhengchang))
                        {
                            value = "400";
                        }
                        else if (text == Language.StringByID(StringId.piangao))
                        {
                            value = "850";
                        }
                        else if (text == Language.StringByID(StringId.chaobiao))
                        {
                            value = "1200";
                        }
                    }
                    break;
                case "tvoc":
                    {
                        if (text == Language.StringByID(StringId.zhengchang))
                        {
                            value = "2";
                        }
                        else if (text == Language.StringByID(StringId.chaobiao))
                        {
                            value = "5";
                        }
                        else if (text == Language.StringByID(StringId.yanzhong))
                        {
                            value = "8";
                        }
                    }
                    break;
            }
            return value;
        }
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -4,18 +4,40 @@
using HDL_ON.DAL.Server;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using HDL_ON.Entity;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
    public  class Send
    {
        /// <summary>
        /// 调用获取住宅子账号列表
        /// </summary>
        public static List<ResidenceMemberInfo> GetResidenceMemberAccount()
        {
            var responePack = new HttpServerRequest().GetResidenceMemberAccount();
            if (responePack.Code == StateCode.SUCCESS)
            {
                return Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString());
            }
            //失败
            else
            {
                //提示
                IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code);
            }
            return new List<ResidenceMemberInfo>();
        }
        /// <summary>
        /// 获取逻辑ID列表
        /// </summary>
        /// <returns></returns>
        public static ResponsePackNew GetLogicIdList() 
        {
            var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId } };
            var jObject = new JObject { { "homeId", LogicMethod.HomeId } };
            var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_List);
            //如果是token过期则刷新token
            if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
@@ -92,7 +114,6 @@
                {
                    var outputTypeJOb = new JObject { };
                    outputTypeJOb.Add("sid", dictionary.sid);
                    outputTypeJOb.Add("delay", dictionary.delay);
                    outputTypeJOb.Add("target_type", dictionary.target_type);
                    var statusArray = new JArray { };
                    foreach (var dic in dictionary.status)
@@ -132,7 +153,7 @@
                var logicjArray = new JArray { };
                var logicIfon = new JObject { };
                logicIfon.Add("sid", logic.sid);
                logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
                logicIfon.Add("gatewayId", LogicMethod.GatewayId);
                logicIfon.Add("name", logic.name);
                logicIfon.Add("relation", logic.relation);
                logicIfon.Add("enable", logic.enable);
@@ -142,7 +163,7 @@
                logicIfon.Add("noticeConfig", noticeConfigJObject);
                logicIfon.Add("pushConfigs", pushConfigsArray);
                logicjArray.Add(logicIfon);
                var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } };
                var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
                responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add,5);
                //如果是token过期则刷新token
                if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
@@ -205,7 +226,6 @@
                {
                    var outputTypeJOb = new JObject { };
                    outputTypeJOb.Add("sid", dictionary.sid);
                    outputTypeJOb.Add("delay", dictionary.delay);
                    outputTypeJOb.Add("target_type", dictionary.target_type);
                    var statusArray = new JArray { };
                    foreach (var dic in dictionary.status)
@@ -246,7 +266,7 @@
                var logicIfon = new JObject { };
                logicIfon.Add("userLogicId", logic.userLogicId);
                logicIfon.Add("sid", logic.sid);
                logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
                logicIfon.Add("gatewayId", LogicMethod.GatewayId);
                logicIfon.Add("name", logic.name);
                logicIfon.Add("relation", logic.relation);
                logicIfon.Add("enable", logic.enable);
@@ -257,7 +277,7 @@
                logicIfon.Add("pushConfigs", pushConfigsArray);
                logicjArray.Add(logicIfon);
                var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } };
                var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
                responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update,5);
                //如果是token过期则刷新token
                if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
@@ -118,7 +118,7 @@
                                loading.Hide();
                                if (responsePackNew != null && responsePackNew.Code == "0")
                                {
                                    LogicMethod.CurrLogicMethod.RemoveAllView();
                                    LogicMethod.RemoveAllView();
                                    Logic.LogicList.Remove(Logic.currlogic);
                                    MainView.MainShow();
                                    //发送删除逻辑命令;
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -387,8 +387,6 @@
                    if (edit)
                    {
                        //更新延时时间
                        outputDevice.delay = Logic.currlogic.output[index].delay;
                        //移除旧数据
                        Logic.currlogic.output.RemoveAt(index);
                        //新数据插入旧数据的位置;
@@ -410,7 +408,7 @@
                    this.RemoveFromParent();
                    return;
                }
                LogicMethod.CurrLogicMethod.RemoveAllView();
                LogicMethod.RemoveAllView();
                AddLogic addLogic = new AddLogic();
                MainPage.BasePageView.AddChidren(addLogic);
                addLogic.Show();
@@ -516,7 +514,7 @@
        private void GetEditState(Entity.Function device, int index, Button button1, Button button2, Button button3, Button button4)
        {
            Output outputs = Logic.currlogic.output[index];
            var dicList = outputs.status;
            var dicList = outputs.status as List<Dictionary<string, string>>;
            //清除之前旧数据
            dicSateteList.Clear();
            if (dicList.Count != 0)
@@ -535,8 +533,8 @@
        {
            //数据封装
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", KeyValue);
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", selectedValue);
            LogicMethod.dictionary(dic, "key", KeyValue);
            LogicMethod.dictionary(dic, "value", selectedValue);
            AddDictionaryList(KeyValue, dic);
        }
        /// <summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
@@ -18,29 +18,7 @@
            topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
            this.AddChidren(topView.FLayoutView());
            topView.topNameBtn.Text = titelText;
            //获取宽度
            int widthValue = topView.topNameBtn.GetTextWidth();
            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
            Button locationBtn = new Button
            {
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealWidth(18),
                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
                Y = Application.GetRealHeight(34 + 1),
                UnSelectedImagePath = "LogicIcon/location.png",
            };
            topView.frameLayout.AddChidren(locationBtn);
            Button textBtn = new Button
            {
                Height = Application.GetRealHeight(14),
                Y = Application.GetRealHeight(57),
                TextSize = LogicView.TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                Text = "广东广州市番禺区石楼镇",
            };
            topView.frameLayout.AddChidren(textBtn);
            topView.Location();
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                RemoveFromParent();
@@ -244,13 +222,13 @@
        private void AddDic(string keyValue, string value, bool edit, int index)
        {
            Input inputTime = new Input();
            inputTime.sid = LogicMethod.CurrLogicMethod.NewSid();
            inputTime.sid = LogicMethod.NewSid();
            inputTime.condition_type = "1";
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", keyValue);
            LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", value);
            LogicMethod.dictionary(dic, "key", keyValue);
            LogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.dictionary(dic, "value", value);
            inputTime.condition.Add(dic);
            AddCondition(inputTime, edit, index);
        }
@@ -272,7 +250,7 @@
                //添加一个新的时间条件
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.CurrLogicMethod.RemoveAllView();
            LogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs
@@ -129,13 +129,13 @@
            timePointView.FLayoutView(fLayout);
            timePointView.TimePoint(fLayout, editTime, (timeValue)=>{
                Input inputTime = new Input();
                inputTime.sid = LogicMethod.CurrLogicMethod.NewSid();
                inputTime.sid = LogicMethod.NewSid();
                inputTime.condition_type = "1";
                Dictionary<string, string> dic = new Dictionary<string, string>();
                LogicMethod.CurrLogicMethod.dictionary(dic, "key", "timepoint");
                LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
                LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
                LogicMethod.CurrLogicMethod.dictionary(dic, "value", timeValue);
                LogicMethod.dictionary(dic, "key", "timepoint");
                LogicMethod.dictionary(dic, "comparator", "=");
                LogicMethod.dictionary(dic, "data_type", "string");
                LogicMethod.dictionary(dic, "value", timeValue);
                inputTime.condition.Add(dic);
                AddCondition(inputTime, edit, index);
            });
@@ -252,13 +252,13 @@
                }
                Input inputTime = new Input();
                inputTime.sid = LogicMethod.CurrLogicMethod.NewSid();
                inputTime.sid = LogicMethod.NewSid();
                inputTime.condition_type = "2";
                Dictionary<string, string> dic = new Dictionary<string, string>();
                LogicMethod.CurrLogicMethod.dictionary(dic, "key", "timesection");
                LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
                LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
                LogicMethod.CurrLogicMethod.dictionary(dic, "value", btnStartTimeText.Text + "-" + btnEndTimeText.Text);
                LogicMethod.dictionary(dic, "key", "timesection");
                LogicMethod.dictionary(dic, "comparator", "=");
                LogicMethod.dictionary(dic, "data_type", "string");
                LogicMethod.dictionary(dic, "value", btnStartTimeText.Text + "-" + btnEndTimeText.Text);
                inputTime.condition.Add(dic);
                AddCondition(inputTime, edit, index);
@@ -349,7 +349,7 @@
                //添加一个新的时间条件
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.CurrLogicMethod.RemoveAllView();
            LogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();
HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs
@@ -72,7 +72,14 @@
                weatherCondition.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            //空气质量
            kongqiViewk.btnClick.MouseUpEventHandler += (sen, e) => {
                AirQuality airQuality = new AirQuality();
                MainPage.BasePageView.AddChidren(airQuality);
                airQuality.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            #endregion
        }
    }
HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs
@@ -16,29 +16,7 @@
            topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
            this.AddChidren(topView.FLayoutView());
            topView.topNameBtn.TextID = StringId.selectionCondition;
            //获取宽度
            int widthValue = topView.topNameBtn.GetTextWidth();
            int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
            Button locationBtn = new Button
            {
                Width = Application.GetRealWidth(18),
                Height = Application.GetRealWidth(18),
                X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
                Y = Application.GetRealHeight(34 + 1),
                UnSelectedImagePath = "LogicIcon/location.png",
            };
            topView.frameLayout.AddChidren(locationBtn);
            Button textBtn = new Button
            {
                Height = Application.GetRealHeight(14),
                Y = Application.GetRealHeight(57),
                TextSize = LogicView.TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                Text = "广东广州市番禺区石楼镇",
            };
            topView.frameLayout.AddChidren(textBtn);
            topView.Location();
            topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
            {
                RemoveFromParent();
@@ -100,13 +78,13 @@
        private void AddDic(string value)
        {
            Input input = new Input(); 
            input.sid = LogicMethod.CurrLogicMethod.NewSid();
            input.sid = LogicMethod.NewSid();
            input.condition_type = "6";
            Dictionary<string, string> dic = new Dictionary<string, string>();
            LogicMethod.CurrLogicMethod.dictionary(dic, "key", "weather");
            LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.CurrLogicMethod.dictionary(dic, "value", value);
            LogicMethod.dictionary(dic, "key", "weather");
            LogicMethod.dictionary(dic, "comparator", "=");
            LogicMethod.dictionary(dic, "data_type", "string");
            LogicMethod.dictionary(dic, "value", value);
            input.condition.Add(dic);
            AddCondition(input);
        }
@@ -140,7 +118,7 @@
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.CurrLogicMethod.RemoveAllView();
            LogicMethod.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();