wxr
2021-02-26 981ccd4afab6271422d7f169b30a2efa55eafde1
Merge branch 'WJC' into temp-wxr
1 文件已复制
61个文件已添加
10个文件已修改
1 文件已重命名
2522 ■■■■■ 已修改文件
HDL-ON_Android/Assets/Language.ini 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/Infraredtreasure.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/STB.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/adddevice.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/addlbuton.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/air.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/custom.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/del.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/delbuton.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/dropdown.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/dvd.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/failed.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/fan.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/icon1.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/icon2.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/next.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/offline.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/online.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/priequipment.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/projector.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/search.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/succeed.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/PirIcon/tv.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/libs/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/Infraredtreasure.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/adddevice.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/addlbuton.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/air.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/custom.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/del.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/delbuton.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/dropdown.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/dvd.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/fan.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/next.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/offline.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/online.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/priequipment.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/projector.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/search.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/stb.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/PirIcon/tv.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/CSS/CSS.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/.DS_Store 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs 279 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs 244 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Pir.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs 339 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/BrandListView.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/Buttons.cs 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/FailView.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/PatchView.cs 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/ReplicationView.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/SaveView.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/TipView.cs 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/TopView.cs 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini
@@ -1164,6 +1164,67 @@
5047=你手机暂未安装"QQ音乐"{\r\n}请前往手机商场安装
6000=正常
6001=设备状态
6002=个
6003=当前红外遥控设备
6004=已添加遥控器
6005=空调
6006=电视
6007=风扇
6008=机顶盒
6009=DVD/EVD/VCD
6010=投影仪
6011=自定义
6012=红外遥控
6013=设备管理
6014=添加遥控器
6015=在线
6016=离线
6017=版本号
6018=请输入遥控器名称
6019=提示:遥控器创建后可在功能-电器分类{\r\n}查找使用
6020=推荐按键
6021=请输入按键名称
6022=下一步
6023=电源
6024=音量+
6025=音量-
6026=频道+
6027=频道-
6028=上
6029=下
6030=左
6031=右
6032=静音
6034=确认
6035=播放
6037=退出
6038=菜单
6039=暂停
6040=返回
6041=停止
6042=主页
6043=快进
6044=快退
6045=定时
6046=复制遥控功能
6047=对准遥控器中心按下相同按键
6048=智能遥控器
6049=添加按键
6050=*长按可进行自定义排序
6051=完成
6052=添加成功
6053=可到分类-功能-电器操作使用
6054=所属分类
6055=遥控器名称
6056=所属区域
6057=继续添加
6058=电器
6059=添加失败
6060=重试
7000=新建自动化
7001=编辑自动化
7002=如果
HDL-ON_Android/Assets/Phone/.DS_Store
Binary files differ
HDL-ON_Android/Assets/Phone/PirIcon/Infraredtreasure.png
HDL-ON_Android/Assets/Phone/PirIcon/STB.png
HDL-ON_Android/Assets/Phone/PirIcon/adddevice.png
HDL-ON_Android/Assets/Phone/PirIcon/addlbuton.png
HDL-ON_Android/Assets/Phone/PirIcon/air.png
HDL-ON_Android/Assets/Phone/PirIcon/custom.png
HDL-ON_Android/Assets/Phone/PirIcon/del.png
HDL-ON_Android/Assets/Phone/PirIcon/delbuton.png
HDL-ON_Android/Assets/Phone/PirIcon/dropdown.png
HDL-ON_Android/Assets/Phone/PirIcon/dvd.png
HDL-ON_Android/Assets/Phone/PirIcon/failed.png
HDL-ON_Android/Assets/Phone/PirIcon/fan.png
HDL-ON_Android/Assets/Phone/PirIcon/icon1.png
HDL-ON_Android/Assets/Phone/PirIcon/icon2.png
HDL-ON_Android/Assets/Phone/PirIcon/next.png
HDL-ON_Android/Assets/Phone/PirIcon/offline.png
HDL-ON_Android/Assets/Phone/PirIcon/online.png
HDL-ON_Android/Assets/Phone/PirIcon/priequipment.png
HDL-ON_Android/Assets/Phone/PirIcon/projector.png
HDL-ON_Android/Assets/Phone/PirIcon/search.png
HDL-ON_Android/Assets/Phone/PirIcon/succeed.png
HDL-ON_Android/Assets/Phone/PirIcon/tv.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -206,6 +206,7 @@
    <Folder Include="Other\JPush\" />
    <Folder Include="Assets\Phone\FunctionIcon\Electrical\WaterValve\" />
    <Folder Include="Assets\Phone\FunctionIcon\Electrical\ClothesHanger\" />
    <Folder Include="Assets\Phone\PirIcon\" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" />
@@ -784,6 +785,28 @@
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\ClothesHanger\ClothesHangerUpIconOn.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\ClothesHanger\ClothesHangerWindDryIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\ClothesHanger\ClothesHangerWindDryIconOn.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\air.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\custom.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\dvd.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\fan.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\Infraredtreasure.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\projector.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\search.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\tv.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\stb.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\offline.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\online.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\priequipment.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\addlbuton.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\del.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\delbuton.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\dropdown.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\adddevice.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\next.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\failed.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\icon1.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\icon2.png" />
    <AndroidAsset Include="Assets\Phone\PirIcon\succeed.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" />
HDL-ON_Android/libs/.DS_Store
Binary files differ
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1039,6 +1039,24 @@
      <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\ClothesHanger\ClothesHangerUpIcon1On.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\ClothesHanger\ClothesHangerUpIcon2.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\ClothesHanger\ClothesHangerUpIcon2On.png" />
      <BundleResource Include="Resources\Phone\PirIcon\fan.png" />
      <BundleResource Include="Resources\Phone\PirIcon\dvd.png" />
      <BundleResource Include="Resources\Phone\PirIcon\stb.png" />
      <BundleResource Include="Resources\Phone\PirIcon\tv.png" />
      <BundleResource Include="Resources\Phone\PirIcon\projector.png" />
      <BundleResource Include="Resources\Phone\PirIcon\air.png" />
      <BundleResource Include="Resources\Phone\PirIcon\custom.png" />
      <BundleResource Include="Resources\Phone\PirIcon\priequipment.png" />
      <BundleResource Include="Resources\Phone\PirIcon\offline.png" />
      <BundleResource Include="Resources\Phone\PirIcon\search.png" />
      <BundleResource Include="Resources\Phone\PirIcon\del.png" />
      <BundleResource Include="Resources\Phone\PirIcon\dropdown.png" />
      <BundleResource Include="Resources\Phone\PirIcon\addlbuton.png" />
      <BundleResource Include="Resources\Phone\PirIcon\delbuton.png" />
      <BundleResource Include="Resources\Phone\PirIcon\Infraredtreasure.png" />
      <BundleResource Include="Resources\Phone\PirIcon\online.png" />
      <BundleResource Include="Resources\Phone\PirIcon\adddevice.png" />
      <BundleResource Include="Resources\Phone\PirIcon\next.png" />
    </ItemGroup>
    <ItemGroup>
      <ITunesArtwork Include="iTunesArtwork" />
HDL-ON_iOS/Resources/Language.ini
@@ -1180,6 +1180,24 @@
5047=你手机暂未安装"QQ音乐"{\r\n}请前往手机商场安装
6000=正常
6001=设备状态
6002=个
6003=当前红外遥控设备
6004=已添加遥控器
6005=空调
6006=电视
6007=风扇
6008=机顶盒
6009=DVD/EVD/VCD
6010=投影仪
6011=自定义
6012=红外遥控
6013=设备管理
6014=添加遥控器
7000=新建自动化
7001=编辑自动化
7002=如果
HDL-ON_iOS/Resources/Phone/PirIcon/Infraredtreasure.png
HDL-ON_iOS/Resources/Phone/PirIcon/adddevice.png
HDL-ON_iOS/Resources/Phone/PirIcon/addlbuton.png
HDL-ON_iOS/Resources/Phone/PirIcon/air.png
HDL-ON_iOS/Resources/Phone/PirIcon/custom.png
HDL-ON_iOS/Resources/Phone/PirIcon/del.png
HDL-ON_iOS/Resources/Phone/PirIcon/delbuton.png
HDL-ON_iOS/Resources/Phone/PirIcon/dropdown.png
HDL-ON_iOS/Resources/Phone/PirIcon/dvd.png
HDL-ON_iOS/Resources/Phone/PirIcon/fan.png
HDL-ON_iOS/Resources/Phone/PirIcon/next.png
HDL-ON_iOS/Resources/Phone/PirIcon/offline.png
HDL-ON_iOS/Resources/Phone/PirIcon/online.png
HDL-ON_iOS/Resources/Phone/PirIcon/priequipment.png
HDL-ON_iOS/Resources/Phone/PirIcon/projector.png
HDL-ON_iOS/Resources/Phone/PirIcon/search.png
HDL-ON_iOS/Resources/Phone/PirIcon/stb.png
HDL-ON_iOS/Resources/Phone/PirIcon/tv.png
HDL_ON/.DS_Store
Binary files differ
HDL_ON/Common/R.cs
@@ -669,6 +669,69 @@
        public const int qqMsuicTip = 5047;
        public const int zhengchang = 6000;
        public const int shebeizhuangtai = 6001;
        public const int ge = 6002;
        public const int dangqianhongwaishebei = 6003;
        public const int yitianjiayaokongqi = 6004;
        public const int kongtiao = 6005;
        public const int dianshi = 6006;
        public const int fengshan = 6007;
        public const int jidinghe = 6008;
        public const int dvd = 6009;
        public const int touyingyi = 6010;
        public const int zidingyi = 6011;
        public const int hongwaiyaokong = 6012;
        public const int shebeigaunli = 6013;
        public const int tianjiayaokongqi = 6014;
        public const int zaixianhwb= 6015;
        public const int lixian = 6016;
        public const int banbenhao = 6017;
        public const int shuruyaokongqimingcheng = 6018;
        public const int fengleichazhao = 6019;
        public const int tuijiananjian = 6020;
        public const int anjianmingcheng = 6021;
        public const int xiayibu= 6022;
        public const int dianyuan = 6023;
        public const int yinliangjia = 6024;
        public const int yinliangjian = 6025;
        public const int pindaojia = 6026;
        public const int pindaojian = 6027;
        public const int shang = 6028;
        public const int xia = 6029;
        public const int zuo = 6030;
        public const int you = 6031;
        public const int jingyin = 6032;
        public const int queren = 6034;
        public const int bofang = 6035;
        public const int tuichu = 6037;
        public const int caidan = 6038;
        public const int zanting = 6039;
        public const int fanhui = 6040;
        public const int tingzhi = 6041;
        public const int zhuye = 6042;
        public const int kuaijin = 6043;
        public const int kuaitui = 6044;
        public const int dingshi = 6045;
        public const int fuzhiyaokonggongnneg = 6046;
        public const int duizhunanxiaanniu = 6047;
        public const int zhinengyaokongqi = 6048;
        public const int tianjiaanniu = 6049;
        public const int paixu = 6050;
        public const int wancheng = 6051;
        public const int tianjiachenggong = 6052;
        public const int kedaofenlei = 6053;
        public const int suoshufenlei = 6054;
        public const int yaokongqimingcheng = 6055;
        public const int suoshuquyu = 6056;
        public const int jixutianjia = 6057;
        public const int dianqi = 6058;
        public const int tianjiashibai = 6059;
        public const int chongshii = 6060;
        public const int newAutomation = 7000;
        public const int editAutomation = 7001;
        public const int ifCondition = 7002;
