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 AksMusicPage : BaseFramLayout
|
{
|
public AksMusicPage()
|
{
|
}
|
|
public Action<IntType> action;
|
CornerFramLayout cornerFram;
|
TypeSingleFramLayout typeSingleFramLayout;
|
MenuFramLayout menuFram;
|
TypeMultiFramLayout typeMultiFramLayout;
|
|
public void Show()
|
{
|
//初始化UI
|
this.InitUI();
|
//初始化事件
|
this.EventListener();
|
//读取数据
|
this.ReadData();
|
|
}
|
|
private void ReadData()
|
{
|
|
}
|
|
private void EventListener()
|
{
|
cornerFram.LoadButtonPage(4, (value) =>
|
{
|
Console.WriteLine("1");
|
});
|
|
typeSingleFramLayout.SetClickListener((f) =>
|
{
|
Console.WriteLine("2");
|
});
|
|
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) =>
|
{
|
Console.WriteLine("3");
|
});
|
|
typeMultiFramLayout.SetRightFlClickListener((f) =>
|
{
|
Console.WriteLine("4");
|
action?.Invoke(IntType.Player);
|
});
|
|
}
|
|
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.bofangqi,
|
};
|
this.AddChidren(btnTitle);
|
|
cornerFram = new CornerFramLayout(343, 452);
|
cornerFram.X = Application.GetRealWidth(16);
|
cornerFram.Y = btnTitle.Bottom + Application.GetRealHeight(16);
|
this.AddChidren(cornerFram);
|
cornerFram.SetList(cornerFram.GetTestList(17));
|
cornerFram.SetMargin(16, 0, 16, 0);
|
|
|
CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 364);
|
cornerBottomFram.X = Application.GetRealWidth(16);
|
cornerBottomFram.Y = cornerFram.Bottom + Application.GetRealHeight(16);
|
cornerBottomFram.BackgroundColor = MusicColor.WhiteColor;
|
cornerBottomFram.Radius = (uint)Application.GetRealHeight(17);
|
this.AddChidren(cornerBottomFram);
|
|
typeSingleFramLayout = new TypeSingleFramLayout();
|
typeSingleFramLayout.singleFramLayout.Y = Application.GetRealHeight(24);
|
typeSingleFramLayout.AddView(cornerBottomFram);
|
|
menuFram = new MenuFramLayout();
|
menuFram.Y = typeSingleFramLayout.singleFramLayout.Bottom + Application.GetRealHeight(32);
|
menuFram.AddView(cornerBottomFram);
|
|
typeMultiFramLayout = new TypeMultiFramLayout();
|
typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32);
|
typeMultiFramLayout.AddView(cornerBottomFram);
|
|
|
|
this.AdjustRealHeight(20);
|
}
|
|
|
}
|
}
|