using System;
|
using System.Collections.Generic;
|
using HDL_ON.UI.Music;
|
using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
|
using Shared;
|
using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage;
|
namespace HDL_ON.UI.UI2.FuntionControlView.Aks
|
{
|
/// <summary>
|
/// 电视界面
|
/// </summary>
|
public class TvPage : BaseFramLayout
|
{
|
public TvPage()
|
{
|
}
|
public Action<IntType> action;
|
CornerFramLayout cornerTopFram;
|
MenuFramLayout menuFram;
|
TypeMultiFramLayout typeMultiFramLayout;
|
|
public void Show()
|
{
|
//初始化UI
|
this.InitUI();
|
//初始化事件
|
//this.EventListener();
|
//读取数据
|
this.ReadData();
|
|
}
|
|
private void ReadData()
|
{
|
|
}
|
|
private void EventListener()
|
{
|
cornerTopFram.selectAction += (value) =>
|
{
|
Console.WriteLine("1");
|
};
|
|
menuFram.SetTopClickListener((b) =>
|
{
|
|
Console.WriteLine("5");
|
});
|
menuFram.SetBottomClickListener((b) =>
|
{
|
Console.WriteLine("6");
|
});
|
menuFram.SetLeftClickListener((b) =>
|
{
|
Console.WriteLine("7");
|
});
|
menuFram.SetRightClickListener((b) =>
|
{
|
Console.WriteLine("8");
|
});
|
menuFram.SetOkClickListener((b) =>
|
{
|
Console.WriteLine("9");
|
});
|
|
typeMultiFramLayout.SetLeftFlClickListener((f) =>
|
{
|
SxqPage sxqPage = new SxqPage();
|
MainPage.BasePageView.AddChidren(sxqPage);
|
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
|
sxqPage.Show();
|
|
});
|
|
typeMultiFramLayout.SetRightFlClickListener((f) =>
|
{
|
Console.WriteLine("4");
|
action?.Invoke(IntType.TV);
|
});
|
|
}
|
|
private void InitUI()
|
{
|
this.BackgroundColor = MusicColor.ViewColor;
|
Button btnTitle = new Button
|
{
|
Y = Application.GetRealHeight(16),
|
X = Application.GetRealWidth(16),
|
Height = Application.GetRealHeight(22),
|
Width = Application.GetRealWidth(200),
|
TextAlignment = TextAlignment.CenterLeft,
|
TextColor = MusicColor.TextColor,
|
TextSize = TextSize.Text16,
|
TextID = StringId.dianshi,
|
};
|
this.AddChidren(btnTitle);
|
|
cornerTopFram = new CornerFramLayout(343, 452, 4, 17);
|
cornerTopFram.X = Application.GetRealWidth(16);
|
cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16);
|
this.AddChidren(cornerTopFram);
|
cornerTopFram.SetList(cornerTopFram.GetTestList(17));
|
cornerTopFram.SetMargin(16, 0, 16, 0);
|
cornerTopFram.LoadButtonPage(new List<int> { 5, 6 });
|
|
|
|
NumberFrameLayout numberFrame = new NumberFrameLayout();
|
numberFrame.layout.X = Application.GetRealWidth(16);
|
numberFrame.layout.Y = cornerTopFram.Bottom + Application.GetRealHeight(16);
|
numberFrame.AddView(this);
|
|
//CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 292, 0, 17);
|
//cornerBottomFram.X = Application.GetRealWidth(16);
|
//cornerBottomFram.Y = cornerTopFram.Bottom + Application.GetRealHeight(16);
|
//cornerBottomFram.BackgroundColor = MusicColor.WhiteColor;
|
//cornerBottomFram.Radius = (uint)Application.GetRealHeight(17);
|
//this.AddChidren(cornerBottomFram);
|
|
//menuFram = new MenuFramLayout();
|
//menuFram.Y = Application.GetRealHeight(24);
|
//menuFram.AddView(cornerBottomFram);
|
|
//typeMultiFramLayout = new TypeMultiFramLayout();
|
//typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32);
|
//typeMultiFramLayout.AddView(cornerBottomFram);
|
//typeMultiFramLayout.btnBottonRightName.TextID =StringId.dianshi;
|
|
this.AdjustRealHeight(16);
|
}
|
}
|
}
|