From 00ab3ddb140ba8bb88b5cf572b004a85e1da85e9 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期四, 02 一月 2020 19:51:56 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into DEV_GXC --- ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs | 69 +++------------------------------- 1 files changed, 7 insertions(+), 62 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs index 0d30915..d4bea54 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs +++ b/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 = 8; - frameContr.AddChidren(btnPic); - - var btnName = new NormalViewControl(251, 282, true); - btnName.X = ControlCommonResourse.XXLeft; - btnName.Y = Application.GetRealHeight(58); - btnName.BackgroundColor = 0xff333333; - btnName.Radius = 8; - 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"; @@ -270,7 +249,7 @@ frameBack.BackgroundColor = UserCenterColor.Current.White; frameBack.Width = bodyFrameLayout.Width; frameBack.Height = Application.GetRealHeight(1650); - frameBack.Radius = 20; + frameBack.Radius = (uint)Application.GetRealHeight(58); frameDeviceTable.AddChidren(frameBack); var listView = new VerticalListControl(23); @@ -388,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); } -- Gitblit v1.8.0