From 8fdb0e0c9d04b5069e9c83e9a5f38ba085485663 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期二, 07 三月 2023 18:21:29 +0800 Subject: [PATCH] 2023年03月07日18:21:18 --- HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs | 169 ++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 122 insertions(+), 47 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs index c62b717..b6922dc 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs @@ -32,13 +32,25 @@ /// </summary> private TopView topView; /// <summary> + /// 褰撳墠璁惧鍚嶇О + /// </summary> + private Button btnCurrDeviceName; + /// <summary> + /// 鍖哄煙 + /// </summary> + private Button btnCurrDeviceRoom; + /// <summary> + /// 鐢甸噺 + /// </summary> + private Button btnCell; + /// <summary> ///鏀惰棌鍥炬爣 /// </summary> private Button btnCollectIcon; /// <summary> /// 闂ㄩ攣鐘舵�� /// </summary> - private CustomFrameLayout doorLockFL; + private Button btnDoorLockIcon; /// <summary> /// 瀹炴椂瑙嗛 /// </summary> @@ -55,6 +67,7 @@ /// 鍘嗗彶璁板綍 /// </summary> private CustomFrameLayout recordFL; + /// <summary> /// 琛ㄧず鏉ヨ嚜閭d釜鐣岄潰 /// </summary> @@ -82,7 +95,7 @@ //鍒濆鍖朥I this.InitUI(); //鍒濆鍖栦簨浠� - this.Events(); + this.EventListener (); } @@ -95,17 +108,71 @@ this.BackgroundColor = MusicColor.ViewColor; this.topView = new TopView(); this.topView.setBtn.Visible = true; - this.topView.topNameBtn.Text = this.device.name; + this.topView.topNameBtn.TextID =StringId.shipinmensuo; this.AddChidren(topView.TopFLayoutView()); - var middLayout = new FrameLayout + var middleFl=new FrameLayout { Y = topView.fLayout.Bottom, Height = Application.GetRealHeight(H_W.H - H_W.T_Height), }; - this.AddChidren(middLayout); + this.AddChidren(middleFl); + + var whiteFl = new FrameLayout + { + Y = Application.GetRealHeight(24), + X = Application.GetRealWidth(24), + Height = Application.GetRealHeight(526), + Width = Application.GetRealWidth(327), + BackgroundImagePath = "MusicIcon/playBj.png", + Name = "fl", + }; + middleFl.AddChidren(whiteFl); + + + btnCurrDeviceName= new Button + { + TextSize = TextSize.Text24, + TextColor = MusicColor.Text18Color, + Width = Application.GetRealWidth(160), + Height = Application.GetRealHeight(33), + Y = Application.GetRealHeight(16), + X = Application.GetRealWidth(16), + Text = this.device.name, + TextAlignment=TextAlignment.CenterLeft, + }; + whiteFl.AddChidren(btnCurrDeviceName); + + btnCurrDeviceRoom = new Button + { + TextSize = TextSize.Text12, + TextColor = MusicColor.MusicNoTxetColor, + Width = Application.GetRealWidth(160), + Height = Application.GetRealHeight(33), + Y = btnCurrDeviceName.Bottom+ Application.GetRealHeight(4), + X = Application.GetRealWidth(16), + Text = this.device.GetRoomListName(), + TextAlignment = TextAlignment.CenterLeft, + }; + whiteFl.AddChidren(btnCurrDeviceRoom); + btnCurrDeviceRoom.Width=btnCurrDeviceName.GetTextWidth(); + + btnCell = new Button + { + TextSize = TextSize.Text10, + TextColor = MusicColor.TextColor, + Y = Application.GetRealHeight(43), + X = btnCurrDeviceRoom.Right+Application.GetRealWidth(17), + //Text ="60"+"%", + //TextAlignment = TextAlignment.Center, + Width = Application.GetRealWidth(36), + Height = Application.GetRealWidth(36), + UnSelectedImagePath ="FunctionIcon/DoorLock/Cell.png", + }; + whiteFl.AddChidren(btnCell); + btnCollectIcon = new Button { - X = Application.GetRealWidth(273), + X = Application.GetRealWidth(264), Y = Application.GetRealHeight(14), Width = Application.GetRealWidth(40), Height = Application.GetRealWidth(40), @@ -114,54 +181,63 @@ IsSelected= this.device.collect, Name = "collect" }; - middLayout.AddChidren(btnCollectIcon); + whiteFl.AddChidren(btnCollectIcon); //闂ㄩ攣鐘舵�� - doorLockFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); - middLayout.AddChidren(doorLockFL); - doorLockFL.X = Application.GetRealWidth(40); - doorLockFL.Y = btnCollectIcon.Bottom + Application.GetRealHeight(20); - doorLockFL.AddImageView(); - doorLockFL.AddTextButtonView(); - doorLockFL.GetTextButton().TextID = StringId.shishishipin; + btnDoorLockIcon = new Button + { + X = Application.GetRealWidth(65), + Y = Application.GetRealHeight(108), + Width = Application.GetRealWidth(198), + Height = Application.GetRealWidth(200), + UnSelectedImagePath = "FunctionIcon/DoorLock/UnLocked.png", + SelectedImagePath = "FunctionIcon/DoorLock/UnLocking.png", + }; + whiteFl.AddChidren(btnDoorLockIcon); + //瀹炴椂瑙嗛 rtvFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); - middLayout.AddChidren(rtvFL); - rtvFL.X = Application.GetRealWidth(20); - rtvFL.Y = Application.GetRealHeight(300); + whiteFl.AddChidren(rtvFL); + rtvFL.Y = btnDoorLockIcon.Bottom+ Application.GetRealHeight(45); + rtvFL.X = Application.GetRealWidth(68); rtvFL.AddImageView(); rtvFL.AddTextButtonView(); + rtvFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/RTV.png"; rtvFL.GetTextButton().TextID = StringId.shishishipin; + //鍘嗗彶璁板綍 + recordFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); + whiteFl.AddChidren(recordFL); + recordFL.Y = btnDoorLockIcon.Bottom + Application.GetRealHeight(45); + recordFL.X = rtvFL.Right + Application.GetRealHeight(CustomFrameLayout.interval); + recordFL.AddImageView(); + recordFL.AddTextButtonView(); + recordFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/HistoryList.png"; + recordFL.GetTextButton().TextID = StringId.lishijilu; //涓�閿紑閿� openFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); - middLayout.AddChidren(openFL); - openFL.X = rtvFL.Right + Application.GetRealWidth(20); - openFL.Y = Application.GetRealHeight(300); + whiteFl.AddChidren(openFL); + openFL.X = rtvFL.X; + openFL.Y = rtvFL.Bottom+Application.GetRealHeight(14); openFL.AddImageView(); openFL.AddTextButtonView(); + openFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png"; openFL.GetTextButton().TextID = StringId.yijiankaisuo; //涓存椂瀵嗙爜 pswFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); - middLayout.AddChidren(pswFL); - pswFL.X = openFL.Right + Application.GetRealWidth(20); - pswFL.Y = Application.GetRealHeight(300); + whiteFl.AddChidren(pswFL); + pswFL.X = recordFL.X; + pswFL.Y = rtvFL.Bottom + Application.GetRealHeight(14); pswFL.AddImageView(); pswFL.AddTextButtonView(); + pswFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png"; pswFL.GetTextButton().TextID = StringId.linshimima1; - //鍘嗗彶璁板綍 - recordFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); - middLayout.AddChidren(recordFL); - recordFL.X = Application.GetRealWidth(20); - recordFL.Y = Application.GetRealHeight(300 + 100); - recordFL.AddImageView(); - recordFL.AddTextButtonView(); - recordFL.GetTextButton().TextID = StringId.lishijilu; + #endregion } /// <summary> /// 娉ㄥ唽浜嬩欢 /// </summary> - private void Events() + private void EventListener() { //杩斿洖 this.topView.clickBackBtn.MouseUpEventHandler += (sender, e) => @@ -184,6 +260,8 @@ this.btnDeviceName.Text = this.device.name; this.btnRoomName.Text = this.device.GetRoomListName(); this.topView.topNameBtn.Text = this.device.name; + this.btnCurrDeviceName.Text = this.device.name; + this.btnCurrDeviceRoom.Text= this.device.GetRoomListName(); ////浠庢柊璁$畻瀹藉害 //this.btnDeviceName.Text = btnDeviceName.Text; @@ -223,11 +301,11 @@ /// </summary> class CustomFrameLayout : FrameLayout { - public const int widthFrameLayout = 100; - public const int heightFrameLayout = 80; - public const int yFrameLayout = 300; - public const int xFrameLayout = 20; - public const int interval = 20;//琛屼腑鐨勫垪闂撮殧鍊� + public const int widthFrameLayout = 74; + public const int heightFrameLayout = 70; + public const int yFrameLayout = 353; + public const int xFrameLayout = 68; + public const int interval = 47;//琛屼腑鐨勫垪闂撮殧鍊� public CustomFrameLayout(int width, int height, int x = 0, int y = 0) { @@ -239,26 +317,23 @@ } Button btnStateImage = new Button { - Width = Application.GetRealWidth(40), - Height = Application.GetRealWidth(40), - UnSelectedImagePath = "MusicIcon/collect.png", - SelectedImagePath = "MusicIcon/collectSelected.png", - Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(32), + Height = Application.GetRealWidth(32), + Gravity = Gravity.TopCenter, Name = "btnStateImage", }; Button btnStateText = new Button { - Y = Application.GetRealHeight(20), + Y = Application.GetRealHeight(4), Width = Application.GetRealWidth(100), Height = Application.GetRealWidth(20), TextID = StringId.dangqianmenweiguan, - TextSize = TextSize.Text14, - TextColor = MusicColor.TextColor, + TextSize = TextSize.Text12, + TextColor = MusicColor.TextCancelColor, + TextAlignment=TextAlignment.Center, Gravity = Gravity.CenterHorizontal, Name = "btnStateText" - - }; public void AddImageView() { -- Gitblit v1.8.0