using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Shared
{
[System.Serializable]
public class YiPanelMusicModel : YiPanelCommon
{
public YiPanelMusicModel ()
: base ()
{
this.Type = DeviceType.MusicModel;
DeviceTextID = SimpleControl.R.MyInternationalizationString.Music;
}
///
/// 音乐命令变成byte数组
///
///
///
public static byte [] MusiceBytes (string commandString)
{
byte [] bytes = System.Text.Encoding.ASCII.GetBytes (commandString);
byte [] sendBytes = new byte [bytes.Length + 1];
sendBytes [bytes.Length] = 0x0D;
Array.Copy (bytes, 0, sendBytes, 0, bytes.Length);
return sendBytes;
}
///
/// 当前源SD1 ......
///
public int CurrentSource;
///
/// 通道号
///
public byte ChNumber;
///
/// 总数
///
public byte ChNumberCount;
public string IPAddress = string.Empty;
public string RouteIPAddress = string.Empty;
public string IPMAC = string.Empty;
public string SubnetMask = string.Empty;
public byte DHCP = 0;
public string curPlayMusicName = string.Empty;
public string SourceID = "1";
public string ZoneID = string.Empty;
public string CurVol = "0";
///
/// 音源
///
public string SoundGenerator = string.Empty;
//public string musicListNumber = "0";//音乐列表号
///
/// 当前播放的音乐列表名称(第二层名称)
///
public string curMusicListName = string.Empty;
///
/// 音乐号
///
//public string musicFileNumber = "0";//音乐号
///
/// 歌曲总时间
///
public string musicTime = string.Empty;//歌曲总时间
///
/// 上一次更新的时间
///
public DateTime LastDateTime;
///
/// 当前播放进度
///
public string musicPalyTime = string.Empty;//当前播放进度
public string musicCurPalyStatus = "1";
///
/// 当前类型号,固定是001
///
public string curTypeNumber = "001";
///
/// 当前列表的ID如:001
///
public string curListNumber = string.Empty;
///
/// 当前歌曲的ID如:001
///
public string curSongNumber = string.Empty;
public List SDCardTypeList = new List ();
public List SDCardListList = new List ();
public List SDCardSongList = new List ();
public List NASTypeList = new List ();
public List NASListList = new List ();
public List NasSongList = new List ();
public List LovePlayList = new List ();
///
/// 1 HDL
/// 2 第三方旧音乐
///
public byte MusicType = 1;
public enum Status
{
///
/// 播放中
///
Play,
///
/// 停止
///
Stop,
///
/// 暂停
///
Pause
}
///
/// 当前播放状态
///
public Status PlayStatus = Status.Stop;
///
/// 1单曲播放,
/// 2单曲循环,
/// 3连续播放,
/// 4连播循环,
///
public int playMode;
//internal List SongList;
public List SongList = new List ();
internal int Port;
[System.Serializable]
public class KeyAndValue
{
///
/// 序号 如:001
///
public string number;
///
/// 内容
///
public string name;
}
[System.Serializable]
public class Music
{
public string Songname;
public string zhuanji;
}
}
}