HDL_ON/DAL/Server/NewAPI.cs
@@ -469,6 +469,32 @@
        /// </summary>
        public const string Api_Post_GetBrandList = "/home-wisdom/app/product/brand/list";
        #region ■  -- 红外宝接口___________________________
        /// <summary>
        /// 红外宝设备定位
        /// </summary>
        public const string API_POST_Ir_DeviceFind = "/home-wisdom/app/device/ir/deviceFind";
        /// <summary>
        /// 红外宝下的遥控器列表
        /// </summary>
        public const string API_POST_Ir_List = ":/home-wisdom/app/device/ir/list";
        /// <summary>
        /// 遥控器红外码学习
        /// </summary>
        public const string API_POST_Ir_CodeStudy = "/home-wisdom/app/device/ir/codeStudy";
        /// <summary>
        ///红外宝红外码库试码
        /// </summary>
        public const string API_POST_Ir_CodeTest = "/home-wisdom/app/device/ir/codeTest";
        /// <summary>
        /// 红外宝遥控器添加
        /// </summary>
        public const string API_POST_Ir_Add = "/home-wisdom/app/device/ir/add";
        /// <summary>
        /// 遥控器自学按键删除
        /// </summary>
        public const string API_POST_Ir_CodeRemove = "/home-wisdom/app/device/ir/codeRemove";
        #endregion
        #endregion
HDL_ON/HDL_ON.projitems
@@ -339,6 +339,23 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmSensor\SensorSmokePage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\DeviceFunction.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Entity\Enumerative\ClothsHangerEnum.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\PirMain.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\TopView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\BrandList.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\BrandListView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\DeviceSet.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\TipView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddButton.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\SaveView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\Buttons.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Pir.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\PirSend.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\AddControlComplete.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PatchView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Method.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FailView.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ReplicationView.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)UI\" />
@@ -376,5 +393,7 @@
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\" />
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Integratedbrand\" />
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmSensor\" />
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\" />
    <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\" />
  </ItemGroup>
</Project>
HDL_ON/UI/.DS_Store
Binary files differ
HDL_ON/UI/CSS/CSS.cs
@@ -110,6 +110,8 @@
        public const uint viewTrans60lucence = 0x60000000;
        public const uint viewTranslucence = 0x00000000;
        public const uint textTipColor = 0XFF798394;
        public const uint text1Color = 0XFF4E586A;
        #endregion
        #endregion
