wxr
2021-03-17 47b841ed6c4d7dc03ff25bf74454fa41cd4e02a5
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -15,7 +15,7 @@
        /// 临时储存设备类型列表
        /// </summary>
        List<DeviceType> DeviceTypeList = new List<DeviceType>();
        public void Show()
        public void Show(Entity.Function function)
        {
            #region 界面布局
            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
@@ -79,8 +79,20 @@
            if (Pir.pirDeviceList.Count != 0)
            {
                //if (function != null)
                //{
                //    Pir pir = new Pir();
                //    pir.name = function.name;
                //    pir.deviceId = function.deviceId;
                //    pir.sid = function.sid;
                //    Pir.currPir = pir;
                //}
                //else
                //{
                //    Pir.currPir = Pir.pirDeviceList[0];
                //}
                //默认第一个红外宝
                Pir.currPir = Pir.pirDeviceList[0];
                int sum = 0;
                for (int i = 0; i < Pir.pirDeviceList.Count; i++)
                {
@@ -91,6 +103,7 @@
                mainView.numberDeviceBtn.Text = Pir.pirDeviceList.Count.ToString() + Language.StringByID(StringId.ge);
                mainView.currDeviceNumberControlBtn.Text = sum.ToString() + Language.StringByID(StringId.ge);
            }
            ///设备管理的点击事件
            mainView.clickBtn.MouseUpEventHandler += (sender, e) =>
            {
@@ -315,7 +328,7 @@
                case 3:
                    {
                        //风扇
                        type = "fan-" + SPK.ElectricFan;
                        // type = "fan-" + SPK.ElectricFan;
                    }
                    break;
                case 4:
@@ -405,7 +418,7 @@
        /// </summary>
        /// <param name="tag">标识要不要提示(true=提示)</param>
        /// <param name="action">回调函数</param>
        public  void GetDeviceTypeList(bool tag, Action action)
        public void GetDeviceTypeList(bool tag, Action action)
        {
            PirSend.GetDeviceTypesList(this, (responsePackNew) =>
            {
@@ -443,7 +456,7 @@
        /// <summary>
        /// 读取红外设备类型的品牌列表
        /// </summary>
        public  void GetBrandList(string id, Action<List<Brand>> actionBrand)
        public void GetBrandList(string id, Action<List<Brand>> actionBrand)
        {
            List<Brand> brandList = new List<Brand>();
            PirSend.GetDeviceTypesList(this, (responsePackNew) =>