From 08a8afe782cd499550f94f3da0ba5788e1e12971 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 02 三月 2021 17:45:45 +0800
Subject: [PATCH] 2021-3-2-1

---
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs |   70 ++++++++++++-----------------------
 1 files changed, 24 insertions(+), 46 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
index 501c526..8f427de 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -1,5 +1,6 @@
 锘縰sing System;
 using System.Collections.Generic;
+using HDL_ON.Entity;
 using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
 using Shared;
 namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
@@ -8,7 +9,7 @@
     {
         public PirMain()
         {
-            Tag = "PirView";
+            Tag = "PirMain";
         }
         /// <summary>
         /// 涓存椂鍌ㄥ瓨璁惧绫诲瀷鍒楄〃
@@ -240,18 +241,19 @@
                 {
                     //1=绌鸿皟;2=鐢佃;3=椋庢墖;4=鏈洪《鐩�;5=DVD/EVD/VCD;6=鎶曞奖浠�;7=鑷畾涔�;
                     int if_value = int.Parse(clickBtn.Tag.ToString());
-                    var jobDeviceType = DeviceTypeList.Find((c) => c.deviceType == GetTypeString(if_value));
-                    if (jobDeviceType == null)
-                    {
-                        return;
-                    }
                     if (if_value == 7)
                     {
                         Method method = new Method();
-                        method.AddControl();
+                        method.AddControl(this);
                     }
                     else
                     {
+                        var strings = GetTypeString(if_value).Split('-');
+                        var jobDeviceType = DeviceTypeList.Find((c) => c.deviceType == strings[0]);
+                        if (jobDeviceType == null)
+                        {
+                            return;
+                        }
                         GetBrandList(jobDeviceType.id, (brandList) =>
                         {
                           var brandSupportStrList= GetBrandSupport(if_value);
@@ -269,7 +271,7 @@
                             Application.RunOnMainThread(()=> {
                                 BrandList brandObj = new BrandList();
                                 MainPage.BasePageView.AddChidren(brandObj);
-                                brandObj.Show(brandList, strList, null);
+                                brandObj.Show(brandList, strList, strings[1]);
                                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                             });
                          
@@ -347,39 +349,41 @@
             {
                 case 1:
                     {
-                        type = "ac";
+                        //绌鸿皟
+                        type = "ac-"+SPK.AcStandard;
                     }
                     break;
                 case 2:
                     {
-                        type = "tv";
+                        //鐢佃
+                        type = "tv-"+SPK.ElectricTV;
                     }
                     break;
                 case 3:
                     {
-                        type = "fan";
+                        //椋庢墖
+                        type = "fan-" + SPK.ElectricFan;
                     }
                     break;
                 case 4:
                     {
-                        type = "set_top_box";
+                        //鏈洪《鐩�
+                      //  type = "set_top_box-" + SPK.ElectricTV;
                     }
                     break;
                 case 5:
                     {
-                        type = "dvd";
+                      //褰辩鏈�
+                      // type = "dvd-" + SPK.ElectricTV;
                     }
                     break;
                 case 6:
                     {
-                        type = "projector";
+                        //鎶曞奖浠�
+                      //  type = "projector-" + SPK.ElectricTV;
                     }
                     break;
-                case 7:
-                    {
-                        type = "PirIcon/custom.png";
-                    }
-                    break;
+            
 
             }
             return type;
@@ -516,31 +520,5 @@
         }
 
     }
-    class DeviceType
-    {
-        /// <summary>
-        /// 璁惧绫诲瀷涓婚敭Id
-        /// </summary>
-        public string id = string.Empty;
-        /// <summary>
-        /// 璁惧绫诲瀷(鎶曞奖浠�,椋庢墖,鏈洪《鐩�...)
-        /// </summary>
-        public string deviceType = string.Empty;
-    }
-    public class Brand
-    {
-        /// <summary>
-        /// 鍝佺墝涓婚敭Id
-        /// </summary>
-        public string id = string.Empty;
-        /// <summary>
-        /// 璁惧绫诲瀷涓婚敭Id
-        /// </summary>
-        public string deviceTypeId = string.Empty;
-        /// <summary>
-        /// 鍝佺墝鍚嶇О
-        /// </summary>
-        public string brandName = string.Empty;
-
-    }
+  
 }

--
Gitblit v1.8.0