using System;
|
using Shared;
|
namespace HDL_ON.UI.Music.View
|
{
|
public class MusicSourceView
|
{
|
/// <summary>
|
/// 父控件View
|
/// </summary>
|
public FrameLayout fLayout = new FrameLayout
|
{
|
BackgroundColor = MusicColor.WhiteColor,
|
Height = Application.GetRealHeight(50),
|
Width = Application.GetRealWidth(375),
|
};
|
/// <summary>
|
///图标
|
/// </summary>
|
public Button iconBtn = new Button
|
{
|
X = Application.GetRealWidth(16),
|
Y = Application.GetRealHeight(13),
|
Width = Application.GetMinRealAverage(24),
|
Height = Application.GetMinRealAverage(24),
|
};
|
/// <summary>
|
///文本
|
/// </summary>
|
public Button textBtn = new Button
|
{
|
X = Application.GetRealWidth(16),
|
Y = Application.GetRealHeight(14),
|
Width = Application.GetRealWidth(140),
|
Height = Application.GetRealHeight(22),
|
TextColor = MusicColor.TextColor,
|
TextSize = TextSize.Text16,
|
TextAlignment = TextAlignment.CenterLeft,
|
};
|
|
/// <summary>
|
///写入文本
|
/// </summary>
|
public Button inputTextBtn = new Button
|
{
|
X = Application.GetRealWidth(375-140-52),
|
Y = Application.GetRealHeight(15),
|
Width = Application.GetRealWidth(140),
|
Height = Application.GetRealHeight(20),
|
TextAlignment=TextAlignment.CenterRight,
|
TextColor = MusicColor.MusicNoTxetColor,
|
TextSize = TextSize.Text14,
|
};
|
|
/// <summary>
|
///下一级菜单图标
|
/// </summary>
|
public Button nextLevelBtn = new Button
|
{
|
X = Application.GetRealWidth(339),
|
Y = Application.GetRealHeight(17),
|
Width = Application.GetMinRealAverage(16),
|
Height = Application.GetMinRealAverage(16),
|
UnSelectedImagePath = "MusicIcon/sourceNetx.png",
|
|
};
|
/// <summary>
|
///线
|
/// </summary>
|
public Button lineBtn = new Button
|
{
|
X = Application.GetRealWidth(16),
|
Width = Application.GetRealWidth(375 - 16 - 16),
|
BackgroundColor = MusicColor.LineColor,
|
};
|
|
/// <summary>
|
/// 点击事件
|
/// </summary>
|
public Button clickBtn = new Button
|
{
|
Height = Application.GetRealHeight(50),
|
Width = Application.GetRealWidth(375),
|
};
|
|
/// <summary>
|
/// 音乐源控件的方法
|
/// </summary>
|
/// <param name="frameLayout"></param>
|
/// <param name="IsView"></param>
|
public void FrameLayoutView(FrameLayout frameLayout,bool IsView=true)
|
{
|
if (IsView)
|
{
|
fLayout.AddChidren(iconBtn);
|
textBtn.X = Application.GetRealWidth(56);
|
nextLevelBtn.X = Application.GetRealWidth(339);
|
nextLevelBtn.Y = Application.GetRealHeight(17);
|
nextLevelBtn.Width = Application.GetMinRealAverage(16);
|
nextLevelBtn.Height = Application.GetMinRealAverage(16);
|
}
|
else
|
{
|
textBtn.X = Application.GetRealWidth(16);
|
fLayout.AddChidren(inputTextBtn);
|
nextLevelBtn.X = Application.GetRealWidth(333);
|
nextLevelBtn.Y = Application.GetRealHeight(11);
|
nextLevelBtn.Width = Application.GetMinRealAverage(28);
|
nextLevelBtn.Height = Application.GetMinRealAverage(28);
|
nextLevelBtn.UnSelectedImagePath = "MusicIcon/edit.png";
|
}
|
fLayout.AddChidren(textBtn);
|
fLayout.AddChidren(nextLevelBtn);
|
lineBtn.Y = fLayout.Height - 1;
|
lineBtn.Height= H_W.Line;
|
fLayout.AddChidren(lineBtn);
|
fLayout.AddChidren(clickBtn);
|
frameLayout.AddChidren(fLayout);
|
}
|
}
|
}
|