| | |
| | | /// 切换设备容器 |
| | | /// </summary> |
| | | TypeMultiFramLayout typeMultiFramLayout; |
| | | TypeSingleFramLayout tyySingleFramLayout; |
| | | |
| | | Button switchBtn; |
| | | CustomFrameLayout xinxiFL; |
| | |
| | | |
| | | }); |
| | | |
| | | |
| | | if (typeMultiFramLayout != null) |
| | | { |
| | | //时序器 |
| | | typeMultiFramLayout.SetLeftFlClickListener((f) => |
| | | { |
| | |
| | | //设备切换 |
| | | typeMultiFramLayout.SetRightFlClickListener((f) => |
| | | { |
| | | Console.WriteLine("4"); |
| | | action?.Invoke(IntType.Control); |
| | | }); |
| | | } |
| | | if (tyySingleFramLayout!=null) { |
| | | tyySingleFramLayout.SetClickListener((f) => { |
| | | action?.Invoke(IntType.Control); |
| | | }); |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | |
| | | cornerBottomFram.BackgroundColor = MusicColor.WhiteColor; |
| | | this.AddChidren(cornerBottomFram); |
| | | |
| | | |
| | | 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); |
| | | } |