From 4dce704aaf8587cf3f91cf88f2208315a03c4cbb Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 08 四月 2020 13:54:58 +0800
Subject: [PATCH] 先上传一个版本

---
 ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs |   60 ++++++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 44 insertions(+), 16 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
index 8cb0a34..f135420 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
@@ -54,35 +54,55 @@
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
-            //鎴块棿鍥剧墖
-            var btnPic = new ImageView();
-            btnPic.Y = Application.GetRealHeight(60);
-            btnPic.Width = Application.GetMinRealAverage(887);
-            btnPic.Height = Application.GetMinRealAverage(444);
-            btnPic.Radius = (uint)Application.GetRealHeight(17);
-            btnPic.Gravity = Gravity.CenterHorizontal;
-            btnPic.ImagePath = "RoomIcon/0.JPG";
-            bodyFrameLayout.AddChidren(btnPic);
-            var btnShadow = new PicViewControl(916, 487);
-            btnShadow.Y = btnPic.Y;
+            //鍔犱竴涓櫧鑹茶儗鏅�
+            var frameBack1 = new FrameLayout();
+            frameBack1.Height = Application.GetRealHeight(450);
+            frameBack1.Y = Application.GetRealHeight(196);
+            frameBack1.BackgroundColor = UserCenterColor.Current.White;
+            frameBack1.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+            bodyFrameLayout.AddChidren(frameBack1);
+
+            //鍒濆鍖栦俊鎭甯�
+            var tableContr = new InformationEditorControl();
+            this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 613, 1175);
+
+            //鎴块棿鍥剧墖搴曢儴闃村奖
+            var btnShadow = new PicViewControl(853, 593);
+            btnShadow.Y = Application.GetRealHeight(58);
             btnShadow.Gravity = Gravity.CenterHorizontal;
             btnShadow.UnSelectedImagePath = "Room/RoomShadow.png";
             bodyFrameLayout.AddChidren(btnShadow);
-            btnShadow.MouseUpEventHandler += (sender, e) =>
+            //鎴块棿鍥剧墖
+            var btnPic = new ImageView();
+            btnPic.Y = Application.GetRealHeight(60);
+            btnPic.Width = Application.GetMinRealAverage(824);
+            btnPic.Height = Application.GetMinRealAverage(549);
+            btnPic.Radius = (uint)Application.GetRealHeight(17);
+            btnPic.Gravity = Gravity.CenterHorizontal;
+            btnPic.ImagePath = "RoomIcon/0.jpg";
+            bodyFrameLayout.AddChidren(btnPic);
+            //鍥剧墖閬僵
+            var btnZhezhao = new FrameLayout();
+            btnZhezhao.Width = btnPic.Width;
+            btnZhezhao.Height = btnPic.Height;
+            btnZhezhao.Y = btnPic.Y;
+            btnZhezhao.Gravity = Gravity.CenterHorizontal;
+            btnZhezhao.Radius = btnPic.Radius;
+            bodyFrameLayout.AddChidren(btnZhezhao);
+            btnZhezhao.MouseUpEventHandler += (sender, e) =>
             {
                 //鎴块棿鍥剧墖閫夋嫨
                 this.RoomPictrueSelect(btnPic);
             };
+
+            //鍙樻洿涓�涓嬮偅涓櫧鑹茶儗鏅殑Y杞�,瀹冨埌鍥剧墖鐨勪腑闂翠綅缃�
+            frameBack1.Y = btnPic.Y + btnPic.Height / 2;
 
             this.newRoom = new Common.Room();
             newRoom.FloorId = this.floorKeys;
             newRoom.BackgroundImage = btnPic.ImagePath;
             newRoom.Humidity = -1000;
             newRoom.Temperatrue = -1000;
-
-            //鍒濆鍖栨甯�
-            var tableContr = new InformationEditorControl();
-            this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 562, 1175);
 
             //娣诲姞鍏ㄩ儴鑿滃崟
             this.AddAllMenuRow(tableContr, btnPic);
@@ -180,6 +200,14 @@
                 }
 
                 newRoom.FloorId = this.floorKeys;
+                if (newRoom.Humidity == -1000)
+                {
+                    newRoom.Humidity = 0;
+                }
+                if (newRoom.Temperatrue == -1000)
+                {
+                    newRoom.Temperatrue = 0;
+                }
 
                 HdlRoomLogic.Current.AddRoom(newRoom);
                 this.FinishEditorEvent?.Invoke();

--
Gitblit v1.8.0