gxc
2020-02-28 66a9965c44ecc32a6696abca876ab9d1cd091584
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
@@ -178,31 +178,10 @@
                foreach (var data in listScene)
                {
                    //场景图片
                    var frameContr = new FrameLayoutControl();
                    frameContr.UseClickStatu = false;
                    frameContr.Height = Application.GetRealHeight(470);
                    //场景控件
                    var frameContr = new ScenePictrueControl();
                    listView.AddChidrenFrame(frameContr);
                    //场景图片
                    var btnPic = new ImageView();
                    btnPic.X = Application.GetRealWidth(179);
                    btnPic.Width = Application.GetRealWidth(844);
                    btnPic.Height = Application.GetRealHeight(420);
                    btnPic.ImagePath = data.IconPath;
                    btnPic.Radius = 17;
                    frameContr.AddChidren(btnPic);
                    var btnName = new NormalViewControl(251, 282, true);
                    btnName.X = ControlCommonResourse.XXLeft;
                    btnName.Gravity = Gravity.CenterVertical;
                    btnName.BackgroundColor = 0xff333333;
                    btnName.Radius = 17;
                    btnName.Text = data.Name;
                    btnName.TextSize = 15;
                    btnName.TextColor = UserCenterColor.Current.White;
                    btnName.TextAlignment = TextAlignment.Center;
                    frameContr.AddChidren(btnName);
                    frameContr.InitControl(data);
                    var btnSelect = new IconViewControl(58);
                    btnSelect.UnSelectedImagePath = "Item/ItemUnSelected.png";
@@ -236,6 +215,8 @@
                        }
                    };
                }
                //调整一下高度
                listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(185));
            });
        }
@@ -262,13 +243,13 @@
                }
                else
                {
                    var frameBack = new FrameLayoutControl(false);
                    var frameBack = new FrameLayout();
                    frameBack.X = ControlCommonResourse.XXLeft;
                    frameBack.Y = Application.GetRealHeight(178);
                    frameBack.BackgroundColor = UserCenterColor.Current.White;
                    frameBack.Width = bodyFrameLayout.Width;
                    frameBack.Height = Application.GetRealHeight(1650);
                    frameBack.RadiusEx = 20;
                    frameBack.Radius = (uint)Application.GetRealHeight(58);
                    frameDeviceTable.AddChidren(frameBack);
                    var listView = new VerticalListControl(23);
@@ -317,6 +298,8 @@
        private void AddDeviceRow(List<CommonDevice> listDevice, VerticalListControl listView)
        {
            listView.RemoveAll();
            //还原高度
            listView.RecoverHeight();
            foreach (var device in listDevice)
            {
@@ -365,6 +348,8 @@
                    }
                };
            }
            //列表自己有个23的Y轴坐标
            listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23), Application.GetRealHeight(300 - 23));
        }
        #endregion
@@ -382,44 +367,10 @@
            var dic = new Dictionary<int, List<CommonDevice>>();
            foreach (var device in listDevice)
            {
                var typeInfo = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<ZigBee.Device.CommonDevice>() { device });
                if (device.Type == DeviceType.IASZone)
                var typeInfo = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device);
                if (dic.ContainsKey(typeInfo.BeloneTextId) == false)
                {
                    //这个强制为传感器
                    typeInfo.BeloneTextId = R.MyInternationalizationString.uDeviceBelongId1200;
                    typeInfo.ConcreteType = Common.DeviceConcreteType.Sensor;
                }
                if (device.Type == DeviceType.OnOffOutput)
                {
                    //继电器的时候,需要特殊处理
                    if (device.DfunctionType == DeviceFunctionType.A开关)
                    {
                        typeInfo.BeloneTextId = R.MyInternationalizationString.uSwitch;
                    }
                    else if (device.DfunctionType == DeviceFunctionType.A插座)
                    {
                        typeInfo.BeloneTextId = R.MyInternationalizationString.uSocket1;
                    }
                    else if (device.DfunctionType == DeviceFunctionType.A灯光)
                    {
                        typeInfo.BeloneTextId = R.MyInternationalizationString.uLight;
                    }
                    else
                    {
                        //继电器
                        typeInfo.BeloneTextId = R.MyInternationalizationString.uDeviceBelongId2300;
                    }
                    if (dic.ContainsKey(typeInfo.BeloneTextId) == false)
                    {
                        dic[typeInfo.BeloneTextId] = new List<CommonDevice>();
                    }
                }
                else
                {
                    if (dic.ContainsKey(typeInfo.BeloneTextId) == false)
                    {
                        dic[typeInfo.BeloneTextId] = new List<CommonDevice>();
                    }
                    dic[typeInfo.BeloneTextId] = new List<CommonDevice>();
                }
                dic[typeInfo.BeloneTextId].Add(device);
            }