using System;
using System.Collections.Generic;
using System.Text;
using Shared;
using Shared.SimpleControl;
using Shared.SimpleControl.Pad;
using System.Xml;
using Shared.SimpleControl.R;
namespace Shared.SimpleControl.Pad.Music
{
///
/// 当前播放列表
///
class A31PlayList : FrameLayout
{
VerticalScrolViewLayout verticalScrolViewLayout;
public Button btnListName;
public void InitFace (FrameLayout MusicSourcePage)
{
var topFrameLayout = new FrameLayout {
Height = Application.GetRealHeight (100),
BackgroundColor = SkinStyle.Current.MainColor,
};
this.AddChidren (topFrameLayout);
btnListName = new Button {
TextID = MyInternationalizationString.Musicplaylist,
};
topFrameLayout.AddChidren (btnListName);
var back = new Button {
Width = Application.GetRealWidth (72),
Height = Application.GetRealHeight (89),
X = Application.GetRealWidth (-1),
Gravity = Gravity.CenterVertical,
UnSelectedImagePath = "MusicIcon/PlayBack.png",
};
back.MouseDownEventHandler += (sender, e) => {
RemoveFromParent ();
};
topFrameLayout.AddChidren (back);
FrameLayout fram = new FrameLayout {
Height = Application.GetRealHeight (1536 - 100-150),
Y = topFrameLayout.Bottom,
BackgroundColor = 0xff2F2F2F,
};
AddChidren (fram);
verticalScrolViewLayout = new VerticalScrolViewLayout {
};
fram.AddChidren (verticalScrolViewLayout);
}
public override void RemoveFromParent ()
{
if (updateThread != null && updateThread.IsAlive) {
updateThread.Abort ();
updateThread = null;
}
if (downLoadImageThread != null && downLoadImageThread.IsAlive) {
downLoadImageThread.Abort ();
downLoadImageThread = null;
}
base.RemoveFromParent ();
}
void resetSongColor ()
{
sleepDateTime = DateTime.Now;
for (int i = 0; i < verticalScrolViewLayout.ChildrenCount; i++) {
var view = (RowLayout)verticalScrolViewLayout.GetChildren (i);
var songName = (Button)view.GetChildren (1);
songName.TextColor = 0xffffffff;
}
}
public void Musiclist (string listName, string playSource,FrameLayout MusicSourcePage)
{
btnListName.Text = Language.StringByID (MyInternationalizationString.Musicplaylist);
List