From 34e965100d635346e2d4cd6e6013bdaed66b3004 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期四, 02 一月 2020 19:52:13 +0800
Subject: [PATCH] 2019.1.2-3
---
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs | 72 +++++------------------------------
1 files changed, 11 insertions(+), 61 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
index ae87a7d..a1ec3ee 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
@@ -196,30 +196,9 @@
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, ChidrenBindMode.BindEventOnly);
-
- 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";
@@ -253,6 +232,8 @@
}
};
}
+ //璋冩暣涓�涓嬮珮搴�
+ listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(185));
});
}
@@ -285,7 +266,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);
@@ -382,6 +363,9 @@
}
};
}
+
+ //鍒楄〃鑷繁鏈変釜23鐨刌杞村潗鏍�
+ listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23), Application.GetRealHeight(300 - 23));
}
#endregion
@@ -404,44 +388,10 @@
//濡傛灉宸茬粡鍒嗕韩浜�,鍒欎笉鏄剧ず
continue;
}
- 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