| | |
| | | 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> |
| | |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 清空所有缓存数据 |
| | | /// </summary> |
| | | public void ClearData() { |
| | | movieLibraryInfoEntities.Clear(); |
| | | CollectList.Clear(); |
| | | } |
| | | /// <summary> |
| | | /// 影片详情列表 |
| | | /// </summary> |
| | | public Dictionary<string, MovieLibraryInfoEntity> movieLibraryInfoEntities = new Dictionary<string, MovieLibraryInfoEntity>(); |
| | | /// <summary> |
| | | /// 收藏影片详情列表 |
| | | /// </summary> |
| | | public List<MovieLibrary> CollectList = new List<MovieLibrary>(); |
| | | /// <summary> |
| | | /// 添加影片详情缓存 |
| | | /// </summary> |
| | | /// <param name="movieLibraryInfo"></param> |
| | | public void AddMovieLibraryInfo(MovieLibraryInfoEntity movieLibraryInfo) |
| | | { |
| | | if (movieLibraryInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(movieLibraryInfo.rcId) && string.IsNullOrEmpty(movieLibraryInfo.movieId)) |
| | | { |
| | | return; |
| | | } |
| | | string key = movieLibraryInfo.rcId + "_" + movieLibraryInfo.movieId; |
| | | |
| | | if (movieLibraryInfoEntities.ContainsKey(key)) |
| | | { |
| | | movieLibraryInfoEntities.Remove(key); |
| | | } |
| | | movieLibraryInfoEntities.Add(key, movieLibraryInfo); |
| | | } |
| | | /// <summary> |
| | | /// 删除影片详情缓存 |
| | | /// </summary> |
| | | /// <param name="key"></param> |
| | | public bool DelMovieLibraryInfo(string key) |
| | | { |
| | | if (movieLibraryInfoEntities.ContainsKey(key)) |
| | | { |
| | | return movieLibraryInfoEntities.Remove(key); |
| | | } |
| | | return true; |
| | | } |
| | | /// <summary> |
| | | /// 从缓存获取影片详情 |
| | | /// </summary> |
| | | /// <param name="key">规则:rcId_movieId(遥控器id_影片id)</param> |
| | | /// <returns>不存在返回null</returns> |
| | | public MovieLibraryInfoEntity GetMovieLibraryInfo(string key) |
| | | { |
| | | if (string.IsNullOrEmpty(key)) |
| | | { |
| | | return null; |
| | | } |
| | | foreach (var dic in movieLibraryInfoEntities) |
| | | { |
| | | if (dic.Key == key) |
| | | { |
| | | return dic.Value; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | /// <summary> |
| | | /// 添加收藏影片 |
| | | /// </summary> |
| | | /// <param name="movieLibraryInfo"></param> |
| | | public void AddCollectMovie(MovieLibrary movieLibrary) |
| | | { |
| | | if (movieLibrary == null) |
| | | { |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(movieLibrary.movieId)) |
| | | { |
| | | return; |
| | | } |
| | | if (CollectList.Count == 0) |
| | | { |
| | | CollectList.Add(movieLibrary); |
| | | return; |
| | | } |
| | | for (int i = 0; i < CollectList.Count; i++) |
| | | { |
| | | if (CollectList[i].movieId == movieLibrary.movieId) |
| | | { |
| | | CollectList.RemoveAt(i); |
| | | CollectList.Insert(i, movieLibrary); |
| | | } |
| | | |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 删除添加收藏影片 |
| | | /// </summary> |
| | | /// <param name="key"></param> |
| | | public bool DelCollectMovie(MovieLibrary movieLibrary) |
| | | { |
| | | if (movieLibrary == null) |
| | | { |
| | | return false; |
| | | } |
| | | if ( string.IsNullOrEmpty(movieLibrary.movieId)) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | for (int i = 0; i < CollectList.Count; i++) |
| | | { |
| | | if (CollectList[i].movieId == movieLibrary.movieId) |
| | | { |
| | | CollectList.RemoveAt(i); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取影音中控屏列表 |
| | |
| | | { |
| | | var list = FunctionList.List.GetVideoControlsList(); |
| | | #if DEBUG |
| | | list.Add(new Function { name = "影音中控屏一", sid = "11111111", spk = SPK.AvZkAiks }); |
| | | list.Add(new Function { name = "影音中控屏二", sid = "22222222", spk = SPK.AvZkAiks }); |
| | | //list.Add(new Function { name = "影音中控屏一", sid = "11111111", spk = SPK.AvZkAiks }); |
| | | //list.Add(new Function { name = "影音中控屏二", sid = "22222222", spk = SPK.AvZkAiks }); |
| | | #endif |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取【音乐】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetMusicKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on", name = "开", localIconAddress = $"{aksIcon}kai.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "menu", name = "菜单", localIconAddress = $"{aksIcon}caidan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "return", name = "返回", localIconAddress = $"{aksIcon}fanhui.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "sound_channel", name = "声道", localIconAddress = $"{aksIcon}shengdao.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 = "mute", name = "静音", localIconAddress = $"{aksIcon}jingyin.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "part_up", name = "上一部", localIconAddress = $"{aksIcon}shangyibu.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "part_down", name = "下一部", localIconAddress = $"{aksIcon}xiayibu.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "fast_rewind", name = "快退", localIconAddress = $"{aksIcon}kauitui.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "fast_forward", name = "快进", localIconAddress = $"{aksIcon}kuaijin.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "stop", name = "停止", localIconAddress = $"{aksIcon}tingzhi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "pause", name = "暂停", localIconAddress = $"{aksIcon}zanting.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "play", name = "播放", localIconAddress = $"{aksIcon}bofang.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "in_out_warehouse", name = "进出仓", localIconAddress = $"{aksIcon}jinchucang.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "subtitle", name = "字幕", localIconAddress = $"{aksIcon}zimu.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" }); |
| | | return keypads; |
| | | } |
| | | /// <summary> |
| | | /// 获取【功放】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetGFKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on", name = "开", localIconAddress = $"{aksIcon}kai.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan.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 = "HDMI_1", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_2", name = "HDMI 2", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_3", name = "HDMI 3", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_4", name = "HDMI 4", localIconAddress = $"{aksIcon}hdmi.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" }); |
| | | return keypads; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取【投影仪】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetTYYKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on", name = "开", localIconAddress = $"{aksIcon}kai.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "signal_source", name = "信号源", localIconAddress = $"{aksIcon}xinhaoyuan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "curtain_up", name = "幕布升", localIconAddress = $"{aksIcon}mubusheng.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "curtain_down", name = "幕布降", localIconAddress = $"{aksIcon}mubujiang.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_1", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_2", name = "HDMI 2", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_3", name = "HDMI 3", localIconAddress = $"{aksIcon}hdmi.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "HDMI_4", name = "HDMI 4", localIconAddress = $"{aksIcon}hdmi.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 = "menu", name = "菜单", localIconAddress = $"{aksIcon}caidan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "return", name = "返回", localIconAddress = $"{aksIcon}fanhui.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" }); |
| | | return keypads; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取【电视】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetTvKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on", name = "开", localIconAddress = $"{aksIcon}kai.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "signal_source", name = "信号源", localIconAddress = $"{aksIcon}xinhaoyuan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "mute", 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 = "menu", name = "菜单", localIconAddress = $"{aksIcon}caidan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "return", name = "返回", localIconAddress = $"{aksIcon}fanhui.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 = "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" }); |
| | | return keypads; |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取【机顶盒】遥控器按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetJdhKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | keypads.Add(new KeypadEntity { keypad = "on", name = "开", localIconAddress = $"{aksIcon}kai.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "off", name = "关", localIconAddress = $"{aksIcon}guan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "menu", name = "菜单", localIconAddress = $"{aksIcon}caidan.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "mute", 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 = "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}gfyingliangjia.png" }); |
| | | keypads.Add(new KeypadEntity { keypad = "amplifier_volume_down", name = "功放音量 -", localIconAddress = $"{aksIcon}gf_ingliangjian.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" }); |
| | | return keypads; |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取【数字】按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetNumberKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | 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 = "ch_up", name = Language.StringByID(StringId.pindaojia) }); |
| | | 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 = "ch_down", name = Language.StringByID(StringId.pindaojian) }); |
| | | 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 = "number_continuous", name = "-/--" }); |
| | | keypads.Add(new KeypadEntity { keypad = "none", name = "" });//这个是为了占位置 |
| | | keypads.Add(new KeypadEntity { keypad = "number_0", name = "0" }); |
| | | return keypads; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取【菜单】按键列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<KeypadEntity> GetMenuKeypadList() |
| | | { |
| | | List<KeypadEntity> keypads = new List<KeypadEntity>(); |
| | | string aksIcon = "AksIcon/"; |
| | | 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" }); |
| | | return keypads; |
| | | } |
| | | |
| | | } |
| | | } |