From 3f6685c77beeb12baf840733fb890860f4c26e7c Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 25 七月 2024 17:25:59 +0800
Subject: [PATCH] 2024年07月25日17:24:45

---
 HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs |   96 ++++++++++++++++++++++++++++++++++++------------
 1 files changed, 72 insertions(+), 24 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs
index b0b8974..11e01c8 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/GfPage.cs
@@ -1,4 +1,4 @@
-锘縰sing System;
+锘�                     using System;
 using System.Collections.Generic;
 using HDL_ON.UI.Music;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
@@ -34,6 +34,7 @@
         public Action<IntType> action;
         CornerFramLayout cornerFram;
         TypeMultiFramLayout typeMultiFramLayout;
+        TypeSingleFramLayout gfSingleFramLayout;
 
         public void Show()
         {
@@ -53,24 +54,37 @@
 
         private void EventListener()
         {
-            cornerFram.selectKeyAction += (keypadEntity) =>
+            cornerFram.selectKeyAction += (keypadEntity) => 
             {
-                this.KeyControl(keypadEntity.keypad, keypadEntity.name);
+                this.KeyControl(keypadEntity.keypad, keypadEntity.name, keypadEntity.isClicked);
             };
-            //鏃跺簭鍣�
-            typeMultiFramLayout.SetLeftFlClickListener((f) =>
-            {
-                SxqPage sxqPage = new SxqPage(this.sequencerList, this.remoteControl.deviceId);
-                MainPage.BasePageView.AddChidren(sxqPage);
-                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-                sxqPage.Show();
 
-            });
-            //璁惧鍒囨崲
-            typeMultiFramLayout.SetRightFlClickListener((f) =>
+            if (gfSingleFramLayout != null)
             {
-                action?.Invoke(IntType.HiFi);
-            });
+                //璁惧鍒囨崲
+                gfSingleFramLayout.SetClickListener((f) =>
+                {
+                    action?.Invoke(IntType.HiFi);
+                });
+            }
+
+            if (typeMultiFramLayout != null)
+            {
+                //鏃跺簭鍣�
+                typeMultiFramLayout.SetLeftFlClickListener((f) =>
+                {
+                    SxqPage sxqPage = new SxqPage(this.sequencerList, this.remoteControl.deviceId);
+                    MainPage.BasePageView.AddChidren(sxqPage);
+                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                    sxqPage.Show();
+
+                });
+                //璁惧鍒囨崲
+                typeMultiFramLayout.SetRightFlClickListener((f) =>
+                {
+                    action?.Invoke(IntType.HiFi);
+                });
+            }
 
         }
 
@@ -86,18 +100,19 @@
                 TextAlignment = TextAlignment.CenterLeft,
                 TextColor = MusicColor.TextColor,
                 TextSize = TextSize.Text16,
-                TextID = StringId.gongfan,
+                Text = this.remoteControl.name,
+                IsBold = true,
             };
             this.AddChidren(btnTitle);
 
 
 
-            cornerFram = new CornerFramLayout(343, 284, 17);
+            cornerFram = new CornerFramLayout(343, 284 - 18, 17);
             cornerFram.X = Application.GetRealWidth(16);
             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);
@@ -107,12 +122,44 @@
             cornerBottomFram.Radius = (uint)Application.GetRealHeight(17);
             this.AddChidren(cornerBottomFram);
 
-            typeMultiFramLayout = new TypeMultiFramLayout();
-            typeMultiFramLayout.multiFramLayout.Gravity = Gravity.Center;
-            typeMultiFramLayout.AddView(cornerBottomFram);
-            typeMultiFramLayout.btnBottonRightName.TextID = StringId.gongfan;
 
+            if (sequencerList.Count == 0)
+            {
+                //娌℃湁鏃跺簭鍣�
+                gfSingleFramLayout = new TypeSingleFramLayout();
+                gfSingleFramLayout.AddView(cornerBottomFram);
+                gfSingleFramLayout.singleFramLayout.X = Application.GetRealWidth(226);
+                gfSingleFramLayout.singleFramLayout.Width = Application.GetRealWidth(101);
+                gfSingleFramLayout.singleFramLayout.Gravity = Gravity.CenterVertical;
+                gfSingleFramLayout.btnName.Text = this.remoteControl.name;
+                gfSingleFramLayout.btnName.X = Application.GetRealWidth(16);
+                gfSingleFramLayout.btnName.Width = Application.GetRealWidth(48);
+                gfSingleFramLayout.btnRightImage.X = gfSingleFramLayout.btnName.Right + Application.GetRealWidth(8);
+                gfSingleFramLayout.btnRightImage.Width = Application.GetRealWidth(16);
+                gfSingleFramLayout.btnRightImage.Height = Application.GetRealWidth(16);
+                gfSingleFramLayout.btnRightImage.UnSelectedImagePath = "AksIcon/xuanze.png";
+                gfSingleFramLayout.btnRightImage.Gravity = Gravity.CenterVertical;
+                gfSingleFramLayout.btnLeftImage.Visible = false;
+                gfSingleFramLayout.CustomCalculationWidth(TypeSingleFramLayout.Orientation.right,
+                gfSingleFramLayout.singleFramLayout,
+                gfSingleFramLayout.btnName,
+                gfSingleFramLayout.btnRightImage,
+                48, 200);
+            }
+            else
+            {
+                //鏈夋椂搴忓櫒
+                typeMultiFramLayout = new TypeMultiFramLayout();
+                typeMultiFramLayout.multiFramLayout.Gravity = Gravity.Center;
+                typeMultiFramLayout.AddView(cornerBottomFram);
+                typeMultiFramLayout.btnRightName.Text = this.remoteControl.name;
+
+            }
             this.AdjustRealHeight(16);
+
+
+
+
         }
 
         /// <summary>
@@ -120,14 +167,15 @@
         /// </summary>
         /// <param name="keypad"><鎸夐敭鏍囪瘑/param>
         /// <param name="keyName"><鎸夐敭鍚嶇О(鎵撳嵃鐢ㄧ殑)/param>
-        private void KeyControl(string keypad, string keyName)
+        /// <param name="isSupport"><鏄惁鏀寔鎺у埗/param>
+        private void KeyControl(string keypad, string keyName, bool isSupport)
         {
             //CommonMethod.Current.Loading.Start();
             CommonMethod.Current.SunThread(() =>
             {
                 try
                 {
-                    SendMethod.Current.KeypadExecute(remoteControl.deviceId, remoteControl.rcId, keypad, keyName);
+                    SendMethod.Current.KeypadExecute(remoteControl.deviceId, remoteControl.rcId, keypad, keyName, isSupport);
                 }
                 catch { }
                 finally

--
Gitblit v1.8.0