using System; using HDL_ON.DriverLayer; using HDL_ON.Entity; using HDL_ON.Stan; using HDL_ON.UI.CSS; using Shared; namespace HDL_ON.UI { public class TvControlPage : DeviceFunctionCardCommonForm { #region ■ 变量声明___________________________ 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 /// /// 初始化白色区域的内容 /// public override void InitFrameWhiteContent() { base.ShowColltionButton = false; base.SetTitleText(Language.StringByID(StringId.Electric)); //初始化第一个索引页的内容 this.InitFrameWhiteContent1(); } /// /// 初始化第一个索引页的内容 /// private void InitFrameWhiteContent1() { FrameLayout controlView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(88), Width = Application.GetRealWidth(327), Height = Application.GetRealHeight(526), BackgroundImagePath = "Public/Fragmentbg.png", }; this.AddChidren(controlView); 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 } }