From 3dcbd186c42c598c0c08d1cd37034cf2baa09e54 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 30 十二月 2019 15:47:51 +0800
Subject: [PATCH] 合并了代码

---
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs |   52 ++++++++++++----------------------------------------
 1 files changed, 12 insertions(+), 40 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
index ae87a7d..cef5888 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
@@ -207,14 +207,15 @@
                     btnPic.Width = Application.GetRealWidth(844);
                     btnPic.Height = Application.GetRealHeight(420);
                     btnPic.ImagePath = data.IconPath;
-                    btnPic.Radius = 8;
+                    btnPic.Radius = (uint)Application.GetRealHeight(17);
                     frameContr.AddChidren(btnPic, ChidrenBindMode.BindEventOnly);
 
                     var btnName = new NormalViewControl(251, 282, true);
+                    btnName.IsMoreLines = true;
                     btnName.X = ControlCommonResourse.XXLeft;
                     btnName.Y = Application.GetRealHeight(58);
                     btnName.BackgroundColor = 0xff333333;
-                    btnName.Radius = 8;
+                    btnName.RadiusEx = 17;
                     btnName.Text = data.Name;
                     btnName.TextSize = 15;
                     btnName.TextColor = UserCenterColor.Current.White;
@@ -253,6 +254,8 @@
                         }
                     };
                 }
+                //璋冩暣涓�涓嬮珮搴�
+                listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(185));
             });
         }
 
@@ -285,7 +288,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 +385,9 @@
                     }
                 };
             }
+
+            //鍒楄〃鑷繁鏈変釜23鐨刌杞村潗鏍�
+            listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23), Application.GetRealHeight(300 - 23));
         }
 
         #endregion
@@ -404,44 +410,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