From d33b5b1a8ade81e5c738780d7a5610eb3b9fe712 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期一, 16 十月 2023 18:02:00 +0800
Subject: [PATCH] 2023年10月16日18:01:57

---
 HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs |   82 ++++++++++++++++++++++++++++++----------
 1 files changed, 61 insertions(+), 21 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
index 55b3559..d0c9130 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);
         }
@@ -1094,14 +1133,15 @@
         /// </summary>
         /// <param name="keypad"><鎸夐敭鏍囪瘑/param>
         /// <param name="keyName"><鎸夐敭鍚嶇О(鎵撳嵃鐢ㄧ殑)/param>
-        private void KeyControl(string keypad, string keyName)
+     
+        private void KeyControl(string keypad, string keyName,bool isSupport=true)
         {
             //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