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 |  122 +++++++++++++++++++++++++++-------------
 1 files changed, 82 insertions(+), 40 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
index 75534f2..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>
@@ -387,7 +394,8 @@
                 TextAlignment = TextAlignment.CenterLeft,
                 TextColor = MusicColor.TextColor,
                 TextSize = TextSize.Text16,
-                TextID = StringId.xuniyaokongqi,
+                Text= this.remoteControl.name,
+                IsBold = true,
             };
             this.AddChidren(btnTitle);
 
@@ -396,7 +404,7 @@
             {
                 Y = btnTitle.Bottom + Application.GetRealHeight(16),
                 Width = Application.GetRealWidth(240),
-                Height = Application.GetRealHeight(1095),//閬ユ帶鍣ㄥ浐瀹氶珮搴�
+                Height = Application.GetRealHeight(1095-122),//閬ユ帶鍣ㄥ浐瀹氶珮搴�
                 Radius = (uint)Application.GetRealHeight(17),
                 BackgroundColor = 0xff798394,
                 Gravity = Gravity.CenterHorizontal,
@@ -409,7 +417,7 @@
                 Y = btnTitle.Bottom + Application.GetRealHeight(16),
                 //X = Application.GetRealWidth(71),
                 Width = Application.GetRealWidth(232),
-                Height = Application.GetRealHeight(1095),//閬ユ帶鍣ㄥ浐瀹氶珮搴�
+                Height = Application.GetRealHeight(1095-122),//閬ユ帶鍣ㄥ浐瀹氶珮搴�
                 Radius = (uint)Application.GetRealHeight(17),
                 BackgroundColor = 0xff19181E,
                 Gravity = Gravity.CenterHorizontal,
@@ -425,7 +433,7 @@
                 Width = Application.GetRealWidth(48),
                 Gravity = Gravity.CenterHorizontal,
                 BackgroundColor = 0xff201F25,
-                Radius = (uint)Application.GetRealHeight(24),
+                Radius = (uint)Application.GetRealWidth(24),
 
             };
             layout.AddChidren(switchFl);
@@ -444,7 +452,7 @@
                 switchBtn.IsSelected = false;
             };
 
-            int h = 49;
+            int h = 49-6;
             int offset = 28;//x杞村亸绉婚噺
             int septal = 36;//闂撮殧
             #region
@@ -480,7 +488,7 @@
 
             var line2Fl = new FrameLayout
             {
-                Y = line1Fl.Bottom + Application.GetRealHeight(16),
+                Y = line1Fl.Bottom + Application.GetRealHeight(8),
                 Height = Application.GetRealHeight(h),
             };
             layout.AddChidren(line2Fl);
@@ -520,7 +528,7 @@
 
             var line3Fl = new FrameLayout
             {
-                Y = line2Fl.Bottom + Application.GetRealHeight(16),
+                Y = line2Fl.Bottom + Application.GetRealHeight(8),
                 Height = Application.GetRealHeight(h),
             };
             layout.AddChidren(line3Fl);
@@ -553,7 +561,7 @@
 
             var line4Fl = new FrameLayout
             {
-                Y = line3Fl.Bottom + Application.GetRealHeight(16),
+                Y = line3Fl.Bottom + Application.GetRealHeight(8),
                 Height = Application.GetRealHeight(h),
             };
             layout.AddChidren(line4Fl);
@@ -695,7 +703,7 @@
 
             var line8Fl = new FrameLayout
             {
-                Y = line7Fl.Bottom + Application.GetRealHeight(32),
+                Y = line7Fl.Bottom + Application.GetRealHeight(16),
                 Height = Application.GetRealHeight(h),
             };
             layout.AddChidren(line8Fl);
