using System;
|
using System.Collections.Generic;
|
|
namespace Shared
|
{
|
[System.Serializable]
|
public class MusicModel : Common
|
{
|
public MusicModel ()
|
: base ()
|
{
|
this.Type = DeviceType.MusicModel;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Music;
|
}
|
/// <summary>
|
/// 音乐命令变成byte数组
|
/// </summary>
|
/// <param name="commandString"></param>
|
/// <returns></returns>
|
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;
|
}
|
|
/// <summary>
|
/// 当前源SD1 ......
|
/// </summary>
|
public int CurrentSource;
|
|
/// <summary>
|
/// 通道号
|
/// </summary>
|
public byte ChNumber;
|
|
/// <summary>
|
/// 总数
|
/// </summary>
|
public byte ChNumberCount;
|
/// <summary>
|
/// 1 HDL
|
/// 2 第三方旧音乐
|
/// </summary>
|
public byte MusicType = 1;
|
|
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";
|
|
/// <summary>
|
/// 音源
|
/// </summary>
|
public string SoundGenerator = string.Empty;
|
|
//public string musicListNumber = "0";//音乐列表号
|
/// <summary>
|
/// 当前播放的音乐列表名称(第二层名称)
|
/// </summary>
|
public string curMusicListName = string.Empty;
|
/// <summary>
|
/// 音乐号
|
/// </summary>
|
//public string musicFileNumber = "0";//音乐号
|
/// <summary>
|
/// 歌曲总时间
|
/// </summary>
|
public string musicTime = string.Empty;//歌曲总时间
|
/// <summary>
|
/// 上一次更新的时间
|
/// </summary>
|
public DateTime LastDateTime;
|
/// <summary>
|
/// 当前播放进度
|
/// </summary>
|
public string musicPalyTime = string.Empty;//当前播放进度
|
|
|
public string musicCurPalyStatus = "1";
|
|
/// <summary>
|
/// 当前类型号,固定是001
|
/// </summary>
|
public string curTypeNumber = "001";
|
/// <summary>
|
/// 当前列表的ID如:001
|
/// </summary>
|
public string curListNumber = string.Empty;
|
/// <summary>
|
/// 当前歌曲的ID如:001
|
/// </summary>
|
public string curSongNumber = string.Empty;
|
|
|
public List<KeyAndValue> SDCardTypeList = new List<KeyAndValue> ();
|
public List<KeyAndValue> SDCardListList = new List<KeyAndValue> ();
|
public List<KeyAndValue> SDCardSongList = new List<KeyAndValue> ();
|
|
public List<KeyAndValue> NASTypeList = new List<KeyAndValue> ();
|
public List<KeyAndValue> NASListList = new List<KeyAndValue> ();
|
public List<KeyAndValue> NasSongList = new List<KeyAndValue> ();
|
|
public List<KeyAndValue> LovePlayList = new List<KeyAndValue> ();
|
|
|
|
public enum Status
|
{
|
/// <summary>
|
/// 播放中
|
/// </summary>
|
Play,
|
/// <summary>
|
/// 停止
|
/// </summary>
|
Stop,
|
/// <summary>
|
/// 暂停
|
/// </summary>
|
Pause
|
}
|
/// <summary>
|
/// 当前播放状态
|
/// </summary>
|
public Status PlayStatus = Status.Stop;
|
|
/// <summary>
|
/// 1单曲播放,
|
/// 2单曲循环,
|
/// 3连续播放,
|
/// 4连播循环,
|
/// </summary>
|
public int playMode;
|
//internal List<Music> SongList;
|
public List<Music> SongList = new List<Music> ();
|
internal int Port;
|
}
|
|
[System.Serializable]
|
public class KeyAndValue
|
{
|
/// <summary>
|
/// 序号 如:001
|
/// </summary>
|
public string number;
|
/// <summary>
|
/// 内容
|
/// </summary>
|
public string name;
|
}
|
[System.Serializable]
|
public class Music
|
{
|
public string Songname;
|
public string zhuanji;
|
}
|
|
}
|