using System;
using HDL_ON.Entity;
namespace HDL_ON.UI.UI2.FuntionControlView.Music
{
public class KeyProperty
{
private static KeyProperty sMusicPropertyKey = null;
public static KeyProperty sMusicProperty
{
get
{
if (sMusicPropertyKey == null)
{
sMusicPropertyKey = new KeyProperty();
}
return sMusicPropertyKey;
}
}
#region ---属性----
///
/// 开关
///
public const string on_off = "on_off";
///
/// 音量<0-100>
///
public const string volume = "volume";
///
/// 模式
///
public const string mode = "mode";
///
/// 音源
///
public const string source = "source";
///
/// 列表名
///
public const string playlist_name = "playlist_name";
///
/// 歌曲名
///
public const string song_name = "song_name";
///
/// 切歌
///
public const string song_step = "song_step";
///
/// 当前歌曲总时间<0-9999(s)>
///
public const string song_time = "song_time";
///
/// 当前歌曲播放时间<0-9999(s)>
///
public const string playing_time = "playing_time";
///
/// 【USB】音乐源
///
public const string sdcard = "sdcard";
///
/// 【音频输入】音乐源
///
public const string audio_in = "audio_in";
///
/// 【ftp】音乐源
///
public const string ftp = "ftp";
///
/// 【收音机】音乐源
///
public const string radio = "radio";
///
/// 【蓝牙】音乐源
///
public const string bluetooth = "bluetooth";
#endregion
///
/// 获取on_off值
///
/// 当前音乐
///
public string GetOnOffKeyValue(Function function)
{
if (function == null)
{
return "";
}
return function.GetAttrState(on_off);
}
///
/// 设置on_off值
///
/// 当前音乐
///
public void SetOnOffKeyValue(Function function, string stateValue)
{
if (function == null)
{
return;
}
function.SetAttrState(on_off, stateValue);
}
}
public class ValueProperty
{
#region ---属性值----
///
///
///
public const string up = "up";
///
///
///
public const string down = "down";
///
/// 开
///
public const string on = "on";
///
/// 关
///
public const string off = "off";
///
/// 单曲
///
public const string single = "single";
///
/// 单曲循环
///
public const string single_cycle = "single_cycle";
///
/// 循序循环
///
public const string order = "order";
///
/// 列表循环
///
public const string list_cycle = "list_cycle";
///
/// 随机播放
///
public const string random = "random";
#endregion
}
public enum Source
{
sdcard,//usb
audio_in,//音频输入
ftp,
radio,//收音机
bluetooth//蓝牙
}
}