From 5868b389a3544cf14ff65e87b554c07349badd28 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期一, 16 十月 2023 15:30:46 +0800
Subject: [PATCH] 2023年10月16日15:30:28

---
 HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs |   77 +++++++++++++++++++++++++++++---------
 1 files changed, 58 insertions(+), 19 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
index 55b3559..5e49151 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
@@ -35,7 +35,8 @@
         /// <summary>
         /// 鍒囨崲璁惧瀹瑰櫒
         /// </summary>
-        TypeMultiFramLayout typeMultiFramLayout;
+        TypeMultiFramLayout typeMultiFramLayout; 
+        TypeSingleFramLayout tyySingleFramLayout;
 
         Button switchBtn;
         CustomFrameLayout xinxiFL;
@@ -354,22 +355,28 @@
 
             });
 
-
-            //鏃跺簭鍣�
-            typeMultiFramLayout.SetLeftFlClickListener((f) =>
+            if (typeMultiFramLayout != null)
             {
-                SxqPage sxqPage = new SxqPage(this.sequencerList,this.remoteControl.deviceId);
-                MainPage.BasePageView.AddChidren(sxqPage);
-                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-                sxqPage.Show();
+                //鏃跺簭鍣�
+                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) =>
-            {
-                Console.WriteLine("4");
-                action?.Invoke(IntType.Control);
-            });
+                });
+                //璁惧鍒囨崲
+                typeMultiFramLayout.SetRightFlClickListener((f) =>
+                {
+                    action?.Invoke(IntType.Control);
+                });
+            }
+            if (tyySingleFramLayout!=null) {
+                tyySingleFramLayout.SetClickListener((f) => {
+                    action?.Invoke(IntType.Control);
+                });
+            }
 
         }
         /// <summary>
@@ -1081,10 +1088,42 @@
             cornerBottomFram.BackgroundColor = MusicColor.WhiteColor;
             this.AddChidren(cornerBottomFram);
 
-            typeMultiFramLayout = new TypeMultiFramLayout();
-            typeMultiFramLayout.multiFramLayout.Y = Application.GetRealHeight(16);
-            typeMultiFramLayout.AddView(cornerBottomFram);
-            typeMultiFramLayout.btnBottonRightName.Text = this.remoteControl.name;
+
+            if (sequencerList.Count == 0)
+            {
+                //娌℃湁鏃跺簭鍣�
+                tyySingleFramLayout = new TypeSingleFramLayout();
+                tyySingleFramLayout.AddView(cornerBottomFram);
+                tyySingleFramLayout.singleFramLayout.X = Application.GetRealWidth(226);
+                tyySingleFramLayout.singleFramLayout.Width = Application.GetRealWidth(101);
+                tyySingleFramLayout.singleFramLayout.Gravity = Gravity.CenterVertical;
+                tyySingleFramLayout.btnName.Text = this.remoteControl.name;
+                tyySingleFramLayout.btnName.X = Application.GetRealWidth(16);
+                tyySingleFramLayout.btnName.Width = Application.GetRealWidth(48);
+                tyySingleFramLayout.btnRightImage.X = tyySingleFramLayout.btnName.Right + Application.GetRealWidth(8);
+                tyySingleFramLayout.btnRightImage.Width = Application.GetRealWidth(16);
+                tyySingleFramLayout.btnRightImage.Height = Application.GetRealWidth(16);
+                tyySingleFramLayout.btnRightImage.UnSelectedImagePath = "AksIcon/xuanze.png";
+                tyySingleFramLayout.btnRightImage.Gravity = Gravity.CenterVertical;
+                tyySingleFramLayout.btnLeftImage.Visible = false;
+
+                if (tyySingleFramLayout.btnName.GetTextWidth() > Application.GetRealWidth(48))
+                {
+                    tyySingleFramLayout.singleFramLayout.Width = Application.GetRealWidth(101  - 48) + tyySingleFramLayout.btnName.GetTextWidth();
+                    tyySingleFramLayout.singleFramLayout.X = Application.GetRealWidth(226 + 48) - tyySingleFramLayout.btnName.GetTextWidth();
+                    tyySingleFramLayout.btnName.Width =tyySingleFramLayout.btnName.GetTextWidth();
+                    tyySingleFramLayout.btnRightImage.X = tyySingleFramLayout.btnName.Right + Application.GetRealWidth(8);
+                } 
+
+            }
+            else
+            {
+
+                typeMultiFramLayout = new TypeMultiFramLayout();
+                typeMultiFramLayout.multiFramLayout.Y = Application.GetRealHeight(16);
+                typeMultiFramLayout.AddView(cornerBottomFram);
+                typeMultiFramLayout.btnBottonRightName.Text = this.remoteControl.name;
+            }
 
             this.AdjustRealHeight(16);
         }

--
Gitblit v1.8.0