@@ -740,14 +748,14 @@
             var baseFl = new BaseFramLayout
             {
                 Y = line8Fl.Bottom,
-                Height = Application.GetRealHeight(207),
+                Height = Application.GetRealHeight(207-32-12),
             };
             layout.AddChidren(baseFl);
 
 
             btnYingliangjia = new Button
             {
-                Y = Application.GetRealHeight(32),
+                Y = Application.GetRealHeight(16),
                 X = Application.GetRealWidth(26),
                 Width = Application.GetRealWidth(36),
                 Height = Application.GetRealWidth(36),
@@ -780,7 +788,7 @@
 
             btnPindaojia = new Button 
             {
-                Y = Application.GetRealHeight(32),
+                Y = Application.GetRealHeight(16),
                 X = Application.GetRealWidth(170),
                 Width = Application.GetRealWidth(36),
                 Height = Application.GetRealWidth(36),
@@ -813,7 +821,7 @@
 
             okFl = new FrameLayout
             {
-                Y = Application.GetRealHeight(32),
+                Y = Application.GetRealHeight(16),
                 Height = Application.GetRealWidth(143),
                 Width = Application.GetRealWidth(143),
                 BackgroundImagePath = "AksIcon/ykq_ok.png",
@@ -938,7 +946,7 @@
 
             var line10Fl = new FrameLayout
             {
-                Y = line9Fl.Bottom + Application.GetRealHeight(16),
+                Y = line9Fl.Bottom + Application.GetRealHeight(8),
                 Height = Application.GetRealHeight(h),
             };
             layout.AddChidren(line10Fl);
@@ -982,7 +990,7 @@
 
             var line11Fl = new FrameLayout
             {
-                Y = line10Fl.Bottom + Application.GetRealHeight(16),
+                Y = line10Fl.Bottom + Application.GetRealHeight(8),
                 Height = Application.GetRealHeight(h),
             };
             layout.AddChidren(line11Fl);
@@ -1030,7 +1038,7 @@
 
             var line12Fl = new FrameLayout
             {
-                Y = line11Fl.Bottom + Application.GetRealHeight(16),
+                Y = line11Fl.Bottom + Application.GetRealHeight(8),
                 Height = Application.GetRealHeight(h),
             };
             layout.AddChidren(line12Fl);
@@ -1080,10 +1088,42 @@
             cornerBottomFram.BackgroundColor = MusicColor.WhiteColor;
             this.AddChidren(cornerBottomFram);
 
-            typeMultiFramLayout = new TypeMultiFramLayout();
-            typeMultiFramLayout.multiFramLayout.Y = Application.GetRealHeight(16);
-            typeMultiFramLayout.AddView(cornerBottomFram);
-            typeMultiFramLayout.btnBottonRightName.TextID = StringId.xuniyaokongqi;
+
+            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);
         }
@@ -1093,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
@@ -1122,7 +1163,7 @@
     class CustomFrameLayout : FrameLayout
     {
         public const int widthFrameLayout = 36;
-        public const int heightFrameLayout = 49;
+        public const int heightFrameLayout = 49-6;
         public CustomFrameLayout(int width = widthFrameLayout, int height = heightFrameLayout)
         {
             this.Width = Application.GetRealWidth(width);
@@ -1144,6 +1185,7 @@
             SelectedTextColor = MusicColor.MusicTxet14SelectedColor,
             TextAlignment = TextAlignment.Center,
             Gravity = Gravity.CenterHorizontal,
+            Padding=new Padding(0,0,0,0),
         };
         Button btnNumber = new Button
         {
@@ -1161,9 +1203,9 @@
             Width = Application.GetRealWidth(12),
             Height = Application.GetRealWidth(12),
             Gravity = Gravity.Center,
-            Radius = (uint)Application.GetRealHeight(6),
+            Radius = (uint)Application.GetRealWidth(6),
             BackgroundColor=0x00000000,
-            SelectedBackgroundColor = 0xFFEFEFEF,
+            SelectedBackgroundColor = 0xFFF2F3F7,
         };
 
         public FrameLayout clickFl = new FrameLayout

--
Gitblit v1.8.0