From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28

---
 ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs |   61 +++++++-----------------------
 1 files changed, 14 insertions(+), 47 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
index 03a1c54..a1ec3ee 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedContentForm.cs
@@ -1,7 +1,6 @@
 锘縰sing System;
 using System.Collections.Generic;
 using System.Text;
-using System.Threading.Tasks;
 using ZigBee.Device;
 
 namespace Shared.Phone.UserCenter.SharedContent
@@ -58,6 +57,7 @@
         /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
         /// </summary>
         /// <param name="i_room">鏌ョ湅鐨勬埧闂村璞�</param>
+        /// <param name="i_memberShardInfo">鎴愬憳鐨勫垎浜暟鎹�</param>
         public void ShowForm(Common.Room i_room, MemberShardInfoData i_memberShardInfo)
         {
             this.lookRoom = i_room;
@@ -196,18 +196,14 @@
                 foreach (var data in listScene)
                 {
                     //鍦烘櫙鍥剧墖
-                    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;
+                    var frameContr = new ScenePictrueControl();
                     listView.AddChidrenFrame(frameContr);
+                    frameContr.InitControl(data);
 
                     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)
@@ -236,6 +232,8 @@
                         }
                     };
                 }
+                //璋冩暣涓�涓嬮珮搴�
+                listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(185));
             });
         }
 
@@ -262,13 +260,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);
@@ -365,6 +363,9 @@
                     }
                 };
             }
+
+            //鍒楄〃鑷繁鏈変釜23鐨刌杞村潗鏍�
+            listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23), Application.GetRealHeight(300 - 23));
         }
 
         #endregion
@@ -387,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