From 00ab3ddb140ba8bb88b5cf572b004a85e1da85e9 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期四, 02 一月 2020 19:51:56 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into DEV_GXC --- ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 238 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs new file mode 100755 index 0000000..f2d4623 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideCommonForm.cs @@ -0,0 +1,238 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter.Guide +{ + /// <summary> + /// 寮曞鐣岄潰鐨勫叡閫氱晫闈� + /// </summary> + public class GuideCommonForm : FrameLayout + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鍦烘櫙鍜屽姛鑳界殑鎺т欢 + /// </summary> + public FrameLayout contrSwitch = null; + /// <summary> + /// 鍦烘櫙鎺т欢 + /// </summary> + public NormalViewControl btnScene = null; + /// <summary> + /// 鍔熻兘 + /// </summary> + public NormalViewControl btnFunction = null; + /// <summary> + /// 浣忓畢鍚嶇О + /// </summary> + public NormalViewControl btnHouse = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鏄剧ず鐣岄潰 + /// </summary> + public virtual void ShowFrom() + { + Phone.Device.Room.RoomManagement.Instance.CanClick = false; + + UserView.UserPage.Instance.AddChidren(this); + this.BackgroundColor = Common.ZigbeeColor.Current.GXCGrayBackgroundColor; + + //浣忓畢鍒楄〃鍥炬爣 + var btnHouseIcon = new IconViewControl(69); + btnHouseIcon.UnSelectedImagePath = "Item/Floor.png"; + btnHouseIcon.Y = Application.GetRealHeight(86); + btnHouseIcon.X = ControlCommonResourse.XXLeft; + this.AddChidren(btnHouseIcon); + //娑堟伅鍥炬爣 + var btnMsg = new IconViewControl(69); + btnMsg.Y = Application.GetRealHeight(86); + btnMsg.X = Application.GetRealWidth(953); + btnMsg.UnSelectedImagePath = "Item/Message.png"; + this.AddChidren(btnMsg); + //浣忓畢鍚嶅瓧 + this.btnHouse = new NormalViewControl(300, 95, true); + btnHouse.TextSize = 24; + btnHouse.X = ControlCommonResourse.XXLeft; + btnHouse.Y = Application.GetRealHeight(161); + btnHouse.TextID = R.MyInternationalizationString.uMyResidence; + this.AddChidren(btnHouse); + + //宸﹀彸婊戝姩鐨勬埧闂� + var roomPageView = new HorizontalPages(); + roomPageView.Y = Application.GetRealHeight(302); + roomPageView.Height = Application.GetRealHeight(478); + this.AddChidren(roomPageView); + //绐佸嚭杈硅窛 + roomPageView.TCBJ = Application.GetRealWidth(181); + //涓や釜page涔嬮棿鐨勯棿璺� + roomPageView.JMBJ = Application.GetRealWidth(0); + + //瀹㈠巺 + var room1 = new Common.Room(); + room1.BackgroundImage = "RoomIcon/0.JPG"; + room1.Name = Language.StringByID(R.MyInternationalizationString.uLivingRoom); + var roomView1 = new Phone.Device.CommonForm.RoomView(0, 0); + roomPageView.AddChidren(roomView1); + roomView1.Init(room1); + //闃冲彴 + var room2 = new Common.Room(); + room2.BackgroundImage = "RoomIcon/1.JPG"; + room2.Name = Language.StringByID(R.MyInternationalizationString.uBalcony); + var roomView2 = new Phone.Device.CommonForm.RoomView(0, 0); + roomPageView.AddChidren(roomView2); + roomView2.Init(room2); + //鍗у + var room3 = new Common.Room(); + room3.BackgroundImage = "RoomIcon/2.JPG"; + room3.Name = Language.StringByID(R.MyInternationalizationString.uBedroom); + var roomView3 = new Phone.Device.CommonForm.RoomView(0, 0); + roomPageView.AddChidren(roomView3); + roomView3.Init(room3); + + roomPageView.PageIndex = 1; + + //鍦烘櫙鍜屽姛鑳界殑鎺т欢 + this.contrSwitch = new FrameLayout(); + contrSwitch.Y = roomPageView.Bottom + Application.GetRealHeight(52); + contrSwitch.Gravity = Gravity.CenterHorizontal; + contrSwitch.Width = Application.GetRealWidth(804); + contrSwitch.Height = Application.GetRealHeight(124); + contrSwitch.Radius = (uint)Application.GetRealHeight(124) / 2; + contrSwitch.BackgroundColor = 0xff232323; + this.AddChidren(contrSwitch); + //鍦烘櫙 + this.btnScene = new NormalViewControl(contrSwitch.Width / 2 - Application.GetRealHeight(124) / 2, contrSwitch.Height, false); + btnScene.X = Application.GetRealHeight(124) / 2; + btnScene.IsBold = true; + btnScene.TextAlignment = TextAlignment.Center; + btnScene.TextColor = 0xffffffff; + btnScene.TextSize = 16; + btnScene.TextID = R.MyInternationalizationString.uScence; + contrSwitch.AddChidren(btnScene); + + //鍔熻兘 + this.btnFunction = new NormalViewControl(btnScene.Width, contrSwitch.Height, false); + btnFunction.X = btnScene.Right; + btnFunction.TextAlignment = TextAlignment.Center; + btnFunction.TextColor = 0xFFCBCACA; + btnFunction.TextSize = 15; + btnFunction.TextID = R.MyInternationalizationString.uFunction; + contrSwitch.AddChidren(btnFunction); + + //鑷畾涔夊満鏅�1 + var sceneView1 = new Phone.Device.CommonForm.SceneMainView(0, 0); + sceneView1.X = Application.GetRealWidth(46); + sceneView1.Y = roomPageView.Bottom + Application.GetRealHeight(233); + this.AddChidren(sceneView1); + sceneView1.Init(new Common.SceneUI() { Name = "Getup", IconPath = "SceneIcon/0.jpg" }); + //鑷畾涔夊満鏅�2 + var sceneView2 = new Phone.Device.CommonForm.SceneMainView(0, 0); + sceneView2.X = Application.GetRealWidth(553); + sceneView2.Y = sceneView1.Y; + this.AddChidren(sceneView2); + sceneView2.Init(new Common.SceneUI() { Name = "Relax", IconPath = "SceneIcon/1.jpg" }); + //鑷畾涔夊満鏅�3 + var sceneView3 = new Phone.Device.CommonForm.SceneMainView(0, 0); + sceneView3.X = sceneView1.X; + sceneView3.Y = sceneView1.Bottom + Application.GetRealHeight(14); + this.AddChidren(sceneView3); + sceneView3.Init(new Common.SceneUI() { Name = "Dinner", IconPath = "SceneIcon/2.jpg" }); + //鑷畾涔夊満鏅�4 + var sceneView4 = new Phone.Device.CommonForm.SceneMainView(0, 0); + sceneView4.X = sceneView2.X; + sceneView4.Y = sceneView3.Y; + this.AddChidren(sceneView4); + sceneView4.Init(new Common.SceneUI() { Name = "Goodnight", IconPath = "SceneIcon/3.jpg" }); + + //搴曢儴鑿滃崟 + var frameMenu = new FrameLayout(); + frameMenu.Height = ControlCommonResourse.BottomFrameHeight; + frameMenu.Gravity = Gravity.BottomCenter; + this.AddChidren(frameMenu); + //绾� + var btnLine = new NormalViewControl(frameMenu.Width, 1, false); + btnLine.BackgroundColor = Common.ZigbeeColor.Current.GXCBottomLineColor; + frameMenu.AddChidren(btnLine); + //涓婚〉 + var btnMenuHome = new IconViewControl(10, false); + btnMenuHome.X = Application.GetRealWidth(109); + btnMenuHome.Width = Application.GetMinRealAverage(138); + btnMenuHome.Height = Application.GetMinRealAverage(98); + btnMenuHome.UnSelectedImagePath = "Navigation/HomeSelected.png"; + frameMenu.AddChidren(btnMenuHome); + var btnMenuHomeName = new NormalViewControl(btnMenuHome.Width, Application.GetRealHeight(40), false); + btnMenuHomeName.X = btnMenuHome.X; + btnMenuHomeName.Y = btnMenuHome.Bottom; + btnMenuHomeName.TextAlignment = TextAlignment.Center; + btnMenuHomeName.TextColor = 0xFF232323; + btnMenuHomeName.TextSize = 10; + btnMenuHomeName.TextID = R.MyInternationalizationString.HomePage; + frameMenu.AddChidren(btnMenuHomeName); + + //鍒嗙被 + var btnFenlei = new IconViewControl(10, false); + btnFenlei.X = Application.GetRealWidth(469); + btnFenlei.Width = Application.GetMinRealAverage(138); + btnFenlei.Height = Application.GetMinRealAverage(98); + btnFenlei.UnSelectedImagePath = "Navigation/Category.png"; + frameMenu.AddChidren(btnFenlei); + var btnFenleiName = new NormalViewControl(btnFenlei.Width, Application.GetRealHeight(40), false); + btnFenleiName.X = btnFenlei.X; + btnFenleiName.Y = btnFenlei.Bottom; + btnFenleiName.TextAlignment = TextAlignment.Center; + btnFenleiName.TextColor = 0xFF232323; + btnFenleiName.TextSize = 10; + btnFenleiName.TextID = R.MyInternationalizationString.Category; + frameMenu.AddChidren(btnFenleiName); + + //鎴戠殑 + var btnMy = new IconViewControl(10, false); + btnMy.X = Application.GetRealWidth(832); + btnMy.Width = Application.GetMinRealAverage(138); + btnMy.Height = Application.GetMinRealAverage(98); + btnMy.UnSelectedImagePath = "Navigation/Setting.png"; + frameMenu.AddChidren(btnMy); + var btnMyName = new NormalViewControl(btnMy.Width, Application.GetRealHeight(40), false); + btnMyName.X = btnMy.X; + btnMyName.Y = btnMy.Bottom; + btnMyName.TextAlignment = TextAlignment.Center; + btnMyName.TextColor = 0xFF232323; + btnMyName.TextSize = 10; + btnMyName.TextID = R.MyInternationalizationString.Me; + frameMenu.AddChidren(btnMyName); + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 娣诲姞銆愭垜鐭ラ亾浜嗐�戠殑鎸夐挳 + /// </summary> + /// <returns></returns> + public NormalViewControl AddIKnwonButton() + { + var btnContr = new NormalViewControl(397, 86, true); + btnContr.BorderWidth = 1; + btnContr.BorderColor = UserCenterColor.Current.White; + btnContr.Radius = (uint)Application.GetRealHeight(86) / 2; + btnContr.BackgroundColor = 0x26FFFFFF; + btnContr.Gravity = Gravity.CenterHorizontal; + btnContr.Y = Application.GetRealHeight(1650); + btnContr.TextAlignment = TextAlignment.Center; + btnContr.TextColor = UserCenterColor.Current.White; + btnContr.TextSize = 16; + btnContr.TextID = R.MyInternationalizationString.uIKnwon; + this.AddChidren(btnContr); + + return btnContr; + } + + #endregion + } +} -- Gitblit v1.8.0