HDL_ON/UI/UI2/.DS_Store
Binary files differ
HDL_ON/UI/UI2/3-Intelligence/Automation/.DS_Store
Binary files differ
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -281,16 +281,22 @@
                            value = "off";
                        }
                        break;
                    case StringId.youren:
                    case StringId.kaiqi:
                        {
                    case StringId.youren: {
                            value = "true";
                        }
                        break;
                    case StringId.wuren:
                    case StringId.wuren: {
                            value = "false";
                        }
                        break;
                    case StringId.kaiqi:
                        {
                            value = "open";
                        }
                        break;
                    case StringId.bihe:
                        {
                            value = "false";
                            value = "close";
                        }
                        break;
                    case StringId.zaixian: {
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -260,9 +260,12 @@
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var page = new ThirdPartyBrandListPage();
                // var page = new ThirdPartyBrandListPage();
                // MainPage.BasePageView.AddChidren(page);
                // page.LoadPage();
                var page = new UI2.PersonalCenter.PirDevice.PirMain();
                MainPage.BasePageView.AddChidren(page);
                page.LoadPage();
                page.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            btnResidenceAddFunctionIcon.MouseUpEventHandler = eventHandler;
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs
New file
@@ -0,0 +1,179 @@
using System;
using System.Collections.Generic;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class AddButton : FrameLayout
    {
        public AddButton()
        {
            Tag = "Pir";
        }
        public void Show(Control control)
        {
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
            PirDevice.View.TopView topView = new View.TopView();
            topView.topNameBtn.TextID = StringId.tianjiayaokongqi;
            this.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); };
            FrameLayout editfLayout = new FrameLayout
            {
                Y = topView.frameLayout.Bottom,
                BackgroundColor = CSS.CSS_Color.textWhiteColor,
                Height = Application.GetRealHeight(152),
                Width = Application.GetRealWidth(375),
            };
            this.AddChidren(editfLayout);
            //线
            Button lineBtn = new Button
            {
                Y = Application.GetRealHeight(43),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(375 - 16 * 2),
                Height = 1,
                BackgroundColor = CSS.CSS_Color.viewLine,
            };
            editfLayout.AddChidren(lineBtn);
            //请输入按键名称
            EditText editText = new EditText()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(375 - 16 * 2),
                Height = Application.GetRealHeight(44),
                PlaceholderText = Language.StringByID(StringId.anjianmingcheng),
                PlaceholderTextColor = CSS.CSS_Color.textCancelColor,
                TextColor = CSS.CSS_Color.textColor,
                TextSize = TextSize.text14,
                TextAlignment = TextAlignment.CenterLeft,
            };
            editfLayout.AddChidren(editText);
            //下一步
            Button saveBtn = new Button
            {
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(44),
                Y = Application.GetRealHeight(92),
                X = Application.GetRealWidth(78),
                TextID = StringId.xiayibu,
                TextSize = TextSize.text16,
                TextColor = CSS.CSS_Color.textWhiteColor,
                TextAlignment = TextAlignment.Center,
                BackgroundColor = CSS.CSS_Color.btnSaveBackgroundColor,
                Radius = (uint)Application.GetRealHeight(22),
            };
            editfLayout.AddChidren(saveBtn);
            FrameLayout fLayout = new FrameLayout
            {
                Y = editfLayout.Bottom + Application.GetRealHeight(8),
                Height = Application.GetRealHeight(667 - 64 - 152 - 8),
                Width = Application.GetRealWidth(375),
                BackgroundColor = CSS.CSS_Color.textWhiteColor,
            };
            this.AddChidren(fLayout);
            //推荐按键
            Button titleBtn = new Button
            {
                Y = Application.GetRealHeight(12),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(20),
                TextID = StringId.tuijiananjian,
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.text1Color,
                TextAlignment = TextAlignment.CenterLeft,
            };
            fLayout.AddChidren(titleBtn);
            //动态加载Button按钮父控件
            FrameLayout buttonFLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(32),
                Height = Application.GetRealHeight(667 - 64 - 152 - 8 - 12 - 20),
                Width = Application.GetRealWidth(375),
            };
            fLayout.AddChidren(buttonFLayout);
            #endregion
            View.Buttons buttons = new View.Buttons();
            var buttonNameList = buttons.GetList("默认按钮");
            buttons.AddButton(buttonFLayout, buttonNameList, (s) =>
            {
                editText.Text = s;
#if __Android__
                editText.SetSelectionEnd();
#endif
            });
            ///下一步的点击事件
            saveBtn.MouseUpEventHandler += (sender, e) =>
            {
                var texts = editText.Text.Trim();
                if (string.IsNullOrEmpty(editText.Text))
                {
                    //名称不能为空
                    return;
                }
                var butName = Pir.BuottonList.Find((c) => c.value == texts);
                if (butName != null)
                {
                    //名称已经存在
                    return;
                }
                //new引导界面
                View.ReplicationView replication = new View.ReplicationView();
                replication.Show();
                //添加数据对象
                ButtonObj buttonObj = new ButtonObj();
                buttonObj.Key = "key" + Pir.BuottonList.Count.ToString();
                buttonObj.value = texts;
                PirSend.CodeStudy(buttonObj, (responsePackNew) =>
                {
                    ///这里:监听MTTP推送下来主题,才知道是否添加成功
                    ///
                    //休眠是为显示引导界面
                      System.Threading.Thread.Sleep(5000);
                    //移除添加按钮引导界面
                    replication.RemView();
                    //if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
                    //{
                    var buttonName = Pir.BuottonList.Find((c) => c.value == buttonObj.value);
                    if (buttonName == null)
                    {
                        //添加数据
                        Pir.BuottonList.Add(buttonObj);
                    }
                    //移除添加按钮界面
                    this.RemoveFromParent();
                    for (int i = MainPage.BasePageView.ChildrenCount - 1; 0 <= i; i--)
                    {
                        var view = MainPage.BasePageView.GetChildren(i);
                        if (view.GetType() == typeof(AddControl))
                        {
                            view.RemoveFromParent();
                        }
                    }
                    //加载数据界面
                    AddControl addControl = new AddControl();
                    MainPage.BasePageView.AddChidren(addControl);
                    addControl.Show(control);
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                    //}
                    //else
                    //{
                    //    PirSend.Error(responsePackNew);
                    //}
                });
            };
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
New file
@@ -0,0 +1,279 @@
using System;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
using System.Collections.Generic;
using System.Text;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class AddControl : FrameLayout
    {
        public AddControl()
        {
            Tag = "Pir";
        }
        public void Show(Control control)
        {
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
            PirDevice.View.TopView topView = new View.TopView();
            topView.topNameBtn.TextID = StringId.zhinengyaokongqi;
            topView.topIconBtn.Visible = true;
            topView.topIconBtn.UnSelectedImagePath = "PirIcon/del.png";
            this.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
            {
                this.RemoveFromParent();
            };
            #region 添加按钮
            FrameLayout addLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(84),
                Width = Application.GetRealWidth(TextSize.view375),
            };
            this.AddChidren(addLayout);
            Button addBtn = new Button
            {
                Width = Application.GetRealWidth(344),
                Height = Application.GetRealHeight(44),
                Y = Application.GetRealHeight(24),
                X = Application.GetRealWidth(16),
                TextID = StringId.tianjiaanniu,
                TextSize = TextSize.text16,
                TextColor = CSS.CSS_Color.btnSaveBackgroundColor,
                BorderColor = CSS.CSS_Color.btnSaveBackgroundColor,
                BorderWidth = 1,
                Radius = (uint)Application.GetRealHeight(22),
            };
            addLayout.AddChidren(addBtn);
            #endregion
            FrameLayout frameLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64 + 84),
                Height = Application.GetRealHeight(667 - 64 - 84),
                Width = Application.GetRealWidth(TextSize.view375),
            };
            this.AddChidren(frameLayout);
            #region 保存
            FrameLayout saveLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(667 - 104),
                Height = Application.GetRealHeight(104),
                Width = Application.GetRealWidth(TextSize.view375),
                BackgroundColor = CSS.CSS_Color.viewLine,
            };
            this.AddChidren(saveLayout);
            saveLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            Button paixuBtn = new Button
            {
                Width = Application.GetRealWidth(375 - 16 * 2),
                Height = Application.GetRealHeight(20),
                Y = Application.GetRealHeight(12),
                X = Application.GetRealWidth(16),
                TextID = StringId.paixu,
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textTipColor,
            };
            saveLayout.AddChidren(paixuBtn);
            Button saveBtn = new Button
            {
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(44),
                Y = paixuBtn.Bottom + Application.GetRealHeight(12),
                X = Application.GetRealWidth(78),
                TextID = StringId.save,
                TextSize = TextSize.text16,
                TextColor = CSS.CSS_Color.textWhiteColor,
                TextAlignment = TextAlignment.Center,
                BackgroundColor = CSS.CSS_Color.btnSaveBackgroundColor,
                Radius = (uint)Application.GetRealHeight(22),
            };
            saveLayout.AddChidren(saveBtn);
            #endregion
            VerticalScrolViewLayout vv = new VerticalScrolViewLayout();
            frameLayout.AddChidren(vv);
            RefreshView(vv, false);
            #endregion
            #region  界面点击事件
            //删除点击事件
            topView.clickSetBtn.MouseUpEventHandler += (sender, e) =>
            {
                topView.clickSetBtn.IsSelected = !topView.clickSetBtn.IsSelected;
                if (topView.clickSetBtn.IsSelected)
                {
                    topView.topIconBtn.UnSelectedImagePath = "";
                    topView.topIconBtn.Text = Language.StringByID(StringId.wancheng);
                    topView.topIconBtn.TextSize = TextSize.text14;
                    topView.topIconBtn.TextColor = CSS.CSS_Color.textColor;
                    RefreshView(vv, true);
                }
                else
                {
                    topView.topIconBtn.UnSelectedImagePath = "PirIcon/del.png";
                    topView.topIconBtn.Text = "";
                    RefreshView(vv, false);
                }
            };
            //添加按钮点击事件
            addBtn.MouseUpEventHandler += (sender, e) =>
            {
                AddButton addButton = new AddButton();
                MainPage.BasePageView.AddChidren(addButton);
                addButton.Show(control);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            //保存点击事件
            saveBtn.MouseUpEventHandler += (sender, e) =>
            {
               //移除当前界面
                this.RemoveFromParent();
                //可能之前已经存在该界面
                for (int i = MainPage.BasePageView.ChildrenCount - 1; 0 <= i; i--)
                {
                    var view = MainPage.BasePageView.GetChildren(i);
                    if (view.GetType() == typeof(AddControlComplete))
                    {
                        view.RemoveFromParent();
                    }
                }
                //MainPage.BasePageView.RemoveViewByTag("Pir");
                AddControlComplete addControlComplete = new AddControlComplete();
                MainPage.BasePageView.AddChidren(addControlComplete);
                addControlComplete.Show(control);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            #endregion
        }
        /// <summary>
        /// 加载按钮控件View的方法
        /// </summary>
        /// <param name="vv">上下滑动控件</param>
        /// <param name="if_bool">表示是否显示删除图标</param>
        void RefreshView(VerticalScrolViewLayout vv, bool if_bool)
        {
            vv.RemoveAll();
            //定义一个变量记录行数
            int sum = 0;
            if (Pir.BuottonList.Count % 3 == 0)
            {
                sum = Pir.BuottonList.Count / 3;
            }
            else
            {
                sum = Pir.BuottonList.Count / 3 + 1;
            }
            //计算加载出来的数据需要的高度
            int h = 16 + sum * (16 + 44) + 104 + 76;
            int line = 0;
            //按钮的父控件
            var FLayout = new FrameLayout
            {
                Height = Application.GetRealWidth(h),
            };
            vv.AddChidren(FLayout);
            for (int i = 1, j = 0; i <= Pir.BuottonList.Count; i++, j++)
            {
                var nameObj = Pir.BuottonList[i - 1];
                //按钮
                var buttonNameBtn = new Button
                {
                    Y = Application.GetRealHeight(16 + line * (16 + 44)),
                    X = Application.GetRealWidth(16 + (16 + 104) * j),
                    Width = Application.GetRealWidth(104),
                    Height = Application.GetRealHeight(44),
                    Text = nameObj.value,
                    TextSize = TextSize.text16,
                    TextColor = CSS.CSS_Color.textColor,
                    TextAlignment = TextAlignment.Center,
                    Radius = (uint)Application.GetRealHeight(18),
                    BorderWidth = 1,
                    BorderColor = CSS.CSS_Color.textCancelColor,
                };
                FLayout.AddChidren(buttonNameBtn);
                //删除图标
                var delIconBtn = new Button
                {
                    UnSelectedImagePath = "PirIcon/delbuton.png",
                    Y = Application.GetRealHeight(12 + line * (16 + 44)),
                    X = Application.GetRealWidth((16 + 92) + (104 + 16) * j),
                    Width = Application.GetRealWidth(16),
                    Height = Application.GetRealWidth(16),
                    Tag = nameObj,
                };
                if (if_bool)
                {
                    FLayout.AddChidren(delIconBtn);
                }
                //删除图标的点击事件
                delIconBtn.MouseUpEventHandler += (sender, e) =>
                {
                    var obj = delIconBtn.Tag as ButtonObj;
                    //加载log
                    Loading loading = new Loading();
                    this.AddChidren(loading);
                    HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null;
                    loading.Start();
                    new System.Threading.Thread(() =>
                    {
                        try
                        {
                            //发送按键删除;
                            responsePackNew = PirSend.CodeRemove(obj);
                        }
                        catch { }
                        finally
                        {
                            Application.RunOnMainThread(() =>
                            {
                                loading.Hide();
                                if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
                                {
                                    ///这里:监听MTTP推送下来主题,才知道是否添加成功
                                    var buttonObj = Pir.BuottonList.Find((c) => c.value == obj.value);
                                    if (buttonObj != null)
                                    {
                                        Pir.BuottonList.Remove(buttonObj);
                                    }
                                    RefreshView(vv, true);
                                }
                                else {
                                    Method method = new Method();
                                    method.ErrorShow(responsePackNew);
                                }
                            });
                        }
                    })
                    { IsBackground = true }.Start();
                };
                if (i % 3 == 0)
                {
                    //满一行重置j=0值;
                    j = -1;
                    line += 1;
                }
            }
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
New file
@@ -0,0 +1,121 @@
using System;
using System.Collections.Generic;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class AddControlComplete:FrameLayout
    {
        public AddControlComplete()
        {
            Tag = "Pir";
        }
        public void Show(Control control) {
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
            PirDevice.View.TopView topView = new View.TopView();
            topView.topNameBtn.TextID = StringId.tianjiayaokongqi;
            this.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); };
            FrameLayout fLayout = new FrameLayout
            {
                Y =Application.GetRealHeight(64),
                BackgroundColor = CSS.CSS_Color.textWhiteColor,
                Height = Application.GetRealHeight(224),
                Width = Application.GetRealWidth(375),
            };
            this.AddChidren(fLayout);
            //
            Button iconBtn = new Button
            {
                Y = Application.GetRealHeight(28),
                X = Application.GetRealWidth(137),
                Width = Application.GetRealWidth(102),
                Height = Application.GetRealWidth(102),
                UnSelectedImagePath = "PirIcon/succeed.png",
            };
            fLayout.AddChidren(iconBtn);
            //添加成功
            Button text1Btn = new Button
            {
                Width = Application.GetRealWidth(375-32),
                Height = Application.GetRealHeight(22),
                Y = Application.GetRealHeight(158),
                X = Application.GetRealWidth(16),
                TextID = StringId.tianjiachenggong,
                TextSize = TextSize.text16,
                TextColor = CSS.CSS_Color.btnSaveBackgroundColor,
                TextAlignment = TextAlignment.Center,
            };
            fLayout.AddChidren(text1Btn);
            //可到分类-功能-电器操作使用
            Button text2Btn = new Button
            {
                Width = Application.GetRealWidth(375 - 32),
                Height = Application.GetRealHeight(22),
                Y = Application.GetRealHeight(188),
                X = Application.GetRealWidth(16),
                TextID = StringId.kedaofenlei,
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textTipColor,
                TextAlignment = TextAlignment.Center,
            };
            fLayout.AddChidren(text2Btn);
            //所属分类
            View.PatchView fenlei = new View.PatchView();
            fenlei.frameLayout.Y = fLayout.Bottom+ Application.GetRealHeight(8);
            this.AddChidren(fenlei.FLayoutView(false));
            fenlei.btnText1.TextID = StringId.suoshufenlei;
            fenlei.btnText2.TextID = StringId.dianqi;
            //遥控器名称
            View.PatchView namePatchView = new View.PatchView();
            namePatchView.frameLayout.Y = fenlei.frameLayout.Bottom;
            this.AddChidren(namePatchView.FLayoutView());
            namePatchView.btnText1.TextID = StringId.yaokongqimingcheng;
            namePatchView.btnText2.Text = control.name;
            //所属区域
            View.PatchView quyuPatchView = new View.PatchView();
            quyuPatchView.frameLayout.Y = namePatchView.frameLayout.Bottom;
            this.AddChidren(quyuPatchView.FLayoutView());
            quyuPatchView.btnText1.TextID = StringId.suoshuquyu;
            quyuPatchView.btnText2.TextID = StringId.dianqi;
            //继续添加
            Button addBtn = new Button
            {
                Y = quyuPatchView.frameLayout.Bottom + Application.GetRealHeight(125),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(375-32),
                Height = Application.GetRealHeight(20),
                TextID = StringId.jixutianjia,
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textConfirmColor,
                TextAlignment = TextAlignment.Center,
            };
            this.AddChidren(addBtn);
            //完成
            View.SaveView saveView = new View.SaveView();
            this.AddChidren(saveView.FLayoutView());
            saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            #endregion
            #region  界面点击事件
            //遥控器名称点击事件
            namePatchView.btnClick.MouseUpEventHandler += (sender,e) => { };
            //所属区域点击事件
            quyuPatchView.btnClick.MouseUpEventHandler += (sender, e) => { };
            //继续添加点击事件
            addBtn.MouseUpEventHandler += (sender, e) => {
                Method method = new Method();
                method.AddControl();
            };
            //完成点击事件
            saveView.btnClick.MouseUpEventHandler += (sender, e) => {
                MainPage.BasePageView.RemoveViewByTag("AddControl");
                MainPage.BasePageView.RemoveViewByTag("Pir");
            };
            #endregion
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs
copy from HDL_ON/UI/UI2/3-Intelligence/Automation/EmptyClass.cs copy to HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs
File was copied from HDL_ON/UI/UI2/3-Intelligence/Automation/EmptyClass.cs
@@ -4,20 +4,21 @@
using System.Collections.Generic;
using System.Text;
namespace HDL_ON.UI.UI2.Intelligence.Automation
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class EmptyClass : FrameLayout
    public class BrandList : FrameLayout
    {
        public BrandList()
        {
            Tag = "PirView";
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="list">表示该列表元素A-Z字母筛选显示出来</param>
        /// <param name="list6">表示该列表元素显示在list前面(该列表元素不做A-Z字母筛选),没有可以为list6=null</param>
        /// <param name="action">返回选中文本</param>
        public void Show(List<string> list, List<string> list6, Action<string> action)
        public void Show(List<string> list, List<string> list6)
        {
            //string text = "30";
            //byte[] bytes = new byte[text.Length / 2];
            //for (int i = 0, j = 0; i < bytes.Length; j += 2, i++)
@@ -27,8 +28,6 @@
            //}
            ////把byte数组转换成文字
            //string str = System.Text.Encoding.UTF8.GetString(bytes);
            var frameLayout = new FrameLayout
            {
                BackgroundColor = CSS.CSS_Color.viewTop,
@@ -59,7 +58,14 @@
                UnSelectedImagePath = "LogicIcon/back.png",
            };
            frameLayout.AddChidren(backBtn);
            backBtn.MouseUpEventHandler += (sen, e) =>
            var clickBackBtn = new Button
            {
                Width = Application.GetRealWidth(12+16+20),
                Height = Application.GetRealWidth(20+20),
                Y = Application.GetRealHeight(32),
            };
            frameLayout.AddChidren(clickBackBtn);
            clickBackBtn.MouseUpEventHandler += (sen, e) =>
            {
                this.RemoveFromParent();
            };
@@ -86,16 +92,7 @@
            };
            this.AddChidren(fram);
            //var list11 = new List<string> {
            //   "爱你", "哎呦","埃及","哈弗换壳哈弗", "爱德华多v","俺几个疯了",
            //    "拜了", "巴士", "百夫",  "百合地理课你打算", "不度老骥伏枥", "比到九点",
            //    "车站","测试","此地", "才看见好得快","吃软饭","从看见二十多",
            //   "等待机会吧","的客户", "多喝点", "登记哦然后", "打电话",
            //     "恩肤霜看就看了", "饿死os","恶魔城","儿科联动", "恩六颗子弹拉拉裤洗澡了","发大学生发发",
            //    "真厉害i发多少", "知道你付款了发", "尬酒回复",  "改进的话", "天天速度回答", "太好了开车",
            //    "减肥的看过","桡出口处那","如果觉得", "很舒服的","吃软饭","从看见二十多",
            //   "龙卷风亏大发","去好看", "多喝点", "好浪费好", "打电话"};
            if (list == null)
            {
                list = new List<string>();
@@ -105,10 +102,7 @@
                list6 = new List<string>();
            }
            var list1 = GetDateList(list);
            list1.Add("1");
            list1.InsertRange(0, list6);
            var vv = new VerticalScrolViewLayout();
            fram.AddChidren(vv);
@@ -125,10 +119,9 @@
                        listStr.Add(s);
                    }
                }
                RefreshLayout(vv, listStr, action);
                RefreshLayout(vv, listStr);
            };
            #region A-Z
@@ -140,7 +133,7 @@
                Width = Application.GetRealWidth(10 + 6),
            };
            fram.AddChidren(a_zFra);
            var list2 = GetList();
            var list2 = GetList();
            for (int i = 0; i < list2.Count; i++)
            {
@@ -183,11 +176,7 @@
            }
            #endregion
            RefreshLayout(vv, list1,action);
            RefreshLayout(vv, list1);
        }
        /// <summary>
