From 9904031f5291daaf56985146bb671f25e18ebbdf Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 02 四月 2020 19:51:31 +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