mac
2023-10-16 d33b5b1a8ade81e5c738780d7a5610eb3b9fe712
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>
@@ -397,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,
@@ -410,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,
@@ -426,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);
@@ -445,7 +452,7 @@
                switchBtn.IsSelected = false;
            };
            int h = 49;
            int h = 49-6;
            int offset = 28;//x轴偏移量
            int septal = 36;//间隔
            #region
@@ -481,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);
@@ -521,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);
@@ -554,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);
@@ -696,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);
@@ -741,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),
@@ -781,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),
@@ -814,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",
@@ -939,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);
@@ -983,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);
@@ -1031,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);
@@ -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
@@ -1123,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);
@@ -1145,6 +1185,7 @@
            SelectedTextColor = MusicColor.MusicTxet14SelectedColor,
            TextAlignment = TextAlignment.Center,
            Gravity = Gravity.CenterHorizontal,
            Padding=new Padding(0,0,0,0),
        };
        Button btnNumber = new Button
        {
@@ -1162,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