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: