| | |
| | | /// </summary> |
| | | public class AksCommonMethod |
| | | { |
| | | /// <summary> |
| | | /// 选中颜色 |
| | | /// </summary> |
| | | public const uint seleBackgroundColor = 0xFFF2F3F7; |
| | | /// <summary> |
| | | /// 不支持按键颜色 |
| | | /// </summary> |
| | | public const uint unBackgroundColor = 0xFFA3AAB7; |
| | | |
| | | private static AksCommonMethod commonMethod = null; |
| | | /// <summary> |
| | | /// 获取对象 |
| | |
| | | /// <summary> |
| | | /// 清空所有缓存数据 |
| | | /// </summary> |
| | | public void ClearData() { |
| | | public void ClearData() |
| | | { |
| | | movieLibraryInfoEntities.Clear(); |
| | | CollectList.Clear(); |
| | | } |
| | |
| | | { |
| | | return false; |
| | | } |
| | | if ( string.IsNullOrEmpty(movieLibrary.movieId)) |
| | | if (string.IsNullOrEmpty(movieLibrary.movieId)) |
| | | { |
| | | return false; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取影音中控屏列表 |
| | |
| | | /// 获取【音乐】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetMusicKeypadList() |
| | | public List<KeypadEntity> GetMusicKeypadList(RemoteControlEntity remoteControlEntity) |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | |
| | | //keypads.Add(new KeypadEntity { keypad = "key_left", name = "左", localIconAddress = $"{aksIcon}zuo.png" }); |
| | | //keypads.Add(new KeypadEntity { keypad = "key_right", name = "右", localIconAddress = $"{aksIcon}you.png" }); |
| | | //keypads.Add(new KeypadEntity { keypad = "key_ok", name = "确认", localIconAddress = $"{aksIcon}ok.png" }); |
| | | this.CheckKeyIsClick(remoteControlEntity, keypads); |
| | | return keypads; |
| | | } |
| | | /// <summary> |
| | | /// 获取【功放】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetGFKeypadList() |
| | | public List<KeypadEntity> GetGFKeypadList(RemoteControlEntity remoteControlEntity) |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "custom_2", name = "自定义按键2", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_3", name = "自定义按键3", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_4", name = "自定义按键4", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | this.CheckKeyIsClick(remoteControlEntity, keypads); |
| | | return keypads; |
| | | } |
| | | |
| | |
| | | /// 获取【投影仪】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetTYYKeypadList() |
| | | public List<KeypadEntity> GetTYYKeypadList(RemoteControlEntity remoteControlEntity) |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "custom_2", name = "自定义按键2", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_3", name = "自定义按键3", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_4", name = "自定义按键4", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | this.CheckKeyIsClick(remoteControlEntity, keypads); |
| | | return keypads; |
| | | } |
| | | |
| | |
| | | /// 获取【电视】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetTvKeypadList() |
| | | public List<KeypadEntity> GetTvKeypadList(RemoteControlEntity remoteControlEntity) |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "custom_2", name = "自定义按键2", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_3", name = "自定义按键3", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_4", name = "自定义按键4", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | this.CheckKeyIsClick(remoteControlEntity, keypads); |
| | | return keypads; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | /// 获取【机顶盒】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetJdhKeypadList() |
| | | public List<KeypadEntity> GetJdhKeypadList(RemoteControlEntity remoteControlEntity) |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "custom_2", name = "自定义按键2", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_3", name = "自定义按键3", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_4", name = "自定义按键4", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | this.CheckKeyIsClick(remoteControlEntity, keypads); |
| | | return keypads; |
| | | |
| | | } |
| | |
| | | /// 获取【数字】按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetNumberKeypadList() |
| | | public List<KeypadEntity> GetNumberKeypadList(RemoteControlEntity remoteControlEntity) |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | keypads.Add(new KeypadEntity { keypad = "number_1", name = "1" }); |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "number_continuous", name = "-/--" }); |
| | | keypads.Add(new KeypadEntity { keypad = "none", name = "" });//这个是为了占位置 |
| | | keypads.Add(new KeypadEntity { keypad = "number_0", name = "0" }); |
| | | this.CheckKeyIsClick(remoteControlEntity, keypads); |
| | | return keypads; |
| | | } |
| | | |
| | |
| | | /// 获取【菜单】按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetMenuKeypadList() |
| | | public List<KeypadEntity> GetMenuKeypadList(RemoteControlEntity remoteControlEntity) |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | |
| | | keypads.Add(new KeypadEntity { keypad = "key_left", name = "左", localIconAddress = $"{aksIcon}zuo.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_right", name = "右", localIconAddress = $"{aksIcon}you.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_ok", name = "确认", localIconAddress = $"{aksIcon}ok.png" }); |
| | | this.CheckKeyIsClick(remoteControlEntity, keypads); |
| | | return keypads; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 检查是否支持按键点击 |
| | | /// </summary> |
| | | /// <param name="remoteControlEntity">遥控器设备</param> |
| | | /// <param name="keypads">自定义按键列表</param> |
| | | private void CheckKeyIsClick(RemoteControlEntity remoteControlEntity, List<KeypadEntity> keypads) |
| | | { |
| | | if (remoteControlEntity == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | for (int i = 0; i < keypads.Count; i++) |
| | | { |
| | | var keypad = keypads[i]; |
| | | if (keypad.keypad == "none") |
| | | { |
| | | //特殊的 |
| | | continue; |
| | | } |
| | | var findkeypad = remoteControlEntity.keypads.Find((o) => o.keypad == keypad.keypad); |
| | | if (findkeypad == null) |
| | | { |
| | | keypad.isClicked = false; |
| | | } |
| | | else |
| | | { |
| | | keypad.isClicked = true; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |