From efcffde735fa65ae34bae0bcc86313b74ed0e36c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 20 五月 2024 13:47:38 +0800
Subject: [PATCH] 优化离线数据

---
 HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs |   55 +++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs
index 5279b01..6595c4d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs
@@ -4,6 +4,7 @@
 using System.Collections.Generic;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
 
+
 namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView
 {
     /// <summary>
@@ -74,7 +75,7 @@
         /// </summary>
         public List<KeypadEntity> GetTestList()
         {
-            return AksCommonMethod.Current.GetTYYKeypadList();
+            return AksCommonMethod.Current.GetTYYKeypadList(null);
         }
 
         /// <summary>
@@ -125,12 +126,21 @@
                     line++;
                     xCount = 0;
                 }
+                //涓嶆敮鎸佹寜閿偣鍑昏儗鏅鑹�
+                if (!keypad.isClicked)
+                {
+                    buttonFram.GetImageButton().Alpha = 0.5f;
+                    buttonFram.GetNameButton().TextColor =unBackgroundColor;
+                    buttonFram.SetClick(false);
+
+                }
                 buttonFram.SetClickListener((fl, btnIcon, btnName) =>
                 {
-                    if (buttonFram.Tag != null&& buttonFram.Tag is KeypadEntity)
+                    if (buttonFram.Tag == null)
                     {
-                        selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag);
+                        return;
                     }
+                    selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag);
                 });
 
                 //if (defaultIndex != -1 && defaultIndex == i)
@@ -205,13 +215,21 @@
                     currnetheightValue += ButtonFramLayout.heightFrameLayout;
                     currnetWidthValue = 0;
                 }
-
+                //涓嶆敮鎸佹寜閿偣鍑昏儗鏅鑹�
+                if (!keypad.isClicked)
+                {
+                    buttonFram.GetImageButton().Alpha = 0.5f;
+                    buttonFram.GetNameButton().TextColor = unBackgroundColor;
+                    buttonFram.SetClick(false);
+                }
                 buttonFram.SetClickListener((fl, btnIcon, btnName) =>
                 {
-                    if (buttonFram.Tag != null&& buttonFram.Tag is KeypadEntity)
+                    if (buttonFram.Tag == null)
                     {
-                        selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag);
+                        return;
                     }
+                    selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag);
+                  
                 });
 
                 //if (defaultIndex != -1 && defaultIndex == i)
@@ -237,12 +255,12 @@
             }
             int currnetheightValue = 0;
             int currnetWidthValue = 0;
-            int heightMaxValue = 84;
+            int heightMaxValue = 84 - 6;
             int widthMaxValue = 78;
             //鑾峰彇鐩稿涓�涓含搴﹀��
             int heightDimensionValue = this.Height - Application.GetRealHeight(this.topMargin) - Application.GetRealHeight(this.bottomMargin) - Application.GetRealHeight(heightMaxValue / 2);
             int widthDimensionValue = this.Width - Application.GetRealWidth(this.leftMargin) - Application.GetRealWidth(this.rightMargin) - Application.GetRealHeight(widthMaxValue / 2);
-            for (int i = 0; i <mList.Count; i++)
+            for (int i = 0; i < mList.Count; i++)
             {
                 var keypad = mList[i];
                 Button button = new Button
@@ -258,8 +276,9 @@
                     IsBold = true,
                     Tag = keypad,
                     BackgroundColor = MusicColor.WhiteColor,
-                    SelectedBackgroundColor = 0xFFEFEFEF,
+                    SelectedBackgroundColor = 0xFFF2F3F7,
                     Radius = (uint)Application.GetRealHeight(8),
+                    SelectedTextColor = MusicColor.TextColor,
                 };
                 this.AddChidren(button);
 
@@ -269,18 +288,22 @@
                     currnetheightValue += heightMaxValue;
                     currnetWidthValue = 0;
                 }
-                button.MouseDownEventHandler += (sen, e) =>
+                //涓嶆敮鎸佹寜閿偣鍑昏儗鏅鑹�
+                if (!keypad.isClicked)
                 {
-                    if (button.Tag == null || ((KeypadEntity)button.Tag).keypad == "none")
+                    button.TextColor =unBackgroundColor;
+
+                }
+
+
+                button.MouseUpEventHandler += (sen, e) =>
+                {
+                    if (button.Tag == null || ((KeypadEntity)button.Tag).keypad == "none"|| !((KeypadEntity)button.Tag).isClicked)
                     {
                         return;
                     }
-                    button.IsSelected = true;
                     selectKeyAction?.Invoke((KeypadEntity)button.Tag);
-                };
-                button.MouseUpEventHandler += (sen, e) =>
-                {
-                    button.IsSelected = false;
+                    SetButtonIsSelected(button);
                 };
 
                 //if (defaultIndex != -1 && defaultIndex == i)

--
Gitblit v1.8.0