From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 17 十二月 2020 09:07:13 +0800
Subject: [PATCH] 新云端Ver1.3

---
 ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs |  132 +++++++++++++++++++++++++++++++++++--------
 1 files changed, 107 insertions(+), 25 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs
index 0e14181..eaec985 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs
@@ -7,7 +7,7 @@
     /// <summary>
     /// 寮曞鐣岄潰鐨勫叡閫氱晫闈�
     /// </summary>
-    public class GuideCommonForm : FrameLayout
+    public class GuideCommonForm : FrameLayoutBase
     {
         #region 鈻� 鍙橀噺澹版槑___________________________
 
@@ -37,7 +37,7 @@
         /// </summary>
         public virtual void ShowFrom()
         {
-            Phone.MainPage.ListRoomViewFrom.Instance.CanClick = false;
+            Phone.MainPage.LeftListRoomViewFrom.Instance.CanClick = false;
 
             UserView.UserPage.Instance.AddChidren(this);
             this.BackgroundColor = Common.ZigbeeColor.Current.GXCGrayBackgroundColor;
@@ -46,7 +46,7 @@
             var btnHouseIcon = new IconViewControl(69);
             btnHouseIcon.UnSelectedImagePath = "Item/Floor.png";
             btnHouseIcon.Y = Application.GetRealHeight(86);
-            btnHouseIcon.X = ControlCommonResourse.XXLeft;
+            btnHouseIcon.X = HdlControlResourse.XXLeft;
             this.AddChidren(btnHouseIcon);
             //娑堟伅鍥炬爣
             var btnMsg = new IconViewControl(69);
@@ -57,20 +57,49 @@
             //浣忓畢鍚嶅瓧
             this.btnHouse = new NormalViewControl(300, 95, true);
             btnHouse.TextSize = 24;
-            btnHouse.X = ControlCommonResourse.XXLeft;
+            btnHouse.X = HdlControlResourse.XXLeft;
             btnHouse.Y = Application.GetRealHeight(161);
             btnHouse.TextID = R.MyInternationalizationString.uMyResidence;
             this.AddChidren(btnHouse);
 
+            //宸﹀彸婊戝姩鎺т欢鐨勮儗鏅鍣�
+            var frameBack = new FrameLayout();
+            frameBack.Y = Application.GetRealHeight(302);
+            frameBack.Width = this.Width; ;
+            frameBack.Height = Application.GetRealHeight(478);
+            this.AddChidren(frameBack);
+
+            //鎴块棿婊戝姩鎺т欢宸﹁竟鐨勮櫄鎷熷浘鐗�
+            var mLeftImageView = new ImageView();
+            mLeftImageView.ImagePath = "RoomIcon/1.jpg";
+            mLeftImageView.Radius = (uint)Application.GetRealHeight(17);
+            mLeftImageView.Width = Application.GetRealWidth(717);
+            mLeftImageView.Height = Application.GetRealHeight(478);
+            //鎴块棿婊戝姩鎺т欢鍙宠竟鐨勮櫄鎷熷浘鐗�
+            var mRightImageView = new ImageView();
+            mRightImageView.ImagePath = "RoomIcon/2.jpg";
+            mRightImageView.Radius = (uint)Application.GetRealHeight(17);
+            mRightImageView.Width = mLeftImageView.Width;
+            mRightImageView.Height = mLeftImageView.Height;
+
             //宸﹀彸婊戝姩鐨勬埧闂�
             var roomPageView = new HorizontalPages();
-            roomPageView.Y = Application.GetRealHeight(302);
-            roomPageView.Height = Application.GetRealHeight(478);
-            this.AddChidren(roomPageView);
+            roomPageView.Width = frameBack.Width;
+            roomPageView.Height = frameBack.Height;
+            frameBack.AddChidren(roomPageView);
             //绐佸嚭杈硅窛
             roomPageView.TCBJ = Application.GetRealWidth(124);
             //涓や釜page涔嬮棿鐨勯棿璺�
             roomPageView.JMBJ = Application.GetRealWidth(58);
+            //鍦ㄨ繖涓帶浠剁殑涓嬮潰娣诲姞闃村奖鏁堟灉
+            var btnRoomBottomShadow = new NormalViewControl(717, 81, true);
+            btnRoomBottomShadow.Y = frameBack.Bottom;
+            btnRoomBottomShadow.Gravity = Gravity.CenterHorizontal;
+            btnRoomBottomShadow.UnSelectedImagePath = "Room/RoomCardShadow.png";
+            this.AddChidren(btnRoomBottomShadow);
+
+            //璁剧疆鎺у埗鏈�宸﹀拰鏈�鍙�2杈瑰~鍏呯殑鍋囪儗鏅疺iew锛屼笉璁剧疆涓嶆樉绀猴紝闇�瑕佸湪AddChidren 鍓嶈皟鐢ㄨ鏂规硶
+            roomPageView.SetLeftAndRightImageView(mLeftImageView, mRightImageView);
 
             //瀹㈠巺
             var room1 = new Common.Room();
@@ -79,6 +108,7 @@
             var roomView1 = new Phone.Device.CommonForm.RoomView(0, 0);
             roomPageView.AddChidren(roomView1);
             roomView1.Init(room1);
+            roomView1.HideName(false);
             //闃冲彴
             var room2 = new Common.Room();
             room2.BackgroundImage = "RoomIcon/1.jpg";
@@ -86,6 +116,7 @@
             var roomView2 = new Phone.Device.CommonForm.RoomView(0, 0);
             roomPageView.AddChidren(roomView2);
             roomView2.Init(room2);
+            roomView2.HideName(true);
             //鍗у
             var room3 = new Common.Room();
             room3.BackgroundImage = "RoomIcon/2.jpg";
@@ -93,12 +124,63 @@
             var roomView3 = new Phone.Device.CommonForm.RoomView(0, 0);
             roomPageView.AddChidren(roomView3);
             roomView3.Init(room3);
+            roomView3.HideName(true);
 
-            roomPageView.PageIndex = 1;
+            //鍦ㄦ埧闂村崱鐗囧乏杈规坊鍔犻伄缃�
+            var btnRoomLeftShadow = new FrameLayout();
+            btnRoomLeftShadow.Width = Application.GetRealWidth(124);
+            btnRoomLeftShadow.Height = roomPageView.Height - roomPageView.JMBJ * 2;
+            btnRoomLeftShadow.Gravity = Gravity.CenterVertical;
+            btnRoomLeftShadow.BackgroundColor = 0x1c000000;
+            btnRoomLeftShadow.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight);
+            frameBack.AddChidren(btnRoomLeftShadow);
+
+            //鍦ㄦ埧闂村崱鐗囧彸杈规坊鍔犻伄缃�
+            var btnRoomRightShadow = new FrameLayout();
+            btnRoomRightShadow.Width = btnRoomLeftShadow.Width;
+            btnRoomRightShadow.Height = btnRoomLeftShadow.Height;
+            btnRoomRightShadow.X = Application.GetRealWidth(956);
+            btnRoomRightShadow.Gravity = Gravity.CenterVertical;
+            btnRoomRightShadow.BackgroundColor = btnRoomLeftShadow.BackgroundColor;
+            btnRoomRightShadow.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
+            frameBack.AddChidren(btnRoomRightShadow);
+
+            //鎺т欢寮�濮嬫粦鍔ㄧ殑浜嬩欢
+            roomPageView.StartScrollAction += () =>
+            {
+                //寮�濮嬫粦鍔ㄦ椂,闅愯棌褰撳墠鐨勬暟鎹樉绀�
+                (roomPageView.GetChildren(roomPageView.PageIndex) as Phone.Device.CommonForm.RoomView).HideName(true);
+                btnRoomLeftShadow.Visible = false;
+                btnRoomRightShadow.Visible = false;
+                btnRoomBottomShadow.Visible = false;
+            };
+            roomPageView.EndScrollAction += () =>
+            {
+                int curIndex = roomPageView.PageIndex;
+                //鍓嶄竴寮犲崱鐗�
+                if (roomPageView.GetChildren(curIndex - 1) != null)
+                {
+                    (roomPageView.GetChildren(curIndex - 1) as Phone.Device.CommonForm.RoomView).HideName(true);
+                }
+                //褰撳墠鍗$墖
+                if (roomPageView.GetChildren(curIndex) != null)
+                {
+                    (roomPageView.GetChildren(curIndex) as Phone.Device.CommonForm.RoomView).HideName(false);
+                }
+                //涓嬩竴寮犲崱鐗�
+                if (roomPageView.GetChildren(curIndex + 1) != null)
+                {
+                    (roomPageView.GetChildren(curIndex + 1) as Phone.Device.CommonForm.RoomView).HideName(true);
+                }
+                btnRoomLeftShadow.Visible = true;
+                btnRoomRightShadow.Visible = true;
+                btnRoomBottomShadow.Visible = true;
+            };
+            roomPageView.PageIndex = 0;
 
             //鍦烘櫙鍜屽姛鑳界殑鎺т欢
             this.contrSwitch = new FrameLayout();
-            contrSwitch.Y = roomPageView.Bottom + Application.GetRealHeight(52);
+            contrSwitch.Y = frameBack.Bottom + Application.GetRealHeight(52);
             contrSwitch.Gravity = Gravity.CenterHorizontal;
             contrSwitch.Width = Application.GetRealWidth(804);
             contrSwitch.Height = Application.GetRealHeight(124);
@@ -125,33 +207,33 @@
             contrSwitch.AddChidren(btnFunction);
 
             //鑷畾涔夊満鏅�1
-            var sceneView1 = new Phone.Device.CommonForm.SceneMainView(0, 0);
+            var sceneView1 = new MainPage.Controls.SceneCardControl();
             sceneView1.X = Application.GetRealWidth(46);
-            sceneView1.Y = roomPageView.Bottom + Application.GetRealHeight(233);
+            sceneView1.Y = frameBack.Bottom + Application.GetRealHeight(233);
             this.AddChidren(sceneView1);
-            sceneView1.Init(new Common.SceneUI() { Name = "Getup", IconPath = "SceneIcon/0.png" });
+            sceneView1.InitControl(new Common.SceneUI() { Name = "Getup", IconPath = "SceneIcon/0.png" });
             //鑷畾涔夊満鏅�2
-            var sceneView2 = new Phone.Device.CommonForm.SceneMainView(0, 0);
+            var sceneView2 = new MainPage.Controls.SceneCardControl();
             sceneView2.X = Application.GetRealWidth(553);
             sceneView2.Y = sceneView1.Y;
             this.AddChidren(sceneView2);
-            sceneView2.Init(new Common.SceneUI() { Name = "Relax", IconPath = "SceneIcon/1.png" });
+            sceneView2.InitControl(new Common.SceneUI() { Name = "Relax", IconPath = "SceneIcon/1.png" });
             //鑷畾涔夊満鏅�3
-            var sceneView3 = new Phone.Device.CommonForm.SceneMainView(0, 0);
+            var sceneView3 = new MainPage.Controls.SceneCardControl();
             sceneView3.X = sceneView1.X;
             sceneView3.Y = sceneView1.Bottom + Application.GetRealHeight(14);
             this.AddChidren(sceneView3);
-            sceneView3.Init(new Common.SceneUI() { Name = "Dinner", IconPath = "SceneIcon/2.png" });
+            sceneView3.InitControl(new Common.SceneUI() { Name = "Dinner", IconPath = "SceneIcon/2.png" });
             //鑷畾涔夊満鏅�4
-            var sceneView4 = new Phone.Device.CommonForm.SceneMainView(0, 0);
+            var sceneView4 = new MainPage.Controls.SceneCardControl();
             sceneView4.X = sceneView2.X;
             sceneView4.Y = sceneView3.Y;
             this.AddChidren(sceneView4);
-            sceneView4.Init(new Common.SceneUI() { Name = "Goodnight", IconPath = "SceneIcon/3.png" });
+            sceneView4.InitControl(new Common.SceneUI() { Name = "Goodnight", IconPath = "SceneIcon/3.png" });
 
             //搴曢儴鑿滃崟
             var frameMenu = new FrameLayout();
-            frameMenu.Height = ControlCommonResourse.BottomFrameHeight;
+            frameMenu.Height = HdlControlResourse.BottomFrameHeight;
             frameMenu.Gravity = Gravity.BottomCenter;
             this.AddChidren(frameMenu);
             //绾�
@@ -161,8 +243,8 @@
             //涓婚〉
             var btnMenuHome = new IconViewControl(10, false);
             btnMenuHome.X = Application.GetRealWidth(109);
-            btnMenuHome.Width = Application.GetMinRealAverage(138);
-            btnMenuHome.Height = Application.GetMinRealAverage(98);
+            btnMenuHome.Width = this.GetPictrueRealSize(138);
+            btnMenuHome.Height = this.GetPictrueRealSize(98);
             btnMenuHome.UnSelectedImagePath = "Navigation/HomeSelected.png";
             frameMenu.AddChidren(btnMenuHome);
             var btnMenuHomeName = new NormalViewControl(btnMenuHome.Width, Application.GetRealHeight(40), false);
@@ -177,8 +259,8 @@
             //鍒嗙被
             var btnFenlei = new IconViewControl(10, false);
             btnFenlei.X = Application.GetRealWidth(469);
-            btnFenlei.Width = Application.GetMinRealAverage(138);
-            btnFenlei.Height = Application.GetMinRealAverage(98);
+            btnFenlei.Width = this.GetPictrueRealSize(138);
+            btnFenlei.Height = this.GetPictrueRealSize(98);
             btnFenlei.UnSelectedImagePath = "Navigation/Category.png";
             frameMenu.AddChidren(btnFenlei);
             var btnFenleiName = new NormalViewControl(btnFenlei.Width, Application.GetRealHeight(40), false);
@@ -193,8 +275,8 @@
             //鎴戠殑
             var btnMy = new IconViewControl(10, false);
             btnMy.X = Application.GetRealWidth(832);
-            btnMy.Width = Application.GetMinRealAverage(138);
-            btnMy.Height = Application.GetMinRealAverage(98);
+            btnMy.Width = this.GetPictrueRealSize(138);
+            btnMy.Height = this.GetPictrueRealSize(98);
             btnMy.UnSelectedImagePath = "Navigation/Setting.png";
             frameMenu.AddChidren(btnMy);
             var btnMyName = new NormalViewControl(btnMy.Width, Application.GetRealHeight(40), false);

--
Gitblit v1.8.0