@@ -195,7 +184,7 @@
        /// </summary>
        /// <param name="vv">父控件</param>
        /// <param name="list">显示列表</param>
        private void RefreshLayout(VerticalScrolViewLayout vv, List<string> list,Action<string> action)
        private void RefreshLayout(VerticalScrolViewLayout vv, List<string> list)
        {
            vv.RemoveAll();
            foreach (var str in list)
@@ -235,10 +224,10 @@
                vv.AddChidren(rowLayout);
                clickBtn.MouseUpEventHandler += (sen, e) =>
                {
                    //找到索引值
                    var index = list.IndexOf(clickBtn.Tag.ToString());
                    ////找到索引值
                    //var index = list.IndexOf(clickBtn.Tag.ToString());
                    this.RemoveFromParent();
                    //this.RemoveFromParent();
                };
            }
@@ -261,7 +250,6 @@
                return false;
            }
        }
        /// <summary>
        /// 获取显示列表
        /// </summary>
@@ -300,7 +288,6 @@
            }
            return list;
        }
        /// <summary>
        /// 获取A-Z字母列表
        /// </summary>
@@ -321,7 +308,6 @@
            }
            return list;
        }
        /// <summary>
        /// 获取汉字首字母
        /// </summary>
@@ -346,34 +332,7 @@
                iCnChar = i1 * 256 + i2;
            }
            //expresstion
            //table of the constant list
            // 'A'; //45217..45252
            // 'B'; //45253..45760
            // 'C'; //45761..46317
            // 'D'; //46318..46825
            // 'E'; //46826..47009
            // 'F'; //47010..47296
            // 'G'; //47297..47613
            // 'H'; //47614..48118
            // 'J'; //48119..49061
            // 'K'; //49062..49323
            // 'L'; //49324..49895
            // 'M'; //49896..50370
            // 'N'; //50371..50613
            // 'O'; //50614..50621
            // 'P'; //50622..50905
            // 'Q'; //50906..51386
            // 'R'; //51387..51445
            // 'S'; //51446..52217
            // 'T'; //52218..52697
            //没有U,V
            // 'W'; //52698..52979
            // 'X'; //52980..53640
            // 'Y'; //53689..54480
            // 'Z'; //54481..55289
            // iCnChar match the constant 
            if ((iCnChar >= 45217) && (iCnChar <= 45252))
