From e4f7080639ee8cbc71172e5202f953924cedc074 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期四, 12 十月 2023 16:37:40 +0800 Subject: [PATCH] 2023年10月12日16:37:10 --- HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs | 2 HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs | 4 HDL_ON/UI/UI2/FuntionControlView/Aks/TyyPage.cs | 2 HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ImageFramlayout.cs | 2 HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs | 2 HDL_ON/UI/UI2/FuntionControlView/Aks/TvPage.cs | 4 HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs | 27 ++++++++- HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs | 2 HDL-ON_Android/Resources/Resource.designer.cs | 2 HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs | 2 HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeSingleFramLayout.cs | 2 HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs | 72 ++++++++++++++++++++--- HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs | 4 13 files changed, 99 insertions(+), 28 deletions(-) diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs index af7c4b4..485dc4b 100644 --- a/HDL-ON_Android/Resources/Resource.designer.cs +++ b/HDL-ON_Android/Resources/Resource.designer.cs @@ -15,7 +15,7 @@ { - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.1.111")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.0.99")] public partial class Resource { diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/AksCommonMethod.cs index ececc69..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(); } @@ -138,7 +148,7 @@ { return false; } - if ( string.IsNullOrEmpty(movieLibrary.movieId)) + if (string.IsNullOrEmpty(movieLibrary.movieId)) { return false; } @@ -156,7 +166,7 @@ } - + /// <summary> /// 鑾峰彇褰遍煶涓帶灞忓垪琛� @@ -177,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/"; @@ -203,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/"; @@ -225,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; } @@ -232,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/"; @@ -253,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; } @@ -261,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/"; @@ -279,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; - + } @@ -288,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/"; @@ -306,6 +320,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; } @@ -315,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" }); @@ -332,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; } @@ -339,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/"; @@ -348,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; + } + } + + } + } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs index e99872c..038c9b5 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs @@ -175,7 +175,7 @@ { //鎸変笅鍘绘敼鍙樿儗鏅鑹� - this.BackgroundColor = 0xFFF2F3F7; + this.BackgroundColor = AksCommonMethod.seleBackgroundColor; action?.Invoke(this, btnImage, btnName); }; diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs index e407837..8fda857 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs @@ -74,7 +74,7 @@ /// </summary> public List<KeypadEntity> GetTestList() { - return AksCommonMethod.Current.GetTYYKeypadList(); + return AksCommonMethod.Current.GetTYYKeypadList(null); } /// <summary> @@ -125,9 +125,17 @@ line++; xCount = 0; } + //涓嶆敮鎸佹寜閿偣鍑昏儗鏅鑹� + if (!keypad.isClicked) + { + buttonFram.Enable = false; + buttonFram.GetImageButton().Enable = false; + buttonFram.GetNameButton().Enable = false; + buttonFram.BackgroundColor = AksCommonMethod.unBackgroundColor; + } buttonFram.SetClickListener((fl, btnIcon, btnName) => { - if (buttonFram.Tag != null&& buttonFram.Tag is KeypadEntity) + if (buttonFram.Tag != null && buttonFram.Tag is KeypadEntity) { selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); } @@ -205,7 +213,14 @@ currnetheightValue += ButtonFramLayout.heightFrameLayout; currnetWidthValue = 0; } - + //涓嶆敮鎸佹寜閿偣鍑昏儗鏅鑹� + if (!keypad.isClicked) + { + buttonFram.Enable = false; + buttonFram.GetImageButton().Enable = false; + buttonFram.GetNameButton().Enable = false; + buttonFram.BackgroundColor = AksCommonMethod.unBackgroundColor; + } buttonFram.SetClickListener((fl, btnIcon, btnName) => { if (buttonFram.Tag != null&& buttonFram.Tag is KeypadEntity) @@ -270,6 +285,12 @@ currnetheightValue += heightMaxValue; currnetWidthValue = 0; } + //涓嶆敮鎸佹寜閿偣鍑昏儗鏅鑹� + if (!keypad.isClicked) + { + button.Enable = false; + button.BackgroundColor = AksCommonMethod.unBackgroundColor; + } button.MouseDownEventHandler += (sen, e) => { if (button.Tag == null || ((KeypadEntity)button.Tag).keypad == "none") diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ImageFramlayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ImageFramlayout.cs index ad1caf0..a69b5e8 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ImageFramlayout.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ImageFramlayout.cs @@ -89,7 +89,7 @@ EventHandler<MouseEventArgs> DownClick = (sender, e) => { //鎸変笅鍘绘敼鍙樿儗鏅鑹� - //this.BackgroundColor = 0xff454635; + //this.BackgroundColor = AksCommonMethod.seleBackgroundColor; action?.Invoke(this); }; this.MouseUpEventHandler += DownClick; diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs index 174f53b..c6104ec 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs @@ -7,7 +7,7 @@ { private uint UpBackgroundColor = MusicColor.ViewColor; - private uint DownBackgroundColor = 0xFFEFEFEF; + private uint DownBackgroundColor = AksCommonMethod.seleBackgroundColor; /// <summary> /// 澶氫釜绫诲瀷瀹瑰櫒 @@ -176,7 +176,7 @@ EventHandler<MouseEventArgs> DownClick = (sender, e) => { //鎸変笅鍘绘敼鍙樿儗鏅鑹� - //rightFramLayout.BackgroundColor = this.DownBackgroundColor; + //rightFramLayout.BackgroundColor =AksCommonMethod.seleBackgroundColor; action?.Invoke(rightFramLayout); }; rightFramLayout.MouseDownEventHandler += DownClick; diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeSingleFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeSingleFramLayout.cs index e5b2b5c..ee5e6ac 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeSingleFramLayout.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeSingleFramLayout.cs @@ -8,7 +8,7 @@ { private uint UpBackgroundColor = MusicColor.ViewColor; - private uint DownBackgroundColor = 0xFFEFEFEF; + private uint DownBackgroundColor = AksCommonMethod.seleBackgroundColor; /// <summary> /// 鍗曚釜绫诲瀷瀹瑰櫒 /// </summary> diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs index 5dcbb8c..467373a 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/Entity/RemoteControlEntity.cs @@ -21,7 +21,7 @@ ///5 = 鎶曞奖浠� ///6 = 涓囪兘閬ユ帶鍣� /// </summary> -public int type; + public int type; /// <summary> /// 閬ユ帶鍣╥d /// </summary> diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs index a77cf49..9eec8dd 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs @@ -98,7 +98,7 @@ cornerFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); this.AddChidren(cornerFram); cornerFram.SetMargin(16, 0, 16, 0); - cornerFram.LoadButtonPage(AksCommonMethod.Current.GetGFKeypadList(),4); + cornerFram.LoadButtonPage(AksCommonMethod.Current.GetGFKeypadList(this.remoteControl),4); CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 72, 17); diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs index 5903742..a0aa7e9 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/JdhPage.cs @@ -146,7 +146,7 @@ cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); this.AddChidren(cornerTopFram); cornerTopFram.SetMargin(16, 0, 16, 0); - cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetJdhKeypadList(),new List<int> { 5, 6 }); + cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetJdhKeypadList(this.remoteControl),new List<int> { 5, 6 }); #region ----棰戦亾 鎺у埗---- FrameLayout middLayout = new FrameLayout @@ -253,7 +253,7 @@ numberFrame.Y = middLayout.Bottom + Application.GetRealHeight(16); numberFrame.BackgroundColor = MusicColor.WhiteColor; numberFrame.SetMargin(16, 0, 16, 0); - numberFrame.LoadNumberButtonPage(AksCommonMethod.Current.GetNumberKeypadList()); + numberFrame.LoadNumberButtonPage(AksCommonMethod.Current.GetNumberKeypadList(this.remoteControl)); this.AddChidren(numberFrame); diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs index 7c4db8f..c44cb18 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs @@ -134,7 +134,7 @@ cornerFram.X = Application.GetRealWidth(16); cornerFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); cornerFram.SetMargin(16, 0, 16, 0); - cornerFram.LoadButtonPage(AksCommonMethod.Current.GetMusicKeypadList(), 4); + cornerFram.LoadButtonPage(AksCommonMethod.Current.GetMusicKeypadList(this.remoteControl), 4); CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 364-32, 17); diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/TvPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/TvPage.cs index dee191d..05b3f49 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/TvPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/TvPage.cs @@ -150,7 +150,7 @@ cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); this.AddChidren(cornerTopFram); cornerTopFram.SetMargin(16, 0, 16, 0); - cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetTvKeypadList(),new List<int> { 5, 6 }); + cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetTvKeypadList(this.remoteControl),new List<int> { 5, 6 }); #region ----棰戦亾 鎺у埗---- FrameLayout middLayout = new FrameLayout @@ -257,7 +257,7 @@ numberFrame.Y = middLayout.Bottom + Application.GetRealHeight(16); numberFrame.BackgroundColor = MusicColor.WhiteColor; numberFrame.SetMargin(16,0,16,0); - numberFrame.LoadNumberButtonPage(AksCommonMethod.Current.GetNumberKeypadList()); + numberFrame.LoadNumberButtonPage(AksCommonMethod.Current.GetNumberKeypadList(this.remoteControl)); this.AddChidren(numberFrame); diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/TyyPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/TyyPage.cs index 2933d1c..d0496b5 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/TyyPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/TyyPage.cs @@ -133,7 +133,7 @@ cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); this.AddChidren(cornerTopFram); cornerTopFram.SetMargin(16, 0, 16, 0); - cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetTYYKeypadList(),new List<int> { 3, 4, 5 }); + cornerTopFram.LoadButtonPage(AksCommonMethod.Current.GetTYYKeypadList(this.remoteControl),new List<int> { 3, 4, 5 }); CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 292-30, 17); -- Gitblit v1.8.0