| | |
| | | /// <summary> |
| | | /// 切换设备容器 |
| | | /// </summary> |
| | | TypeMultiFramLayout typeMultiFramLayout; |
| | | TypeMultiFramLayout typeMultiFramLayout; |
| | | TypeSingleFramLayout tyySingleFramLayout; |
| | | |
| | | Button switchBtn; |
| | | CustomFrameLayout xinxiFL; |
| | |
| | | |
| | | }); |
| | | |
| | | |
| | | //时序器 |
| | | 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> |
| | |
| | | { |
| | | 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, |
| | |
| | | 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, |
| | |
| | | Width = Application.GetRealWidth(48), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = 0xff201F25, |
| | | Radius = (uint)Application.GetRealHeight(24), |
| | | Radius = (uint)Application.GetRealWidth(24), |
| | | |
| | | }; |
| | | layout.AddChidren(switchFl); |
| | |
| | | switchBtn.IsSelected = false; |
| | | }; |
| | | |
| | | int h = 49; |
| | | int h = 49-6; |
| | | int offset = 28;//x轴偏移量 |
| | | int septal = 36;//间隔 |
| | | #region |
| | |
| | | |
| | | var line2Fl = new FrameLayout |
| | | { |
| | | Y = line1Fl.Bottom + Application.GetRealHeight(16), |
| | | Y = line1Fl.Bottom + Application.GetRealHeight(8), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line2Fl); |
| | |
| | | |
| | | var line3Fl = new FrameLayout |
| | | { |
| | | Y = line2Fl.Bottom + Application.GetRealHeight(16), |
| | | Y = line2Fl.Bottom + Application.GetRealHeight(8), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line3Fl); |
| | |
| | | |
| | | var line4Fl = new FrameLayout |
| | | { |
| | | Y = line3Fl.Bottom + Application.GetRealHeight(16), |
| | | Y = line3Fl.Bottom + Application.GetRealHeight(8), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line4Fl); |
| | |
| | | |
| | | var line8Fl = new FrameLayout |
| | | { |
| | | Y = line7Fl.Bottom + Application.GetRealHeight(32), |
| | | Y = line7Fl.Bottom + Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line8Fl); |
| | |
| | | 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), |
| | |
| | | |
| | | btnPindaojia = new Button |
| | | { |
| | | Y = Application.GetRealHeight(32), |
| | | Y = Application.GetRealHeight(16), |
| | | X = Application.GetRealWidth(170), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | |
| | | |
| | | okFl = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(32), |
| | | Y = Application.GetRealHeight(16), |
| | | Height = Application.GetRealWidth(143), |
| | | Width = Application.GetRealWidth(143), |
| | | BackgroundImagePath = "AksIcon/ykq_ok.png", |
| | |
| | | |
| | | var line10Fl = new FrameLayout |
| | | { |
| | | Y = line9Fl.Bottom + Application.GetRealHeight(16), |
| | | Y = line9Fl.Bottom + Application.GetRealHeight(8), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line10Fl); |
| | |
| | | |
| | | var line11Fl = new FrameLayout |
| | | { |
| | | Y = line10Fl.Bottom + Application.GetRealHeight(16), |
| | | Y = line10Fl.Bottom + Application.GetRealHeight(8), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line11Fl); |
| | |
| | | |
| | | var line12Fl = new FrameLayout |
| | | { |
| | | Y = line11Fl.Bottom + Application.GetRealHeight(16), |
| | | Y = line11Fl.Bottom + Application.GetRealHeight(8), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line12Fl); |
| | |
| | | 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); |
| | | } |
| | |
| | | /// </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 |
| | |
| | | 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); |
| | |
| | | SelectedTextColor = MusicColor.MusicTxet14SelectedColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Padding=new Padding(0,0,0,0), |
| | | }; |
| | | Button btnNumber = new Button |
| | | { |
| | |
| | | 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 |