@@ -473,3 +432,4 @@
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs
New file
@@ -0,0 +1,244 @@
using System;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
using System.Collections.Generic;
using System.Text;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class DeviceSet : FrameLayout
    {
        public DeviceSet()
        {
            Tag = "PirView";
        }
        public void Show() {
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
            PirDevice.View.TopView topView = new View.TopView();
            topView.topNameBtn.TextID = StringId.shebeigaunli;
            topView.topIconBtn.Visible = true;
            this.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); };
            VerticalScrolViewLayout vv = new VerticalScrolViewLayout();
            vv.Height = Application.GetRealHeight(667 - 64);
            vv.Y = Application.GetRealHeight(64);
            this.AddChidren(vv);
            #endregion
            int a = 3;
            int b = 3;
            for (int i = 0; i < b; i++)
            {
                #region 红外宝图标 版本号 名称 状态
                FrameLayout fLayout = new FrameLayout
                {
                    Width = Application.GetRealWidth(375),
                    Height = Application.GetRealHeight(12+92+(50* a)),
                };
                vv.AddChidren(fLayout);
                //红外宝显示父控件
                FrameLayout devfLayout = new FrameLayout
                {
                    Y = Application.GetRealHeight(12),
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(375-16*2),
                    Height = Application.GetRealHeight(92 + (50 * a)),
                    BackgroundColor = CSS.CSS_Color.view,
                    Radius = (uint)Application.GetRealHeight(12),
                };
                fLayout.AddChidren(devfLayout);
                //红外宝图标
                Button priequipmentBtn = new Button
                {
                    Y=Application.GetRealHeight(16),
                    X = Application.GetRealWidth(5),
                    Width = Application.GetRealWidth(60),
                    Height = Application.GetRealWidth(60),
                    UnSelectedImagePath = "PirIcon/priequipment.png",
                    TextAlignment = TextAlignment.Center,
                };
                devfLayout.AddChidren(priequipmentBtn);
                //红外宝名称
                Button deviceNameBtn = new Button
                {
                    Y=Application.GetRealHeight(16),
                    X = priequipmentBtn.Right + Application.GetRealWidth(7),
                    Width = Application.GetRealWidth(120),
                    Height = Application.GetRealHeight(20),
                    Text = "红外宝A"+i.ToString(),
                    TextAlignment = TextAlignment.CenterLeft,
                    TextSize = TextSize.text14,
                    TextColor = CSS.CSS_Color.textColor,
                    IsBold = true,
                };
                devfLayout.AddChidren(deviceNameBtn);
                //版本号
                Button versionBtn = new Button
                {
                    Y = deviceNameBtn.Bottom+ Application.GetRealHeight(4),
                    X = priequipmentBtn.Right + Application.GetRealWidth(7),
                    Width = Application.GetRealWidth(120),
                    Height = Application.GetRealHeight(17),
                    Text = "版本号v1.3.5",
                    TextAlignment = TextAlignment.CenterLeft,
                    TextSize = TextSize.text12,
                    TextColor = CSS.CSS_Color.textCancelColor,
                };
                devfLayout.AddChidren(versionBtn);
                // 5/10
                Button geBtn = new Button
                {
                    Y = versionBtn.Bottom + Application.GetRealHeight(2),
                    X = priequipmentBtn.Right + Application.GetRealWidth(7),
                    Width = Application.GetRealWidth(120),
                    Height = Application.GetRealHeight(17),
                    Text = "2",
                    TextAlignment = TextAlignment.CenterLeft,
                    TextSize = TextSize.text12,
                    TextColor = CSS.CSS_Color.textConfirmColor,
                };
                devfLayout.AddChidren(geBtn);
                geBtn.Width = geBtn.GetTextWidth();
                // 5/10
                Button sumBtn = new Button
                {
                    Y = versionBtn.Bottom + Application.GetRealHeight(2),
                    X = geBtn.Right,
                    Width = Application.GetRealWidth(20),
                    Height = Application.GetRealHeight(17),
                    Text ="/10",
                    TextAlignment = TextAlignment.CenterLeft,
                    TextSize = TextSize.text12,
                    TextColor = CSS.CSS_Color.textCancelColor,
                };
                devfLayout.AddChidren(sumBtn);
                //状态图标
                Button stateIconBtn = new Button
                {
                    Y =Application.GetRealHeight(23),
                    X = Application.GetRealWidth(291),
                    Width = Application.GetRealWidth(8),
                    Height = Application.GetRealWidth(8),
                    UnSelectedImagePath = "PirIcon/online.png",
                };
                devfLayout.AddChidren(stateIconBtn);
                //红外宝状态(在线-离线)
                Button stateTextBtn = new Button
                {
                    Y = Application.GetRealHeight(18),
                    X = Application.GetRealWidth(303),
                    Width = Application.GetRealWidth(30),
                    Height = Application.GetRealHeight(17),
                    TextID=StringId.zaixianhwb,
                    TextAlignment = TextAlignment.CenterLeft,
                    TextSize = TextSize.text12,
                    TextColor = 0xFF67D569,// CSS.CSS_Color.textColor,
                    IsBold=true,
                };
                devfLayout.AddChidren(stateTextBtn);
                //线
                Button lineBtn = new Button
                {
                    Y = Application.GetRealHeight(92)-1,
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(343-16*2),
                    Height =1,
                    BackgroundColor = CSS.CSS_Color.viewLine,
                };
                devfLayout.AddChidren(lineBtn);
                if (b - 1 == i)
                {
                    //最后一个后面增加间隔背景
                    vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(20) });
                }
                #endregion
                for (int j = 0; j < a; j++) {
                    RowLayout funControlRow = new RowLayout
                    {
                        Y = Application.GetRealHeight(92 + (50 * j)),
                        Width = Application.GetRealWidth(375 - 16 * 2),
                        Height = Application.GetRealHeight(50),
                        LineColor = CSS.CSS_Color.textWhiteColor,
                        SubViewWidth=Application.GetRealWidth(68),
                    };
                    devfLayout.AddChidren(funControlRow);
                    //遥控器名称
                    Button nameBtn = new Button
                    {
                        X = Application.GetRealWidth(16),
                        Width = Application.GetRealWidth(150),
                        Height = Application.GetRealHeight(20),
                        Text =j.ToString(),
                        TextAlignment=TextAlignment.CenterLeft,
                        TextSize = TextSize.text14,
                        TextColor = CSS.CSS_Color.textColor,
                        Gravity=Gravity.CenterVertical,
                    };
                    funControlRow.AddChidren(nameBtn);
                    //遥控器区域
                    Button areaBtn = new Button
                    {
                        X=Application.GetRealWidth(311+16-(40+100)),
                        Width = Application.GetRealWidth(100),
                        Height = Application.GetRealHeight(17),
                        Text = j.ToString(),
                        TextAlignment = TextAlignment.CenterRight,
                        TextSize = TextSize.text12,
                        TextColor = CSS.CSS_Color.textCancelColor,
                        Gravity =Gravity.CenterVertical,
                    };
                    funControlRow.AddChidren(areaBtn);
                    //下一级图标
                    Button nextIconBtn = new Button
                    {
                        X = Application.GetRealWidth(295+16),
                        Width = Application.GetRealWidth(16),
                        Height = Application.GetRealWidth(16),
                        UnSelectedImagePath = "PirIcon/next.png",
                        Gravity = Gravity.CenterVertical,
                    };
                    funControlRow.AddChidren(nextIconBtn);
                    //删除
                    Button delBtn = new Button
                    {
                        Width = Application.GetRealWidth(50),
                        Height = Application.GetRealHeight(22),
                        TextID = StringId.Del,
                        TextAlignment = TextAlignment.Center,
                        TextSize = TextSize.text16,
                        TextColor = CSS.CSS_Color.textWhiteColor,
                        IsBold=true,
                        BackgroundColor= CSS.CSS_Color.textRedColor,
                    };
                    funControlRow.AddRightView(delBtn);
                    //线
                    Button line1Btn = new Button
                    {
                        Y = Application.GetRealHeight(50 - 2),
                        X = Application.GetRealWidth(16),
                        Width = Application.GetRealWidth(311),
                        Height = 1,
                        BackgroundColor = CSS.CSS_Color.viewLine,
                    };
                    funControlRow.AddChidren(line1Btn);
                    if (j == a - 1)
                    {
                        //最后改变一个线的颜色
                        line1Btn.BackgroundColor = CSS.CSS_Color.viewTranslucence;
                        funControlRow.LineColor = CSS.CSS_Color.viewTranslucence;
                    }
                    delBtn.MouseUpEventHandler += (sender,e) => {
                    };
                }
            }
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs
New file
@@ -0,0 +1,101 @@
using System;
using HDL_ON.DAL.Server;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class Method
    {
        /// <summary>
        /// 添加遥控器的方法
        /// </summary>
        public void AddControl()
        {
            View.TipView tipView = new View.TipView();
            tipView.InputBox("", (s, dialog) =>
            {
                ///清除之前列表数据
                Pir.BuottonList.Clear();
                if (!string.IsNullOrEmpty(s))
                {
                    Control control = new Control();
                    control.name = s;
                    control.type = "learn";
                    ThreadAddControl(control,dialog);
                }
            },false);
        }
        /// <summary>
        /// 发送遥控器命令方法
        /// </summary>
        /// <param name="control"></param>
        /// <param name="dialog"></param>
        public void ThreadAddControl(Control control, Dialog dialog) {
            DAL.Server.ResponsePackNew responsePackNew = null;
            Loading loading = new Loading();
            dialog.AddChidren(loading);
            loading.Start();
            new System.Threading.Thread(() =>
            {
                try
                {
                    responsePackNew = PirSend.Add(control);
                }
                catch { }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        loading.Hide();
                        //if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
                        //{
                            ///这里:监听MTTP推送下来主题,才知道是否添加成功
                            dialog.Close();//添加成功关闭弹窗
                            AddButton addButton = new AddButton();
                            MainPage.BasePageView.AddChidren(addButton);
                            addButton.Show(control);
                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                            //监听Mqtt推送下来状态码做提示
                            //View.FailView failView = new View.FailView();
                            //failView.ShouError((view) => {
                            //    view.Close();
                            //    ThreadAddControl(control, dialog);
                            //});
                        //}
                        //else
                        //{
                        //    ErrorShow(responsePackNew);
                        //}
                    });
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 错误码提示
        /// </summary>
        /// <param name="responsePackNew"></param>
        public  void ErrorShow(ResponsePackNew responsePackNew)
        {
            if (responsePackNew != null && responsePackNew.Code == "14005")
            {
                new Intelligence.Automation.LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline));
            }
            else
            {
                new Intelligence.Automation.LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail));
            }
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Pir.cs
New file
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class Pir
    {
        /// <summary>
        /// 添加按键列表
        /// </summary>
        public static List<ButtonObj> BuottonList = new List<ButtonObj>();
    }
    public class ButtonObj
    {
        public string Key = string.Empty;
        /// <summary>
        /// #app 显示的文字
        /// </summary>
        public string value = string.Empty;
    }
    public class Control
    {
        /// <summary>
        /// 红外宝设备Id
        /// </summary>
        public string deviceId = "0";
        /// <summary>
        /// 红外遥控器名称
        /// </summary>
        public string name = "0";
        /// <summary>
        /// 红外遥控器spk
        /// </summary>
        public string spk = "ir.module";
        /// <summary>
        /// library=库类型, learn=不需要额外追加属性
        /// </summary>
        public string type = "learn";
        /// <summary>
        /// 码组号
        /// </summary>
        public string group_id = "12";
        /// <summary>
        /// 红外码
        /// </summary>
        public List<string> library = new List<string>();
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
New file
@@ -0,0 +1,339 @@
using System;
using System.Collections.Generic;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class PirMain : FrameLayout
    {
        public PirMain()
        {
            Tag = "PirView";
        }
        public void Show()
        {
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
            PirDevice.View.TopView topView = new View.TopView();
            topView.topNameBtn.TextID = StringId.hongwaiyaokong;
            this.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); };
            FrameLayout middFLayout = new FrameLayout();
            middFLayout.Y = Application.GetRealHeight(64);
            middFLayout.Height = Application.GetRealHeight(667 - 64);
            this.AddChidren(middFLayout);
            FrameLayout pirDeviceFLayout = new FrameLayout();
            pirDeviceFLayout.Y = Application.GetRealHeight(12);
            pirDeviceFLayout.X = Application.GetRealWidth(16);
            pirDeviceFLayout.Width = Application.GetRealWidth(343);
            pirDeviceFLayout.Height = Application.GetRealHeight(187);
            pirDeviceFLayout.BackgroundColor = CSS.CSS_Color.view;
            pirDeviceFLayout.Radius = (uint)Application.GetRealHeight(12);
            middFLayout.AddChidren(pirDeviceFLayout);
            //设备管理
            Button text1Btn = new Button
            {
                Y = Application.GetRealHeight(11),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(120),
                Height = Application.GetRealHeight(20),
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textConfirmColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.shebeigaunli,
                IsBold=true,
            };
            pirDeviceFLayout.AddChidren(text1Btn);
            Button pirIcon = new Button
            {
                Y = Application.GetRealHeight(47),
                X = Application.GetRealWidth(28),
                Width = Application.GetRealWidth(66),
                Height = Application.GetRealWidth(66),
                UnSelectedImagePath = "PirIcon/Infraredtreasure.png",
            };
            pirDeviceFLayout.AddChidren(pirIcon);
            //mini智能遥控器
            Button text2Btn = new Button
            {
                Y = Application.GetRealHeight(70),
                X = Application.GetRealWidth(112),
                Width = Application.GetRealWidth(120),
                Height = Application.GetRealHeight(20),
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textTipColor,
                TextAlignment = TextAlignment.CenterLeft,
                Text = "mini智能遥控器",
            };
            pirDeviceFLayout.AddChidren(text2Btn);
            //
            Button numberDeviceBtn = new Button
            {
                Y = Application.GetRealHeight(137),
                X = Application.GetRealWidth(32),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealHeight(20),
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textColor,
                TextAlignment = TextAlignment.CenterLeft,
                Text = "1" + Language.StringByID(StringId.ge),
                IsBold = true,
            };
            pirDeviceFLayout.AddChidren(numberDeviceBtn);
            //当前红外遥控设备
            Button numberDeviceTextBtn = new Button
            {
                Y = numberDeviceBtn.Bottom + Application.GetRealHeight(4),
                X = Application.GetRealWidth(32),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealHeight(14),
                TextSize = TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.dangqianhongwaishebei,
            };
            pirDeviceFLayout.AddChidren(numberDeviceTextBtn);
            //
            Button currDeviceNumberControlBtn = new Button
            {
                Y = Application.GetRealHeight(137),
                X = Application.GetRealWidth(198),
                Width = Application.GetRealWidth(80),
                Height = Application.GetRealHeight(20),
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textColor,
                TextAlignment = TextAlignment.CenterLeft,
                Text = "1" + Language.StringByID(StringId.ge),
                IsBold = true,
            };
            pirDeviceFLayout.AddChidren(currDeviceNumberControlBtn);
            //已添加遥控器
            Button currDeviceNumberControlTextBtn = new Button
            {
                Y = currDeviceNumberControlBtn.Bottom + Application.GetRealHeight(4),
                X = Application.GetRealWidth(198),
                Width = Application.GetRealWidth(80),
                Height = Application.GetRealHeight(14),
                TextSize = TextSize.text10,
                TextColor = CSS.CSS_Color.textCancelColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.yitianjiayaokongqi,
            };
            pirDeviceFLayout.AddChidren(currDeviceNumberControlTextBtn);
            ///红外宝点击事件
            FrameLayout clickFLayout = new FrameLayout();
            pirDeviceFLayout.AddChidren(clickFLayout);
            clickFLayout.MouseUpEventHandler += (sender,e) => {
                DeviceSet deviceSet = new DeviceSet();
                MainPage.BasePageView.AddChidren(deviceSet);
                deviceSet.Show();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            FrameLayout deviceListFLayout = new FrameLayout();
            deviceListFLayout.Y = pirDeviceFLayout.Bottom + Application.GetRealHeight(12);
            deviceListFLayout.X = Application.GetRealWidth(16);
            deviceListFLayout.Width = Application.GetRealWidth(343);
            deviceListFLayout.Height = Application.GetRealHeight(328);
            deviceListFLayout.BackgroundColor = CSS.CSS_Color.view;
            deviceListFLayout.Radius = (uint)Application.GetRealHeight(12);
            middFLayout.AddChidren(deviceListFLayout);
            ///添加遥控器
            Button text3Btn = new Button
            {
                Y = Application.GetRealHeight(11),
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealHeight(20),
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textConfirmColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = StringId.tianjiayaokongqi,
                IsBold = true,
            };
            deviceListFLayout.AddChidren(text3Btn);
            ///红外宝名称
            Button deviceNameBtn= new Button
            {
                Y = Application.GetRealHeight(13),
                X = Application.GetRealWidth(161),
                Width = Application.GetRealWidth(150),
                Height = Application.GetRealHeight(17),
                TextSize = TextSize.text12,
                TextColor = CSS.CSS_Color.textColor,
                TextAlignment = TextAlignment.CenterRight,
                Text = "mini智能遥控器",
            };
            deviceListFLayout.AddChidren(deviceNameBtn);
            //下拉图标
            var dropdownIconBtn = new Button
            {
                Y = Application.GetRealHeight(13),
                X = Application.GetRealWidth(343-8-16),
                Width = Application.GetRealWidth(16),
                Height = Application.GetRealWidth(16),
                UnSelectedImagePath = "PirIcon/dropdown.png",
            };
            deviceListFLayout.AddChidren(dropdownIconBtn);
            #endregion
            int line = 0;
            for (int i = 1, j = 0; i <= 7; i++, j++)
            {
                var currpirdeviceFLayout = new FrameLayout
                {
                    Width = Application.GetRealWidth(80),
                    Height = Application.GetRealWidth(80),
                    X = Application.GetRealWidth(26 + (80 + 25) * j),
                    Y = Application.GetRealHeight(52 + (80 + 12) * line),
                };
                deviceListFLayout.AddChidren(currpirdeviceFLayout);
                var deviceIconBtn = new Button
                {
                    Y = Application.GetRealHeight(8),
                    X = Application.GetRealWidth(20),
                    Width = Application.GetRealWidth(40),
                    Height = Application.GetRealWidth(40),
                    UnSelectedImagePath = "PirIcon/Infraredtreasure.png",
                };
                currpirdeviceFLayout.AddChidren(deviceIconBtn);
                var iconNameBtn = new Button
                {
                    Y = deviceIconBtn.Bottom+Application.GetRealHeight(8),
                    Width = Application.GetRealWidth(80),
                    Height = Application.GetRealHeight(17),
                    TextSize = TextSize.text12,
                    TextColor = CSS.CSS_Color.TextualColor,
                    TextAlignment = TextAlignment.Center,
                };
                currpirdeviceFLayout.AddChidren(iconNameBtn);
                var clickBtn = new Button { Tag = i };
                currpirdeviceFLayout.AddChidren(clickBtn);
                if (i % 3 == 0)
                {
                    //满一行重置j=0值;
                    j = -1;
                    line += 1;
                }
                GetIconAndText(i, deviceIconBtn, iconNameBtn);
                clickBtn.MouseUpEventHandler += (sender, e) =>
                {
                    //1=空调;2=电视;3=风扇;4=机顶盒;5=DVD/EVD/VCD;6=投影仪;7=自定义;
                    int if_value =int.Parse(clickBtn.Tag.ToString());
                    var list11 = new List<string> {
                       "爱你", "哎呦","埃及","哈弗换壳哈弗", "爱德华多v","俺几个疯了",
                        "拜了", "巴士", "百夫",  "百合地理课你打算", "不度老骥伏枥", "比到九点",
                        "车站","测试","此地", "才看见好得快","吃软饭","从看见二十多",
                       "等待机会吧","的客户", "多喝点", "登记哦然后", "打电话",
                         "恩肤霜看就看了", "饿死os","恶魔城","儿科联动", "恩六颗子弹拉拉裤洗澡了","发大学生发发",
                        "真厉害i发多少", "知道你付款了发", "尬酒回复",  "改进的话", "天天速度回答", "太好了开车",
                        "减肥的看过","桡出口处那","如果觉得", "很舒服的","吃软饭","从看见二十多",
                       "龙卷风亏大发","去好看", "多喝点", "好浪费好", "打电话"};
                    System.Threading.Tasks.Task.Run(() =>
                    {
                        Application.RunOnMainThread(() =>
                        {
                            switch (if_value)
                            {
                                case 1:
                                    {
                                    }
                                    break;
                                case 2:
                                    {
                                    }
                                    break;
                                case 3:
                                    {
                                    }
                                    break;
                                case 4:
                                    {
                                    }
                                    break;
                                case 5:
                                    {
                                    }
                                    break;
                                case 6:
                                    {
                                    }
                                    break;
                                case 7:
                                    {
                                        Method method = new Method();
                                        method.AddControl();
                                    }
                                    break;
                            }
                            //BrandList brandList = new BrandList();
                            //MainPage.BasePageView.AddChidren(brandList);
                            //brandList.Show(list11, null);
                            //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        });
                    });
                };
            }
        }
        /// <summary>
        /// 设置图片和备注
        /// </summary>
        /// <param name="index">索引值</param>
        /// <param name="deviceIconBtn">图标Btn</param>
        /// <param name="deviceNameBtn">设备备注Btn</param>
        private void GetIconAndText(int index,Button deviceIconBtn, Button deviceNameBtn) {
            string iconPath = "";
            int deviceNameIndex=0;
            switch (index)
            {
                case 1: {
                        iconPath = "PirIcon/air.png";
                        deviceNameIndex = StringId.kongtiao;
                    } break;
                case 2: {
                        iconPath = "PirIcon/tv.png";
                        deviceNameIndex = StringId.dianshi;
                    } break;
                case 3: {
                        iconPath = "PirIcon/fan.png";
                        deviceNameIndex = StringId.fengshan;
                    } break;
                case 4: {
                        iconPath = "PirIcon/stb.png";
                        deviceNameIndex = StringId.jidinghe;
                    } break;
                case 5: {
                        iconPath = "PirIcon/dvd.png";
                        deviceNameIndex = StringId.dvd;
                    } break;
                case 6: {
                        iconPath = "PirIcon/projector.png";
                        deviceNameIndex = StringId.touyingyi;
                    } break;
                case 7: {
                        iconPath = "PirIcon/custom.png";
                        deviceNameIndex = StringId.zidingyi;
                    } break;
            }
            deviceIconBtn.UnSelectedImagePath = iconPath;
            deviceNameBtn.TextID = deviceNameIndex;
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
New file
@@ -0,0 +1,175 @@
using System;
using System.IO;
using System.Net;
using HDL_ON.DAL.Server;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
{
    public class PirSend
    {
        /// <summary>
        /// 住宅ID
        /// </summary>
        public static string HomeId
        {
            get
            {
                return Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID;
            }
        }
        /// <summary>
        /// 是否为其他主用户分享过来的住宅
        /// </summary>
        public static bool IsOthreShare
        {
            get
            {
                return Entity.DB_ResidenceData.Instance.CurrentRegion.IsOthreShare;
            }
        }
        /// <summary>
        /// 遥控器添加
        /// </summary>
        /// <returns></returns>
        public static ResponsePackNew Add(Control control)
        {
            var jObject = new JObject { };
            jObject.Add("homeId", HomeId);
            jObject.Add("deviceId", control.deviceId);
            jObject.Add("name", control.name);
            jObject.Add("spk", "ir.module");
            jObject.Add("type", control.type);
            if (control.type == "library")
            {
                //jObject.Add("group_id", "123");
                var libraryjay = new JArray { };
                for (int i = 0; i < control.library.Count; i++)
                {
                    libraryjay.Add(control.library[i]);
                }
                jObject.Add("library", libraryjay);
            }
            var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_Add);
            return responsePackNew;
        }
        /// <summary>
        /// 红外码学习
        /// </summary>
        /// <returns></returns>
        public static void CodeStudy(ButtonObj buttonObj, Action<ResponsePackNew> action)
        {
            //var whichDayJson = jay["whichDay"].ToString();
            //var whichDayAry = Newtonsoft.Json.Linq.JArray.Parse(whichDayJson);
            //for (int b = 0; b < whichDayAry.Count; b++)
            //{
            //    var days = whichDayAry[b].ToString();
            //    timer.whichDay.Add(int.Parse(days));
            //}
            var job = new JObject { };
            job.Add("key", buttonObj.Key);
            job.Add("data_type", "string");
            var valuejArray = new JArray { };
            valuejArray.Add(buttonObj.value);
            job.Add("value", valuejArray);
            var jArray = new JArray { };
            jArray.Add(job);
            var jObject = new JObject { { "homeId", HomeId }, { "deviceId", "0" }, { "attributes", jArray } };
            ResponsePackNew responsePackNew = null;
            new System.Threading.Thread(() =>
            {
                try
                {
                    //发送红外码学习命令
                    responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_CodeStudy);
                }
                catch { }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        action(responsePackNew);
                    });
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 自学按键删除
        /// </summary>
        /// <returns></returns>
        public static ResponsePackNew CodeRemove(ButtonObj buttonObj)
        {
            var job = new JObject { };
            job.Add("key", buttonObj.Key);
            job.Add("data_type", "string");
            var valuejArray = new JArray { };
            valuejArray.Add(buttonObj.value);
            job.Add("value", valuejArray);
            var jArray = new JArray { };
            jArray.Add(job);
            var jObject = new JObject { { "homeId", HomeId }, { "deviceId", "0" }, { "attributes", jArray } };
            var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_CodeRemove);
            return responsePackNew;
        }
        /// <summary>
        /// 获取逻辑
        /// </summary>
        /// <param name="listIdList">逻辑ID列表</param>
        /// <returns></returns>
        public static ResponsePackNew GetLogic(List<string> listIdList)
        {
            var jArray = new JArray { };
            for (int i = 0; i < listIdList.Count; i++)
            {
                jArray.Add(listIdList[i]);
            }
            var jObject = new JObject { { "userLogicIds", jArray } };
            var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Info);
            //如果是token过期则刷新token
            if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
            {
                RefreshToken();
                GetLogic(listIdList);
            }
            return responsePackNew;
        }
        /// <summary>
        ///请求服务器(与住宅有关:例如;homeId)
        /// </summary>
        /// <returns></returns>
        public static ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 20)
        {
            var requestJson = HttpUtil.GetSignRequestJson(o);
            return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);
        }
        /// <summary>
        /// 请求服务器
        /// </summary>
        /// <returns></returns>
        public static ResponsePackNew RequestServer(object o, string api_Url)
        {
            var requestJson = HttpUtil.GetSignRequestJson(o);
            return HttpUtil.RequestHttpsPost(api_Url, requestJson);
        }
        /// <summary>
        /// 刷新Token
        /// </summary>
        public static void RefreshToken()
        {
            IMessageCommon.Current.StartRefreshToken();
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/BrandListView.cs
File was renamed from HDL_ON/UI/UI2/3-Intelligence/Automation/EmptyClass.cs
@@ -4,9 +4,9 @@
using System.Collections.Generic;
using System.Text;
namespace HDL_ON.UI.UI2.Intelligence.Automation
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class EmptyClass : FrameLayout
    public class BrandListView : FrameLayout
    {
        /// <summary>
        /// 
@@ -14,10 +14,8 @@
        /// <param name="list">表示该列表元素A-Z字母筛选显示出来</param>
        /// <param name="list6">表示该列表元素显示在list前面(该列表元素不做A-Z字母筛选),没有可以为list6=null</param>
        /// <param name="action">返回选中文本</param>
        public void Show(List<string> list, List<string> list6, Action<string> action)
        public void Show(List<string> list, List<string> list6, Action<string> action)
        {
            //string text = "30";
            //byte[] bytes = new byte[text.Length / 2];
            //for (int i = 0, j = 0; i < bytes.Length; j += 2, i++)
@@ -27,8 +25,6 @@
            //}
            ////把byte数组转换成文字
            //string str = System.Text.Encoding.UTF8.GetString(bytes);
            var frameLayout = new FrameLayout
            {
                BackgroundColor = CSS.CSS_Color.viewTop,
@@ -59,7 +55,14 @@
                UnSelectedImagePath = "LogicIcon/back.png",
            };
            frameLayout.AddChidren(backBtn);
            backBtn.MouseUpEventHandler += (sen, e) =>
            var clickBackBtn = new Button
            {
                Width = Application.GetRealWidth(12 + 16 + 20),
                Height = Application.GetRealWidth(20 + 20),
                Y = Application.GetRealHeight(32),
            };
            frameLayout.AddChidren(clickBackBtn);
            clickBackBtn.MouseUpEventHandler += (sen, e) =>
            {
                this.RemoveFromParent();
            };
@@ -86,16 +89,6 @@
            };
            this.AddChidren(fram);
            //var list11 = new List<string> {
            //   "爱你", "哎呦","埃及","哈弗换壳哈弗", "爱德华多v","俺几个疯了",
            //    "拜了", "巴士", "百夫",  "百合地理课你打算", "不度老骥伏枥", "比到九点",
            //    "车站","测试","此地", "才看见好得快","吃软饭","从看见二十多",
            //   "等待机会吧","的客户", "多喝点", "登记哦然后", "打电话",
            //     "恩肤霜看就看了", "饿死os","恶魔城","儿科联动", "恩六颗子弹拉拉裤洗澡了","发大学生发发",
            //    "真厉害i发多少", "知道你付款了发", "尬酒回复",  "改进的话", "天天速度回答", "太好了开车",
            //    "减肥的看过","桡出口处那","如果觉得", "很舒服的","吃软饭","从看见二十多",
            //   "龙卷风亏大发","去好看", "多喝点", "好浪费好", "打电话"};
            if (list == null)
            {
                list = new List<string>();
@@ -105,7 +98,6 @@
                list6 = new List<string>();
            }
            var list1 = GetDateList(list);
            list1.Add("1");
            list1.InsertRange(0, list6);
@@ -140,7 +132,7 @@
                Width = Application.GetRealWidth(10 + 6),
            };
            fram.AddChidren(a_zFra);
            var list2 = GetList();
            var list2 = GetList();
            for (int i = 0; i < list2.Count; i++)
            {
@@ -183,7 +175,7 @@
            }
            #endregion
            RefreshLayout(vv, list1,action);
            RefreshLayout(vv, list1, action);
@@ -195,7 +187,7 @@
        /// </summary>
        /// <param name="vv">父控件</param>
        /// <param name="list">显示列表</param>
        private void RefreshLayout(VerticalScrolViewLayout vv, List<string> list,Action<string> action)
        private void RefreshLayout(VerticalScrolViewLayout vv, List<string> list, Action<string> action)
        {
            vv.RemoveAll();
            foreach (var str in list)
@@ -236,8 +228,8 @@
                clickBtn.MouseUpEventHandler += (sen, e) =>
                {
                    //找到索引值
                    var index = list.IndexOf(clickBtn.Tag.ToString());
                    //var index = list.IndexOf();
                    action(clickBtn.Tag.ToString());
                    this.RemoveFromParent();
                };
@@ -261,7 +253,6 @@
                return false;
            }
        }
        /// <summary>
        /// 获取显示列表
        /// </summary>
@@ -300,7 +291,6 @@
            }
            return list;
        }
        /// <summary>
        /// 获取A-Z字母列表
        /// </summary>
