From 23fb45dd846ed8b62304c408c6bbe64265d4ac8b Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 20 十二月 2019 18:57:16 +0800
Subject: [PATCH] 代码合并
---
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs | 75 ++++++++++++++++---------------------
1 files changed, 32 insertions(+), 43 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
index 8293b3d..df51a9c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
@@ -181,16 +181,33 @@
//鍦烘櫙鍥剧墖
var frameContr = new FrameLayoutControl();
frameContr.UseClickStatu = false;
- frameContr.Width = Application.GetRealWidth(878);
- frameContr.Height = Application.GetRealHeight(440);
- frameContr.Gravity = Gravity.CenterHorizontal;
- frameContr.BackgroundImagePath = data.IconPath;
+ frameContr.Height = Application.GetRealHeight(470);
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 = (uint)Application.GetRealHeight(17);
+ frameContr.AddChidren(btnPic);
+
+ var btnName = new NormalViewControl(251, 282, true);
+ btnName.X = ControlCommonResourse.XXLeft;
+ btnName.Y = Application.GetRealHeight(58);
+ btnName.BackgroundColor = 0xff333333;
+ btnName.RadiusEx = 17;
+ btnName.Text = data.Name;
+ btnName.TextSize = 15;
+ btnName.TextColor = UserCenterColor.Current.White;
+ btnName.TextAlignment = TextAlignment.Center;
+ frameContr.AddChidren(btnName);
var btnSelect = new IconViewControl(58);
btnSelect.UnSelectedImagePath = "Item/ItemUnSelected.png";
btnSelect.SelectedImagePath = "Item/ItemSelected.png";
- btnSelect.X = Application.GetRealWidth(786);
+ btnSelect.X = Application.GetRealWidth(887);
btnSelect.Y = Application.GetRealHeight(35);
frameContr.AddChidren(btnSelect, ChidrenBindMode.BindEventOnly);
if (dicSelectScene.ContainsKey(data.Id) == true)
@@ -219,6 +236,8 @@
}
};
}
+ //璋冩暣涓�涓嬮珮搴�
+ listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(185));
});
}
@@ -245,13 +264,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);
@@ -300,6 +319,8 @@
private void AddDeviceRow(List<CommonDevice> listDevice, VerticalListControl listView)
{
listView.RemoveAll();
+ //杩樺師楂樺害
+ listView.RecoverHeight();
foreach (var device in listDevice)
{
@@ -348,6 +369,8 @@
}
};
}
+ //鍒楄〃鑷繁鏈変釜23鐨刌杞村潗鏍�
+ listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23), Application.GetRealHeight(300 - 23));
}
#endregion
@@ -366,43 +389,9 @@
foreach (var device in listDevice)
{
var typeInfo = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<ZigBee.Device.CommonDevice>() { device });
- if (device.Type == DeviceType.IASZone)
+ 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