HDL Home App 第二版本 旧平台金堂用 正在使用
xm
2020-04-15 bff8993501334c4f3c5f902216fe03253be747f8
ZigbeeApp20200414/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs
old mode 100644 new mode 100755
@@ -84,7 +84,7 @@
                    if (listDataRoom.Count > 0)
                    {
                        //初始化房间和设备列表 
                        this.InitRoomAndDeviceRow(listDataRoom);
                        this.InitRoomAndDeviceRow(listDataRoom);
                    }
                    else
                    {
@@ -155,8 +155,8 @@
        /// </summary>
        /// <param name="listRoom">可以显示的房间对象</param>
        private void InitRoomAndDeviceRow(List<Common.Room> listRoom)
        {
            //房间列表控件
        {
            //房间列表控件
            var roomContr = new RoomDeviceGroupMenuControl(listRoom);
            bodyFrameLayout.AddChidren(roomContr);
@@ -200,26 +200,26 @@
            listView.RecoverHeight();
            DeviceSimpleSelectControl oldSelectContr = null;
            var listDevice = this.dicShowDevice[roomId];
            //获取设备类型的
            var listDevice = this.dicShowDevice[roomId];
            //获取设备类型的
            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
            //检查符合的设备
            List<CommonDevice> listSupportDevice = new List<CommonDevice> { };
            foreach (var dev in listDevice)
            {
                //新风面板的新风设备,则不显示
                if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                {
                    continue;
                }
                if (dev.Type == DeviceType.FreshAir)
                {
                    listSupportDevice.Add(dev);
                }
            }
            DeviceSimpleSelectControl oldDeviceSimpleSelectControl = null;
            int curIndex = 0;
            foreach (var dev in listDevice)
            {
                //新风面板的新风设备,则不显示
                if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                {
                    continue;
                }
                if (dev.Type == DeviceType.FreshAir)
                {
                    listSupportDevice.Add(dev);
                }
            }
            DeviceSimpleSelectControl oldDeviceSimpleSelectControl = null;
            int curIndex = 0;
            for (int i = 0; i < listSupportDevice.Count; i++)
            {
                string mainKey = Common.LocalDevice.Current.GetDeviceMainKeys(listSupportDevice[i]);
@@ -230,34 +230,34 @@
                {
                    //底线
                    contr.AddBottomLine();
                }
                }
                contr.ButtonClickEvent += (sender, e) =>
                {
                    if (contr.IsSelected)
                    {
                        return;
                    }
                    contr.IsSelected = true;
                {
                    if (contr.IsSelected)
                    {
                        return;
                    }
                    contr.IsSelected = true;
                    oldSelectContr = contr;
                    this.bindTargetKey = mainKey;
                    //contr.IsSelected = !contr.IsSelected;
                    ////选择了别的设备
                    //if (contr.IsSelected == true)
                    //{
                    //    if (oldSelectContr != null)
                    //    {
                    //        oldSelectContr.IsSelected = false;
                    //    }
                    //    oldSelectContr = contr;
                    //    this.bindTargetKey = mainKey;
                    //}
                    ////取消选择
                    //else
                    //{
                    //    oldSelectContr = null;
                    //    this.bindTargetKey = string.Empty;
                    //}
                    this.bindTargetKey = mainKey;
                    //contr.IsSelected = !contr.IsSelected;
                    ////选择了别的设备
                    //if (contr.IsSelected == true)
                    //{
                    //    if (oldSelectContr != null)
                    //    {
                    //        oldSelectContr.IsSelected = false;
                    //    }
                    //    oldSelectContr = contr;
                    //    this.bindTargetKey = mainKey;
                    //}
                    ////取消选择
                    //else
                    //{
                    //    oldSelectContr = null;
                    //    this.bindTargetKey = string.Empty;
                    //}
                };
                if (this.bindTargetKey == mainKey)
                {
@@ -295,19 +295,19 @@
        {
            bool canShow = false;
            //先清空
            this.dicShowDevice[room.Id] = new List<CommonDevice>();
            this.dicShowDevice[room.Id] = new List<CommonDevice>();
            foreach (var deviceKeys in room.ListDevice)
            {
                var device = Common.LocalDevice.Current.GetDevice(deviceKeys);
                if (device != null)
                {
                    if (device.Type == DeviceType.FreshAir)
                    {
                        //canShow = true;//  这个界面不显示房间
                        //收集可以显示的设备
                        this.dicShowDevice[room.Id].Add(device);
                    }
                    if (device.Type == DeviceType.FreshAir)
                    {
                        //canShow = true;//  这个界面不显示房间
                        //收集可以显示的设备
                        this.dicShowDevice[room.Id].Add(device);
                    }
                }