@@ -321,7 +311,6 @@
            }
            return list;
        }
        /// <summary>
        /// 获取汉字首字母
        /// </summary>
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/Buttons.cs
New file
@@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class Buttons
    {
        /// <summary>
        /// 动态加载按钮列表
        /// </summary>
        /// <param name="buttonFLayout">父控件</param>
        /// <param name="buttonList">数据列表</param>
        /// <param name="action">回调</param>
        /// <param name="line">表示多少行</param>
        /// <param name="line">表示一行加载多少个按钮</param>
        public void AddButton(FrameLayout buttonFLayout, List<string> buttonList, Action<string> action, int line = 7, int sum = 3)
        {
            VerticalScrolViewLayout vv = new VerticalScrolViewLayout();
            buttonFLayout.AddChidren(vv);
            for (int i = 0; i < line; i++)
            {
                var currFLayout = new FrameLayout { Height = Application.GetRealHeight(16 + 44) };
                vv.AddChidren(currFLayout);
                for (int a = i * sum + 1, b = 0; a <= buttonList.Count; a++, b++)
                {
                    var name = buttonList[a - 1];
                    var nameBtn = new Button
                    {
                        Y = Application.GetRealHeight(16),
                        X = Application.GetRealWidth(24 + (98 + 16) * b),
                        // Gravity=Gravity.CenterVertical,
                        Width = Application.GetRealWidth(98),
                        Height = Application.GetRealHeight(44),
                        Text = name,
                        TextSize = TextSize.text16,
                        TextColor = CSS.CSS_Color.textColor,
                        TextAlignment = TextAlignment.Center,
                        Radius = (uint)Application.GetRealHeight(8),
                        BorderWidth = 1,
                        BorderColor = CSS.CSS_Color.textCancelColor,
                    };
                    currFLayout.AddChidren(nameBtn);
                    nameBtn.MouseUpEventHandler += (sender, e) =>
                    {
                        action(nameBtn.Text);
                    };
                    if (a % sum == 0)
                    {
                        break;
                    }
                }
                if (i == line - 1)
                {
                    //最后一个元素后面加一个20高度间隔
                    vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(20) });
                }
            }
        }
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="tag">标记值</param>
        /// <returns></returns>
        public List<string> GetList(string tag)
        {
            List<string> list = new List<string>();
            switch (tag)
            {
                case "默认按钮":
                    {
                        list.Add(Language.StringByID(StringId.dianyuan));
                        list.Add(Language.StringByID(StringId.yinliangjia));
                        list.Add(Language.StringByID(StringId.yinliangjian));
                        list.Add(Language.StringByID(StringId.pindaojia));
                        list.Add(Language.StringByID(StringId.pindaojian));
                        list.Add(Language.StringByID(StringId.shang));
                        list.Add(Language.StringByID(StringId.xia));
                        list.Add(Language.StringByID(StringId.zuo));
                        list.Add(Language.StringByID(StringId.you));
                        list.Add(Language.StringByID(StringId.jingyin));
                        list.Add(Language.StringByID(StringId.queren));
                        list.Add(Language.StringByID(StringId.bofang));
                        list.Add(Language.StringByID(StringId.xiayibu));
                        list.Add(Language.StringByID(StringId.tuichu));
                        list.Add(Language.StringByID(StringId.caidan));
                        list.Add(Language.StringByID(StringId.zanting));
                        list.Add(Language.StringByID(StringId.fanhui));
                        list.Add(Language.StringByID(StringId.tingzhi));
                        list.Add(Language.StringByID(StringId.zhuye));
                        list.Add(Language.StringByID(StringId.kuaijin));
                        list.Add(Language.StringByID(StringId.kuaitui));
                        list.Add(Language.StringByID(StringId.dingshi));
                    }
                    break;
            }
            return list;
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/FailView.cs
New file
@@ -0,0 +1,65 @@
using System;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class FailView
    {
        public void ShouError(Action<Dialog> action)
        {
            Dialog dialog = new Dialog();
            #region 界面布局
            dialog.BackgroundColor = CSS.CSS_Color.viewMiddle;
            PirDevice.View.TopView topView = new View.TopView();
            topView.topNameBtn.TextID = StringId.tianjiayaokongqi;
            dialog.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { dialog.Close(); };
            FrameLayout fLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64),
                BackgroundColor = CSS.CSS_Color.textWhiteColor,
                Height = Application.GetRealHeight(667-64),
                Width = Application.GetRealWidth(375),
            };
            dialog.AddChidren(fLayout);
            //图标
            Button iconBtn = new Button
            {
                Y = Application.GetRealHeight(106),
                X = Application.GetRealWidth(98),
                Width = Application.GetRealWidth(180),
                Height = Application.GetRealWidth(180),
                UnSelectedImagePath = "PirIcon/failed.png",
            };
            fLayout.AddChidren(iconBtn);
            //添加失败
            Button text1Btn = new Button
            {
                Width = Application.GetRealWidth(375 - 32),
                Height = Application.GetRealHeight(22),
                Y = Application.GetRealHeight(302),
                X = Application.GetRealWidth(16),
                TextID = StringId.tianjiashibai,
                TextSize = TextSize.text16,
                TextColor = CSS.CSS_Color.textRedColor,
                TextAlignment = TextAlignment.Center,
            };
            fLayout.AddChidren(text1Btn);
            //重试
            View.SaveView saveView = new View.SaveView();
            dialog.AddChidren(saveView.FLayoutView());
            saveView.btnSave.TextID = StringId.chongshii;
            saveView.frameLayout.BackgroundColor = CSS.CSS_Color.viewLine;
            saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            dialog.Show();
            saveView.btnClick.MouseUpEventHandler += (sender,e) => {
                action(dialog);
            };
            #endregion
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/PatchView.cs
New file
@@ -0,0 +1,96 @@
using System;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class PatchView
    {
        /// <summary>
        /// 主控件View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        {
            Height = Application.GetRealHeight(44),
            BackgroundColor = CSS.CSS_Color.textWhiteColor,
        };
        /// <summary>
        /// 文本描述1
        /// </summary>
        public Button btnText1 = new Button
        {
            X = Application.GetRealWidth(16),
            Width = Application.GetRealWidth(300),
            Height = Application.GetRealHeight(20),
            TextColor = CSS.CSS_Color.textColor,
            TextSize = TextSize.text14,
            Gravity = Gravity.CenterVertical,
            TextAlignment = TextAlignment.CenterLeft,
        };
        /// <summary>
        /// 文本描述2
        /// </summary>
        public Button btnText2 = new Button
        {
            X = Application.GetRealWidth(375 - 40 - 150),
            Width = Application.GetRealWidth(150),
            Height = Application.GetRealHeight(20),
            TextColor = CSS.CSS_Color.textTipColor,
            TextSize = TextSize.text14,
            Gravity = Gravity.CenterVertical,
            TextAlignment = TextAlignment.CenterRight,
        };
        /// <summary>
        /// 图标
        /// </summary>
        public Button btnNextIcon = new Button
        {
            Width = Application.GetRealWidth(16),
            Height = Application.GetRealWidth(16),
            UnSelectedImagePath = "PirIcon/next.png",
            X = Application.GetRealWidth(343),
            Gravity = Gravity.CenterVertical,
        };
        /// <summary>
        /// 线
        /// </summary>
        public Button btnLine = new Button
        {
            Width = Application.GetRealWidth(343),
            X = Application.GetRealWidth(16),
            Height = 1,
            BackgroundColor = CSS.CSS_Color.viewLine,
        };
        public Button btnClick = new Button
        {
            Height = Application.GetRealHeight(44),
        };
        /// <summary>
        /// View的方法
        /// </summary>
        /// <returns></returns>
        public FrameLayout FLayoutView(bool if_bool = true)
        {
            frameLayout.AddChidren(btnText1);
            frameLayout.AddChidren(btnText2);
            if (if_bool)
            {
                btnText2.X = Application.GetRealWidth(375 - 40 - 150);
                frameLayout.AddChidren(btnNextIcon);
            }
            else
            {
                btnText2.X = Application.GetRealWidth(375 - 16 - 150);
            }
            btnLine.Y = frameLayout.Height - 1;
            frameLayout.AddChidren(btnLine);
            frameLayout.AddChidren(btnClick);
            return frameLayout;
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/ReplicationView.cs
New file
@@ -0,0 +1,69 @@
using System;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
using System.Collections.Generic;
using System.Text;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class ReplicationView
    {
        Dialog dialog = new Dialog();
        /// <summary>
        ///
        /// </summary>
        public void Show()
        {
            #region 界面布局
            dialog.BackgroundColor = CSS.CSS_Color.viewMiddle;
            PirDevice.View.TopView topView = new View.TopView();
            topView.topNameBtn.TextID = StringId.fuzhiyaokonggongnneg;
            dialog.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { dialog.Close();};
            FrameLayout frameLayout = new FrameLayout();
            frameLayout.Height = Application.GetRealHeight(667 - 64);
            frameLayout.Y = Application.GetRealHeight(64);
           // frameLayout.BackgroundColor = CSS.CSS_Color.textWhiteColor;
            dialog.AddChidren(frameLayout);
            var textBtn = new Button
            {
                Y = Application.GetRealHeight(24),
                X = Application.GetRealWidth(10),
                Width = Application.GetRealWidth(375 - 20),
                Height = Application.GetRealHeight(20),
                TextSize = TextSize.text14,
                TextColor = CSS.CSS_Color.textColor,
                TextAlignment = TextAlignment.Center,
                TextID = StringId.duizhunanxiaanniu,
            };
            frameLayout.AddChidren(textBtn);
            var icon1Btn = new Button
            {
                Y = Application.GetRealHeight(91),
                X = Application.GetRealWidth((375 - 149) / 2),
                Width = Application.GetRealWidth(149),
                Height = Application.GetRealHeight(95),
                UnSelectedImagePath = "PirIcon/icon1.png",
            };
            frameLayout.AddChidren(icon1Btn);
            var icon2Btn = new Button
            {
                Y = Application.GetRealHeight(289),
                X = Application.GetRealWidth(122),
                Width = Application.GetRealWidth(182),
                Height = Application.GetRealHeight(314),
                UnSelectedImagePath = "PirIcon/icon2.png",
            };
            frameLayout.AddChidren(icon2Btn);
            dialog.Show();
            #endregion
        }
        /// <summary>
        /// 移除当前界面
        /// </summary>
        public void RemView() {
            dialog.Close();
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/SaveView.cs
New file
@@ -0,0 +1,52 @@
using System;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class SaveView
    {
        /// <summary>
        /// 主控件View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        {
            Y = Application.GetRealHeight(TextSize.view667 - 76),
            Height = Application.GetRealHeight(76),
            Width = Application.GetRealWidth(TextSize.view375),
            Gravity = Gravity.BottomCenter,//置底的属性
            BackgroundColor = CSS.CSS_Color.view,
        };
        /// <summary>
        /// 保存
        /// </summary>
        public Button btnSave = new Button
        {
            Width = Application.GetRealWidth(220),
            Height = Application.GetRealHeight(44),
            Y = Application.GetRealHeight(12),
            X = Application.GetRealWidth(78),
            TextID = StringId.save,
            TextSize = TextSize.text16,
            TextColor = CSS.CSS_Color.textWhiteColor,
            TextAlignment = TextAlignment.Center,
            BackgroundColor = CSS.CSS_Color.btnSaveBackgroundColor,
            Radius = (uint)Application.GetRealHeight(22),
        };
        public Button btnClick = new Button
        {
            Height = Application.GetRealHeight(76),
        };
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        public FrameLayout FLayoutView()
        {
            frameLayout.AddChidren(btnSave);
            frameLayout.AddChidren(btnClick);
            return frameLayout;
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/TipView.cs
New file
@@ -0,0 +1,179 @@
using System;
using System.Collections.Generic;
using HDL_ON.UI.CSS;
using HDL_ON.UI.Music;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class TipView
    {
        /// <summary>
        /// 大框圆角值
        /// </summary>
        public int RradiusFrameLayout = 15;
        /// <summary>
        /// 小框圆角值
        /// </summary>
        public int radiusEditFrameLayout = 4;
        /// <summary>
        /// 输入框
        /// </summary>
        /// <param name="confirmAction">回调函数</param>
        public void InputBox(string tnputEditTxet, Action<string, Dialog> confirmAction,bool if_bool=true)
        {
            Dialog dialog = new Dialog()
            {
                BackgroundColor = MusicColor.PopupBackgroundColor,
            };
            FrameLayout whiteView = new FrameLayout()
            {
                //Gravity = Gravity.Center,
                X = Application.GetRealWidth(53),
                Y = Application.GetRealHeight(264),
                Width = Application.GetRealWidth(270),
                Height = Application.GetRealHeight(201),
                BackgroundColor = MusicColor.WhiteColor,
                BorderColor = 0x00000000,
                BorderWidth = 0,
                Radius = (uint)Application.GetRealHeight(RradiusFrameLayout),
            };
            dialog.AddChidren(whiteView);
            Button btnTitle = new Button()
            {
                Y = Application.GetRealHeight(20),
                X = Application.GetRealWidth(35),
                Height = Application.GetRealHeight(22),
                Width = Application.GetRealWidth(200),
                TextColor = MusicColor.SelectedColor,
                TextSize = TextSize.Text16,
                TextAlignment = TextAlignment.Center,
                TextID = StringId.shuruyaokongqimingcheng,
            };
            whiteView.AddChidren(btnTitle);
            FrameLayout editBjView = new FrameLayout()
            {
                // Gravity = Gravity.CenterHorizontal,
                Y = btnTitle.Bottom + Application.GetRealHeight(16),
                X = Application.GetRealWidth(24),
                Width = Application.GetRealWidth(222),
                Height = Application.GetRealHeight(40),
                BackgroundColor = MusicColor.ViewColor,
                BorderColor = 0x00000000,
                BorderWidth = 0,
                Radius = (uint)Application.GetMinRealAverage(radiusEditFrameLayout),
            };
            whiteView.AddChidren(editBjView);
            EditText editText = new EditText()
            {
                X = Application.GetRealWidth(12),
                Y = Application.GetRealHeight(10),
                Width = Application.GetRealWidth(160),
                Height = Application.GetRealHeight(20),
                Text = tnputEditTxet,
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text14,
                TextAlignment = TextAlignment.CenterLeft,
            };
            editBjView.AddChidren(editText);
            Button clearIconBtn = new Button
            {
                X = Application.GetRealWidth(194),
                Y = Application.GetRealHeight(8),
                Width = Application.GetRealWidth(24),
                Height = Application.GetRealWidth(24),
                UnSelectedImagePath = "MusicIcon/clear.png",
            };
            editBjView.AddChidren(clearIconBtn);
            clearIconBtn.MouseUpEventHandler += (sender, e) =>
            {
                editText.Text = "";
            };
            Button btnTipText = new Button
            {
                X = Application.GetRealWidth(24),
                Y = editBjView.Bottom + Application.GetRealHeight(12),
                Width = Application.GetRealWidth(211),
                Height = Application.GetRealHeight(35),
                Text = Language.StringByID(StringId.fengleichazhao).Replace("{\\r\\n}", "\r\n"),
                IsMoreLines = true,
                TextColor = MusicColor.MusicNoTxetColor,
                TextSize = TextSize.Text12,
                TextAlignment = TextAlignment.CenterLeft,
            };
            whiteView.AddChidren(btnTipText);
             Button btnLine = new Button()
            {
                Y = whiteView.Height -Application.GetRealHeight(44 + 1),
                Height = Application.GetRealHeight(1),
                BackgroundColor = MusicColor.LineColor,
            };
            whiteView.AddChidren(btnLine);
            Button btnCancel = new Button()
            {
                Y = btnLine.Bottom,
                Width = Application.GetRealWidth(135),
                Height = Application.GetRealHeight(44),
                TextAlignment = TextAlignment.Center,
                TextColor = MusicColor.TextCancelColor,
                TextSize = TextSize.Text16,
                TextID = StringId.cancelMusic,
                Gravity = Gravity.BottomLeft,
            };
            whiteView.AddChidren(btnCancel);
            btnCancel.SetCornerWithSameRadius(Application.GetRealHeight(RradiusFrameLayout), HDLUtils.RectCornerBottomLeft);
            Button btnConfirm = new Button()
            {
                X = btnCancel.Right,
                Y = btnLine.Bottom,
                Width = Application.GetRealWidth(135),
                Height = Application.GetRealHeight(44),
                TextAlignment = TextAlignment.Center,
                TextColor = MusicColor.WhiteColor,
                IsBold = true,
                TextSize = TextSize.Text16,
                TextID = StringId.confirmMusic,
                BackgroundColor = MusicColor.SelectedColor,
                Gravity = Gravity.BottomRight,
            };
            whiteView.AddChidren(btnConfirm);
            btnConfirm.SetCornerWithSameRadius(Application.GetRealHeight(RradiusFrameLayout), HDLUtils.RectCornerBottomRight);
            dialog.Show();
            btnCancel.MouseUpEventHandler += (sender, e) =>
            {
                dialog.Close();
            };
            btnConfirm.MouseUpEventHandler += (sender, e) =>
            {
                if (string.IsNullOrEmpty(editText.Text.Trim()))
                {
                    return;
                }
                confirmAction(editText.Text.Trim(), dialog);
                if (if_bool) {
                    dialog.Close();
                }
            };
        }
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/TopView.cs
New file
@@ -0,0 +1,87 @@
using System;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class TopView
    {
        #region 最上面那块控件
        /// <summary>
        /// 最上面块View
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        {
            BackgroundColor = CSS.CSS_Color.viewTop,
            Height = Application.GetRealHeight(64),
            Width = Application.GetRealWidth(375),
        };
        /// <summary>
        /// 标题Btn
        /// </summary>
        public Button topNameBtn = new Button
        {
            TextSize = TextSize.text18,
            TextColor = CSS.CSS_Color.textColor,
            Width = Application.GetRealWidth(TextSize.view375 - 60 - 60),
            Height = Application.GetRealHeight(25),
            Y = Application.GetRealHeight(30),
            X = Application.GetRealWidth(60)
        };
        /// <summary>
        /// 后退Btn
        /// </summary>
        public Button backBtn = new Button
        {
            Width = Application.GetRealWidth(12),
            Height = Application.GetRealWidth(20),
            X = Application.GetRealWidth(TextSize.left16),
            Y = Application.GetRealHeight(32),
            UnSelectedImagePath = "LogicIcon/back.png",
        };
        /// <summary>
        /// 图标Btn
        /// </summary>
        public Button topIconBtn = new Button
        {
            Y = Application.GetRealHeight(29),
            X = Application.GetRealWidth(337),
            Width = Application.GetRealWidth(28),
            Height = Application.GetRealWidth(28),
            UnSelectedImagePath = "PirIcon/adddevice.png",
            Visible = false,
        };
        /// <summary>
        /// 增加热键大小Btn
        /// </summary>
        public Button clickBackBtn = new Button
        {
            Width = Application.GetRealWidth(16 + 12 + 16),
            Height = Application.GetRealHeight(64),
        };
        /// <summary>
        /// 设置图标增加热键大小
        /// </summary>
        public Button clickSetBtn = new Button
        {
            X = Application.GetRealWidth(337 - 37),
            Width = Application.GetRealWidth(28 + 37),
            Height = Application.GetRealWidth(28 + 7 + 29),
        };
        /// <summary>
        /// 最上面的那块方法
        /// </summary>
        /// <returns></returns>
        public FrameLayout FLayoutView()
        {
            frameLayout.AddChidren(topNameBtn);
            frameLayout.AddChidren(backBtn);
            frameLayout.AddChidren(topIconBtn);
            frameLayout.AddChidren(clickBackBtn);
            frameLayout.AddChidren(clickSetBtn);
            return frameLayout;
        }
        #endregion
    }
}