| | |
| | | using HDL_ON.Entity; |
| | | using System.Collections.Generic; |
| | | using Shared; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks |
| | | { |
| | |
| | | /// </summary> |
| | | public class AksCommonMethod |
| | | { |
| | | |
| | | |
| | | private static AksCommonMethod commonMethod = null; |
| | | /// <summary> |
| | | /// 获取对象 |
| | | /// 获取对象F |
| | | /// </summary> |
| | | public static AksCommonMethod Current |
| | | { |
| | |
| | | /// <summary> |
| | | /// 清空所有缓存数据 |
| | | /// </summary> |
| | | public void ClearData() { |
| | | public void ClearData() |
| | | { |
| | | movieLibraryInfoEntities.Clear(); |
| | | CollectList.Clear(); |
| | | } |
| | |
| | | { |
| | | return; |
| | | } |
| | | if (CollectList.Count == 0) |
| | | { |
| | | CollectList.Add(movieLibrary); |
| | | return; |
| | | } |
| | | for (int i = 0; i < CollectList.Count; i++) |
| | | { |
| | | if (CollectList[i].movieId == movieLibrary.movieId) |
| | |
| | | { |
| | | 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 = "volume_down", name = "音量-", localIconAddress = $"{aksIcon}yinliangjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "look_back", name = "回看", localIconAddress = $"{aksIcon}huikan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "cancel", name = "取消", localIconAddress = $"{aksIcon}quxiao.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "amplifier_volume_up", name = "功放音量 +", localIconAddress = $"{aksIcon}gongfang1.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "amplifier_volume_down", name = "功放音量 -", localIconAddress = $"{aksIcon}gongfang2.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "amplifier_volume_up", name = "功放音量 +", localIconAddress = $"{aksIcon}gfyingliangjia.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "amplifier_volume_down", name = "功放音量 -", localIconAddress = $"{aksIcon}gfyingliangjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "custom_1", name = "自定义按键1", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | 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> |
| | | /// 获取【自定义】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetZdiKeypadList(RemoteControlEntity remoteControlEntity) |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on_off", name = "开/关", localIconAddress = $"{aksIcon}kai.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "info", name = "信息", localIconAddress = $"{aksIcon}guan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "collect", name = "收藏", localIconAddress = $"{aksIcon}caidan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "movie", name = "电影", localIconAddress = $"{aksIcon}jingyin.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_up", name = "音量+", localIconAddress = $"{aksIcon}yinliangjia.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "volume_down", name = "音量-", localIconAddress = $"{aksIcon}yinliangjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "recreation", name = "娱乐", localIconAddress = $"{aksIcon}huikan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "tv", name = "电视", localIconAddress = $"{aksIcon}quxiao.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "red", name = "红按键", localIconAddress = $"{aksIcon}gfyingliangjia.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "yellow", name = "黄按键", localIconAddress = $"{aksIcon}gf_ingliangjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "blue", name = "蓝按键", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_0", name = "0" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_1", name = "1" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_2", name = "2" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_3", name = "3" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_4", name = "4" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_5", name = "5" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_6", name = "6" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_7", name = "7" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_8", name = "8" }); |
| | | keypads.Add(new KeypadEntity { keypad = "number_9", name = "9" }); |
| | | keypads.Add(new KeypadEntity { keypad = "audio_track", name = "音轨", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "subtitle", name = "字幕", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "mute", name = "静音", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "main", name = "主界面", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "home", name = "主页", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "ch_up", name = "频道+", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "ch_down", name = "频道-", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "look_back", name = "回看", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "cancel", name = "取消", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_up", name = "上", localIconAddress = $"{aksIcon}shang.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "key_down", name = "下", localIconAddress = $"{aksIcon}xia.png" }); |
| | | 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" }); |
| | | keypads.Add(new KeypadEntity { keypad = "menu", name = "菜单" }); |
| | | keypads.Add(new KeypadEntity { keypad = "part_up", name = "上一部" }); |
| | | keypads.Add(new KeypadEntity { keypad = "part_down", name = "下一部" }); |
| | | keypads.Add(new KeypadEntity { keypad = "fast_rewind", name = "快退" }); |
| | | keypads.Add(new KeypadEntity { keypad = "fast_forward", name = "快进" }); |
| | | keypads.Add(new KeypadEntity { keypad = "stop", name = "停止" }); |
| | | keypads.Add(new KeypadEntity { keypad = "pause", name = "暂停", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "play", name = "播放", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "lamp", name = "灯光1", localIconAddress = $"{aksIcon}zdyanjian.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "lamp_plc", name = "灯光2", 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; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |