| | |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | using HDL_ON.Entity; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.DriverLayer; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | public partial class TVPage : FrameLayout |
| | |
| | | { |
| | | Y = Application.GetRealHeight(8), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(78), |
| | | Width = Application.GetRealWidth(90), |
| | | Height = Application.GetRealHeight(49), |
| | | Text = "TV/AV", |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | X = Application.GetRealWidth(26), |
| | | Y = Application.GetRealHeight(246), |
| | | Width = Application.GetRealWidth(44), |
| | | Height = Application.GetRealHeight(102), |
| | | Height = Application.GetRealWidth(102), |
| | | BackgroundImagePath = "FunctionIcon/Electrical/TV/MenuBgIcon.png", |
| | | }; |
| | | controlView.AddChidren(channleView); |
| | | |
| | | btnChlReduce = new Button() |
| | | btnChlPlus = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(10), |
| | |
| | | Height = Application.GetRealWidth(24), |
| | | UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png" |
| | | }; |
| | | channleView.AddChidren(btnChlReduce); |
| | | channleView.AddChidren(btnChlPlus); |
| | | |
| | | Button btnChlText; |
| | | btnChlText = new Button() |
| | |
| | | }; |
| | | channleView.AddChidren(btnChlText); |
| | | |
| | | btnChlPlus = new Button() |
| | | btnChlReduce = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(66), |
| | | Y = Application.GetRealWidth(66), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | UnSelectedImagePath = "FunctionIcon/Electrical/TV/ReduceIcon.png" |
| | | }; |
| | | channleView.AddChidren(btnChlPlus); |
| | | channleView.AddChidren(btnChlReduce); |
| | | |
| | | volView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(257), |
| | | Y = Application.GetRealHeight(246), |
| | | Width = Application.GetRealWidth(44), |
| | | Height = Application.GetRealHeight(102), |
| | | Height = Application.GetRealWidth(102), |
| | | BackgroundImagePath = "FunctionIcon/Electrical/TV/MenuBgIcon.png", |
| | | }; |
| | | controlView.AddChidren(volView); |
| | | |
| | | btnVolReduce = new Button() |
| | | btnVolPlus = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(10), |
| | |
| | | Height = Application.GetRealWidth(24), |
| | | UnSelectedImagePath = "FunctionIcon/Electrical/TV/PlusIcon.png" |
| | | }; |
| | | volView.AddChidren(btnVolReduce); |
| | | volView.AddChidren(btnVolPlus); |
| | | |
| | | Button btnVolText; |
| | | btnVolText = new Button() |
| | |
| | | }; |
| | | volView.AddChidren(btnVolText); |
| | | |
| | | btnVolPlus = new Button() |
| | | btnVolReduce = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(66), |
| | | Y = Application.GetRealWidth(66), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | UnSelectedImagePath = "FunctionIcon/Electrical/TV/ReduceIcon.png" |
| | | }; |
| | | volView.AddChidren(btnVolPlus); |
| | | volView.AddChidren(btnVolReduce); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | for (int i = 0; i < 10; i++) |
| | | { |
| | | |
| | | Button btn = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(98), |
| | |
| | | } |
| | | numberView.AddChidren(btn); |
| | | btn.MouseUpEventHandler = (sender, e) => { |
| | | string index = (sender as Button ).Text; |
| | | btn.IsSelected = false; |
| | | if (DB_ResidenceData.Instance.GatewayType == 1) |
| | | { |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add($"number_{index}", ""); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | } |
| | | else |
| | | { |
| | | tvTemp.ControlTV(i,function); |
| | | } |
| | | }; |
| | | btn.MouseDownEventHandler = (sender, e) => { |
| | | btn.IsSelected = true; |