From b71dfb3ca100340005d56e1298292807da82322d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 08 六月 2020 15:04:21 +0800 Subject: [PATCH] 20200608 --- HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs | 332 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 325 insertions(+), 7 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs index 6b5cd56..3d34f22 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs @@ -7,7 +7,7 @@ public partial class TVPage : FrameLayout { #region 鎺т欢闆嗗悎 - static TVPage bodyView; + TVPage bodyView; /// <summary> /// 鍔熻兘鍚嶇О鎸夐挳 /// </summary> @@ -20,11 +20,25 @@ /// 鏀惰棌鎸夐挳 /// </summary> Button btnCollection; - /// <summary> - /// 鍥炬爣鎸夐挳 - /// </summary> - Button btnSwitchIcon; - Button btnSwitch; + + Button btnChangeTVAV; + FrameLayout topMenuView; + Button btnTopMenuUp; + Button btnTopMenuLeft; + Button btnTopMenuRight; + Button btnTopMenuDown; + Button btnOk; + FrameLayout channleView; + Button btnChlReduce; + Button btnChlPlus; + FrameLayout volView; + Button btnVolReduce; + Button btnVolPlus; + Button btnBack; + Button btnMenu; + Button btn123; + Button btnMute; + Button btnPower; #endregion @@ -102,11 +116,315 @@ controlView.AddChidren(btnCollection); + btnChangeTVAV = new Button() + { + Y = Application.GetRealHeight(8), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(78), + Height = Application.GetRealHeight(49), + Text = "TV/AV", + TextAlignment = TextAlignment.Center, + TextColor = CSS_Color.MainColor, + TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel, + }; + controlView.AddChidren(btnChangeTVAV); + + #region 杞洏鎺у埗鍖哄煙 + topMenuView = new FrameLayout() + { + Y = Application.GetRealHeight(88), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(199), + Height = Application.GetRealWidth(199), + BackgroundImagePath = "FunctionIcon/Electrical/TV/TVOkIcon.png", + }; + controlView.AddChidren(topMenuView); + + btnTopMenuUp = new Button() + { + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(80), + Height = Application.GetRealWidth(50), + }; + topMenuView.AddChidren(btnTopMenuUp); + + btnTopMenuLeft = new Button() + { + Gravity = Gravity.CenterVertical, + Width = Application.GetRealWidth(50), + Height = Application.GetRealWidth(80), + }; + topMenuView.AddChidren(btnTopMenuLeft); + + btnTopMenuRight = new Button() + { + X = Application.GetRealWidth(150), + Gravity = Gravity.CenterVertical, + Width = Application.GetRealWidth(50), + Height = Application.GetRealWidth(80), + }; + topMenuView.AddChidren(btnTopMenuRight); + + btnTopMenuDown = new Button() + { + Y = Application.GetRealWidth(150), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(80), + Height = Application.GetRealWidth(50), + }; + topMenuView.AddChidren(btnTopMenuDown); + + btnOk = new Button() + { + Gravity = Gravity.Center, + Width = Application.GetRealWidth(100), + Height = Application.GetRealWidth(100), + }; + topMenuView.AddChidren(btnOk); + + + + #endregion + + + #region 棰戦亾闊抽噺璋冭妭 + channleView = new FrameLayout() + { + X = Application.GetRealWidth(26), + Y = Application.GetRealHeight(246), + Width = Application.GetRealWidth(44), + Height = Application.GetRealHeight(102), + BackgroundImagePath = "FunctionIcon/Electrical/TV/MenuBgIcon.png", + }; + controlView.AddChidren(channleView); + + btnChlReduce = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(10), + Width = Application.GetRealWidth(24), + Height = Application.GetRealWidth(24), + UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png" + }; + channleView.AddChidren(btnChlReduce); + + Button btnChlText; + btnChlText = new Button() + { + Gravity = Gravity.CenterVertical, + Height = Application.GetRealWidth(23), + TextAlignment = TextAlignment.Center, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextColor = CSS_Color.FirstLevelTitleColor, + TextID = StringId.Chl, + }; + channleView.AddChidren(btnChlText); + + btnChlPlus = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(66), + Width = Application.GetRealWidth(24), + Height = Application.GetRealWidth(24), + UnSelectedImagePath = "FunctionIcon/Electrical/TV/ReduceIcon.png" + }; + channleView.AddChidren(btnChlPlus); + + volView = new FrameLayout() + { + X = Application.GetRealWidth(257), + Y = Application.GetRealHeight(246), + Width = Application.GetRealWidth(44), + Height = Application.GetRealHeight(102), + BackgroundImagePath = "FunctionIcon/Electrical/TV/MenuBgIcon.png", + }; + controlView.AddChidren(volView); + + btnVolReduce = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(10), + Width = Application.GetRealWidth(24), + Height = Application.GetRealWidth(24), + UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png" + }; + volView.AddChidren(btnVolReduce); + + Button btnVolText; + btnVolText = new Button() + { + Gravity = Gravity.CenterVertical, + Height = Application.GetRealWidth(23), + TextAlignment = TextAlignment.Center, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextColor = CSS_Color.FirstLevelTitleColor, + TextID = StringId.Vol, + }; + volView.AddChidren(btnVolText); + + btnVolPlus = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(66), + Width = Application.GetRealWidth(24), + Height = Application.GetRealWidth(24), + UnSelectedImagePath = "FunctionIcon/Electrical/TV/ReduceIcon.png" + }; + volView.AddChidren(btnVolPlus); + + + + #endregion + + #region 搴曢儴鎺у埗鍖哄煙 + btnBack = new Button() + { + X = Application.GetRealWidth(30), + Y = Application.GetRealHeight(386), + Width = Application.GetRealWidth(40), + Height = Application.GetRealWidth(40), + UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVBackIcon.png", + }; + controlView.AddChidren(btnBack); + + btnMenu = new Button() + { + X = Application.GetRealWidth(106), + Y = Application.GetRealHeight(386), + Width = Application.GetRealWidth(40), + Height = Application.GetRealWidth(40), + UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVMenuIcon.png", + }; + controlView.AddChidren(btnMenu); + + btn123 = new Button() + { + X = Application.GetRealWidth(182), + Y = Application.GetRealHeight(386), + Width = Application.GetRealWidth(40), + Height = Application.GetRealWidth(40), + UnSelectedImagePath = "FunctionIcon/Electrical/TV/TV123Icon.png", + }; + controlView.AddChidren(btn123); + + btnMute = new Button() + { + X = Application.GetRealWidth(258), + Y = Application.GetRealHeight(386), + Width = Application.GetRealWidth(40), + Height = Application.GetRealWidth(40), + UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVMuteIcon.png", + }; + controlView.AddChidren(btnMute); + + btnPower = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(462), + Width = Application.GetRealWidth(40), + Height = Application.GetRealWidth(40), + UnSelectedImagePath = "FunctionIcon/Electrical/TV/TVPowerIcon.png", + }; + controlView.AddChidren(btnPower); + + #endregion + LoadEventList(); - new TopViewDiv(bodyView, Language.StringByID(StringId.Fan)).LoadTopView(tv, actionRefresh); + new TopViewDiv(bodyView, Language.StringByID(StringId.TV)).LoadTopView(tv, actionRefresh); } + + void ShowNumberView() + { + Dialog dialog = new Dialog(); + + FrameLayout dialogView = new FrameLayout() + { + Animate = Animate.DownToUp, + }; + dialog.AddChidren(dialogView); + + dialogView.MouseUpEventHandler = (sender, e) => + { + dialog.Close(); + }; + + FrameLayout numberView = new FrameLayout() + { + Y = Application.GetRealHeight(403), + Height = Application.GetRealHeight(264), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + dialogView.AddChidren(numberView); + + for (int i = 0; i < 10; i++) + { + + Button btn = new Button() + { + Width = Application.GetRealWidth(98), + Height = Application.GetRealHeight(44), + Radius = (uint)Application.GetRealWidth(8), + BorderWidth = (uint)Application.GetRealWidth(1), + BorderColor = CSS_Color.PromptingColor1, + BackgroundColor = CSS_Color.MainBackgroundColor, + SelectedBackgroundColor = CSS_Color.MainColor, + TextColor = CSS_Color.FirstLevelTitleColor, + SelectedTextColor = CSS_Color.MainBackgroundColor, + IsBold = true, + Text = i.ToString(), + TextAlignment = TextAlignment.Center, + }; + if (i == 1 || i == 4 || i == 7) + { + btn.X = Application.GetRealWidth(24); + + } + else if (i == 2 || i == 5 || i == 8) + { + btn.X = Application.GetRealWidth(138); + } + else if (i == 3 || i == 6 || i == 9) + { + btn.X = Application.GetRealWidth(252); + } + else + { + btn.X = Application.GetRealWidth(138); + } + if (i == 0) + { + btn.Y = Application.GetRealHeight(204); + } + else if (i < 4) + { + btn.Y = Application.GetRealHeight(24); + + } + else if (i<7) + { + btn.Y = Application.GetRealHeight(84); + } + else + { + btn.Y = Application.GetRealHeight(144); + } + numberView.AddChidren(btn); + btn.MouseUpEventHandler = (sender, e) => { + btn.IsSelected = false; + tv.ControlTV(i); + }; + btn.MouseDownEventHandler = (sender, e) => { + btn.IsSelected = true; + }; + } + + + + dialog.Show(); + } + } } -- Gitblit v1.8.0