From b55fe675d1dd17748a29e4e7de60d14e36740a6e Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期六, 14 十月 2023 13:01:30 +0800
Subject: [PATCH] 2023年10月14日13:01:27
---
HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs | 81 ++++++++++++++++++++++++++++++++++------
1 files changed, 68 insertions(+), 13 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs
index 96eecee..e5bb27a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs
@@ -12,6 +12,15 @@
/// </summary>
public class AksCommonMethod
{
+ /// <summary>
+ /// 閫変腑棰滆壊
+ /// </summary>
+ public const uint seleBackgroundColor = 0xFFF2F3F7;
+ /// <summary>
+ /// 涓嶆敮鎸佹寜閿鑹�
+ /// </summary>
+ public const uint unBackgroundColor = 0xFFA3AAB7;
+
private static AksCommonMethod commonMethod = null;
/// <summary>
/// 鑾峰彇瀵硅薄
@@ -33,7 +42,8 @@
/// <summary>
/// 娓呯┖鎵�鏈夌紦瀛樻暟鎹�
/// </summary>
- public void ClearData() {
+ public void ClearData()
+ {
movieLibraryInfoEntities.Clear();
CollectList.Clear();
}
@@ -113,6 +123,11 @@
{
return;
}
+ if (CollectList.Count == 0)
+ {
+ CollectList.Add(movieLibrary);
+ return;
+ }
for (int i = 0; i < CollectList.Count; i++)
{
if (CollectList[i].movieId == movieLibrary.movieId)
@@ -133,7 +148,7 @@
{
return false;
}
- if ( string.IsNullOrEmpty(movieLibrary.movieId))
+ if (string.IsNullOrEmpty(movieLibrary.movieId))
{
return false;
}
@@ -151,7 +166,7 @@
}
-
+
/// <summary>
/// 鑾峰彇褰遍煶涓帶灞忓垪琛�
@@ -172,7 +187,7 @@
/// 鑾峰彇銆愰煶涔愩�戦仴鎺у櫒鎸夐敭鍒楄〃
/// </summary>
/// <returns></returns>
- public List<KeypadEntity> GetMusicKeypadList()
+ public List<KeypadEntity> GetMusicKeypadList(RemoteControlEntity remoteControlEntity)
{
List<KeypadEntity> keypads = new List<KeypadEntity>();
string aksIcon = "AksIcon/";
@@ -198,13 +213,14 @@
//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/";
@@ -220,6 +236,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;
}
@@ -227,7 +244,7 @@
/// 鑾峰彇銆愭姇褰变华銆戦仴鎺у櫒鎸夐敭鍒楄〃
/// </summary>
/// <returns></returns>
- public List<KeypadEntity> GetTYYKeypadList()
+ public List<KeypadEntity> GetTYYKeypadList(RemoteControlEntity remoteControlEntity)
{
List<KeypadEntity> keypads = new List<KeypadEntity>();
string aksIcon = "AksIcon/";
@@ -248,6 +265,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;
}
@@ -256,7 +274,7 @@
/// 鑾峰彇銆愮數瑙嗐�戦仴鎺у櫒鎸夐敭鍒楄〃
/// </summary>
/// <returns></returns>
- public List<KeypadEntity> GetTvKeypadList()
+ public List<KeypadEntity> GetTvKeypadList(RemoteControlEntity remoteControlEntity)
{
List<KeypadEntity> keypads = new List<KeypadEntity>();
string aksIcon = "AksIcon/";
@@ -274,8 +292,9 @@
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;
-
+
}
@@ -283,7 +302,7 @@
/// 鑾峰彇銆愭満椤剁洅銆戦仴鎺у櫒鎸夐敭鍒楄〃
/// </summary>
/// <returns></returns>
- public List<KeypadEntity> GetJdhKeypadList()
+ public List<KeypadEntity> GetJdhKeypadList(RemoteControlEntity remoteControlEntity)
{
List<KeypadEntity> keypads = new List<KeypadEntity>();
string aksIcon = "AksIcon/";
@@ -295,12 +314,13 @@
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}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" });
+ this.CheckKeyIsClick(remoteControlEntity, keypads);
return keypads;
}
@@ -310,7 +330,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" });
@@ -327,6 +347,7 @@
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;
}
@@ -334,7 +355,7 @@
/// 鑾峰彇銆愯彍鍗曘�戞寜閿垪琛�
/// </summary>
/// <returns></returns>
- public List<KeypadEntity> GetMenuKeypadList()
+ public List<KeypadEntity> GetMenuKeypadList(RemoteControlEntity remoteControlEntity)
{
List<KeypadEntity> keypads = new List<KeypadEntity>();
string aksIcon = "AksIcon/";
@@ -343,8 +364,42 @@
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