From b562a582ac3a288193e6e4f57c5eff8a344305a4 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 13:52:17 +0800
Subject: [PATCH] Update AndroidManifest.xml
---
HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs | 323 +++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 310 insertions(+), 13 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs
index 25caea1..8fcd678 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs
@@ -2,8 +2,8 @@
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
{
@@ -12,9 +12,11 @@
/// </summary>
public class AksCommonMethod
{
+
+
private static AksCommonMethod commonMethod = null;
/// <summary>
- /// 鑾峰彇瀵硅薄
+ /// 鑾峰彇瀵硅薄F
/// </summary>
public static AksCommonMethod Current
{
@@ -30,6 +32,133 @@
}
}
+ /// <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(閬ユ帶鍣╥d_褰辩墖id)</param>
+ /// <returns>涓嶅瓨鍦ㄨ繑鍥瀗ull</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>
@@ -51,7 +180,7 @@
/// 鑾峰彇銆愰煶涔愩�戦仴鎺у櫒鎸夐敭鍒楄〃
/// </summary>
/// <returns></returns>
- public List<KeypadEntity> GetMusicKeypadList()
+ public List<KeypadEntity> GetMusicKeypadList(RemoteControlEntity remoteControlEntity)
{
List<KeypadEntity> keypads = new List<KeypadEntity>();
string aksIcon = "AksIcon/";
@@ -72,18 +201,19 @@
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" });
+ //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" });
+ 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/";
@@ -91,7 +221,7 @@
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_", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi.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" });
@@ -99,6 +229,7 @@
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;
}
@@ -106,7 +237,7 @@
/// 鑾峰彇銆愭姇褰变华銆戦仴鎺у櫒鎸夐敭鍒楄〃
/// </summary>
/// <returns></returns>
- public List<KeypadEntity> GetTYYKeypadList()
+ public List<KeypadEntity> GetTYYKeypadList(RemoteControlEntity remoteControlEntity)
{
List<KeypadEntity> keypads = new List<KeypadEntity>();
string aksIcon = "AksIcon/";
@@ -115,7 +246,7 @@
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_", name = "HDMI 1", localIconAddress = $"{aksIcon}hdmi.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" });
@@ -127,6 +258,120 @@
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> GetTvKeypadList(RemoteControlEntity remoteControlEntity)
+ {
+ 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" });
+ this.CheckKeyIsClick(remoteControlEntity, keypads);
+ return keypads;
+
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇銆愭満椤剁洅銆戦仴鎺у櫒鎸夐敭鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ public List<KeypadEntity> GetJdhKeypadList(RemoteControlEntity remoteControlEntity)
+ {
+ 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}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;
}
@@ -135,7 +380,7 @@
/// 鑾峰彇銆愭暟瀛椼�戞寜閿垪琛�
/// </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" });
@@ -152,7 +397,59 @@
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>
+ /// 鑾峰彇銆愯彍鍗曘�戞寜閿垪琛�
+ /// </summary>
+ /// <returns></returns>
+ public List<KeypadEntity> GetMenuKeypadList(RemoteControlEntity remoteControlEntity)
+ {
+ 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" });
+ 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;
+ }
+ }
+
+ }
+
}
}
--
Gitblit v1.8.0