| | |
| | | } |
| | | public Action<IntType> action; |
| | | /// <summary> |
| | | /// 最上面功能键容器 |
| | | /// </summary> |
| | | CornerFramLayout cornerTopFram; |
| | | /// <summary> |
| | | /// 数字按键容器 |
| | | /// </summary> |
| | | CornerFramLayout numberFrame; |
| | | /// <summary> |
| | | /// 菜单容器 |
| | | /// </summary> |
| | | MenuFramLayout menuFram; |
| | | /// <summary> |
| | | /// 切换设备容器 |
| | | /// </summary> |
| | | TypeMultiFramLayout typeMultiFramLayout; |
| | | |
| | | Button switchBtn; |
| | | CustomFrameLayout xinxiFL; |
| | | CustomFrameLayout shoucangFL; |
| | | CustomFrameLayout dianyingFL; |
| | | CustomFrameLayout yuleFL; |
| | | CustomFrameLayout dianshiFL; |
| | | CustomFrameLayout redFL; |
| | | CustomFrameLayout yellowFL; |
| | | CustomFrameLayout blueFL; |
| | | CustomFrameLayout number1FL; |
| | | CustomFrameLayout number2FL; |
| | | CustomFrameLayout number3FL; |
| | | CustomFrameLayout number4FL; |
| | | CustomFrameLayout number5FL; |
| | | CustomFrameLayout number6FL; |
| | | CustomFrameLayout number7FL; |
| | | CustomFrameLayout number8FL; |
| | | CustomFrameLayout number9FL; |
| | | CustomFrameLayout yinguiFL; |
| | | CustomFrameLayout number0FL; |
| | | CustomFrameLayout zimuFL; |
| | | CustomFrameLayout jingyinFL; |
| | | CustomFrameLayout toupingFL; |
| | | CustomFrameLayout zhuyeFL; |
| | | FrameLayout okFl; |
| | | Button btnLeft; |
| | | Button btnQian; |
| | | Button btnRight; |
| | | Button btnHou; |
| | | Button btnOk; |
| | | Button btnJia; |
| | | Button btnJian; |
| | | Button btnShang; |
| | | Button btnXia; |
| | | CustomFrameLayout caidanFL; |
| | | CustomFrameLayout fanhuiFL; |
| | | CustomFrameLayout shanyibuFL; |
| | | CustomFrameLayout bofangFL; |
| | | CustomFrameLayout xiayibuFL; |
| | | CustomFrameLayout kuaituiFL; |
| | | CustomFrameLayout zantingFL; |
| | | CustomFrameLayout kusinjinFL; |
| | | CustomFrameLayout dengguanFL; |
| | | CustomFrameLayout tingzhiFL; |
| | | CustomFrameLayout dankongdengFL; |
| | | |
| | | |
| | | public void Show() |
| | |
| | | /// </summary> |
| | | private void EventListener() |
| | | { |
| | | //功能键控制 |
| | | cornerTopFram.selectAction += (value) => |
| | | { |
| | | Console.WriteLine("1"); |
| | | }; |
| | | //数字键控制 |
| | | numberFrame.selectAction += (s) => |
| | | { |
| | | Console.WriteLine("打印====" + s); |
| | | }; |
| | | //菜单上按键 |
| | | menuFram.SetTopClickListener((b) => |
| | | //开关 |
| | | switchBtn.MouseDownEventHandler += (senser, e) => |
| | | { |
| | | |
| | | Console.WriteLine("5"); |
| | | }); |
| | | //菜单下按键 |
| | | menuFram.SetBottomClickListener((b) => |
| | | }; |
| | | //信息 |
| | | xinxiFL.SetClickListener(() => |
| | | { |
| | | Console.WriteLine("6"); |
| | | |
| | | }); |
| | | //菜单左按键 |
| | | menuFram.SetLeftClickListener((b) => |
| | | //收藏 |
| | | shoucangFL.SetClickListener(() => |
| | | { |
| | | Console.WriteLine("7"); |
| | | }); |
| | | //菜单右按键 |
| | | menuFram.SetRightClickListener((b) => |
| | | //电影 |
| | | dianyingFL.SetClickListener(() => |
| | | { |
| | | Console.WriteLine("8"); |
| | | |
| | | }); |
| | | //菜单ok按键 |
| | | menuFram.SetOkClickListener((b) => |
| | | //娱乐 |
| | | yuleFL.SetClickListener(() => |
| | | { |
| | | Console.WriteLine("9"); |
| | | |
| | | }); |
| | | //电视 |
| | | dianshiFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //红色 |
| | | redFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //黄色 |
| | | yellowFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //蓝色 |
| | | blueFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //1 |
| | | number1FL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //2 |
| | | number2FL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //3 |
| | | number3FL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //4 |
| | | number4FL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //5 |
| | | number5FL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //6 |
| | | number6FL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //7 |
| | | number7FL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //8 |
| | | number8FL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //9 |
| | | number9FL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | |
| | | //音轨 |
| | | yinguiFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //0 |
| | | number0FL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //字幕 |
| | | zimuFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //静音 |
| | | jingyinFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //投屏 |
| | | toupingFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //主页 |
| | | zhuyeFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //左 |
| | | btnLeft.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_left_selected.png"; |
| | | |
| | | }; |
| | | //前 |
| | | btnQian.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_qian_selected.png"; |
| | | |
| | | }; |
| | | |
| | | //右 |
| | | btnRight.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_right_selected.png"; |
| | | |
| | | }; |
| | | |
| | | //后 |
| | | btnHou.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_hou_selected.png"; |
| | | }; |
| | | //OK |
| | | btnOk.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok_selected.png"; |
| | | }; |
| | | //加 |
| | | btnJia.MouseDownEventHandler += (sen, e) => { }; |
| | | //减 |
| | | btnJian.MouseDownEventHandler += (sen, e) => { }; |
| | | //上 |
| | | btnShang.MouseDownEventHandler += (sen, e) => { }; |
| | | //下 |
| | | btnXia.MouseDownEventHandler += (sen, e) => { }; |
| | | |
| | | //菜单 |
| | | caidanFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //返回 |
| | | fanhuiFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //上一部 |
| | | shanyibuFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //播放 |
| | | bofangFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //下一部 |
| | | xiayibuFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //快退 |
| | | kuaituiFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //暂停 |
| | | zantingFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //快进 |
| | | kusinjinFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //灯关 |
| | | dengguanFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //停止 |
| | | tingzhiFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | //单控灯 |
| | | dankongdengFL.SetClickListener(() => |
| | | { |
| | | |
| | | }); |
| | | |
| | | |
| | | //时序器 |
| | | typeMultiFramLayout.SetLeftFlClickListener((f) => |
| | | { |
| | |
| | | typeMultiFramLayout.SetRightFlClickListener((f) => |
| | | { |
| | | Console.WriteLine("4"); |
| | | action?.Invoke(IntType.TV); |
| | | action?.Invoke(IntType.Control); |
| | | }); |
| | | |
| | | } |
| | |
| | | }; |
| | | this.AddChidren(btnTitle); |
| | | |
| | | FrameLayout layout = new FrameLayout { |
| | | |
| | | FrameLayout bottomLayout = new FrameLayout |
| | | { |
| | | Y = btnTitle.Bottom + Application.GetRealHeight(16), |
| | | X=Application.GetRealWidth(71), |
| | | Width=Application.GetRealWidth(232), |
| | | Radius=(uint)Application.GetRealHeight(17), |
| | | BackgroundColor= 0xff19181E, |
| | | Width = Application.GetRealWidth(240), |
| | | Height = Application.GetRealHeight(1095),//遥控器固定高度 |
| | | Radius = (uint)Application.GetRealHeight(17), |
| | | BackgroundColor = 0xff798394, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | }; |
| | | this.AddChidren(bottomLayout); |
| | | |
| | | |
| | | FrameLayout layout = new FrameLayout |
| | | { |
| | | Y = btnTitle.Bottom + Application.GetRealHeight(16), |
| | | //X = Application.GetRealWidth(71), |
| | | Width = Application.GetRealWidth(232), |
| | | Height = Application.GetRealHeight(1095),//遥控器固定高度 |
| | | Radius = (uint)Application.GetRealHeight(17), |
| | | BackgroundColor = 0xff19181E, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | |
| | | }; |
| | | this.AddChidren(layout); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | cornerTopFram = new CornerFramLayout(343, 452, 17); |
| | | cornerTopFram.X = Application.GetRealWidth(16); |
| | | cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16); |
| | | this.AddChidren(cornerTopFram); |
| | | cornerTopFram.SetList(cornerTopFram.GetTestList(17)); |
| | | cornerTopFram.SetMargin(16, 0, 16, 0); |
| | | cornerTopFram.LoadButtonPage(new List<int> { 5, 6 }); |
| | | |
| | | #region ----频道 控制---- |
| | | FrameLayout middLayout = new FrameLayout |
| | | FrameLayout switchFl = new FrameLayout() |
| | | { |
| | | Y = cornerTopFram.Bottom, |
| | | Height = Application.GetRealHeight(61), |
| | | Y = Application.GetRealHeight(32), |
| | | Height = Application.GetRealWidth(48), |
| | | Width = Application.GetRealWidth(48), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = 0xff201F25, |
| | | Radius = (uint)Application.GetRealHeight(24), |
| | | |
| | | }; |
| | | this.AddChidren(middLayout); |
| | | layout.AddChidren(switchFl); |
| | | |
| | | FrameLayout leftLayout = new FrameLayout |
| | | switchBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(105), |
| | | Y = Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(29), |
| | | Height = Application.GetRealWidth(32), |
| | | Width = Application.GetRealWidth(32), |
| | | |
| | | Gravity = Gravity.Center, |
| | | UnSelectedImagePath = "AksIcon/ykq_kai.png", |
| | | }; |
| | | middLayout.AddChidren(leftLayout); |
| | | switchFl.AddChidren(switchBtn); |
| | | |
| | | |
| | | Button leftBtnTitle = new Button |
| | | int h = 49; |
| | | int offset = 28;//x轴偏移量 |
| | | int septal = 36;//间隔 |
| | | #region |
| | | var line1Fl = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(22), |
| | | Width = leftLayout.Width, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = MusicColor.TextColor, |
| | | SelectedTextColor = MusicColor.MusicTxet14SelectedColor, |
| | | TextSize = TextSize.Text16, |
| | | TextID = StringId.pindao, |
| | | Y = switchFl.Bottom + Application.GetRealHeight(12), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | leftLayout.AddChidren(leftBtnTitle); |
| | | layout.AddChidren(line1Fl); |
| | | |
| | | |
| | | Button leftBtnLine = new Button |
| | | xinxiFL = new CustomFrameLayout(); |
| | | line1Fl.AddChidren(xinxiFL); |
| | | xinxiFL.X = Application.GetRealWidth(offset); |
| | | xinxiFL.AddImageView(); |
| | | xinxiFL.AddTextButtonView(); |
| | | xinxiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_xinxi.png"; |
| | | xinxiFL.GetTextButton().Text = "信息"; |
| | | xinxiFL.AddClickView(); |
| | | |
| | | |
| | | shoucangFL = new CustomFrameLayout(); |
| | | line1Fl.AddChidren(shoucangFL); |
| | | shoucangFL.X = xinxiFL.Right + Application.GetRealWidth(110); |
| | | shoucangFL.AddImageView(); |
| | | shoucangFL.AddTextButtonView(); |
| | | shoucangFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_shoucang.png"; |
| | | shoucangFL.GetTextButton().Text = "收藏"; |
| | | shoucangFL.AddClickView(); |
| | | |
| | | |
| | | var line2Fl = new FrameLayout |
| | | { |
| | | Y = leftBtnTitle.Bottom + Application.GetRealHeight(4), |
| | | Height = Application.GetRealHeight(2), |
| | | Width = leftBtnTitle.GetTextWidth(), |
| | | BackgroundColor = MusicColor.TextColor, |
| | | SelectedBackgroundColor = MusicColor.MusicTxet14SelectedColor, |
| | | Y = line1Fl.Bottom + Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line2Fl); |
| | | |
| | | dianyingFL = new CustomFrameLayout(); |
| | | line2Fl.AddChidren(dianyingFL); |
| | | dianyingFL.X = Application.GetRealWidth(offset); |
| | | dianyingFL.AddImageView(); |
| | | dianyingFL.AddTextButtonView(); |
| | | dianyingFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_dianying.png"; |
| | | dianyingFL.GetTextButton().Text = "电影"; |
| | | dianyingFL.AddClickView(); |
| | | |
| | | |
| | | yuleFL = new CustomFrameLayout(); |
| | | line2Fl.AddChidren(yuleFL); |
| | | yuleFL.X = dianyingFL.Right + Application.GetRealWidth(septal); |
| | | yuleFL.AddImageView(); |
| | | yuleFL.AddTextButtonView(); |
| | | yuleFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_yule.png"; |
| | | yuleFL.GetTextButton().Text = "娱乐"; |
| | | yuleFL.AddClickView(); |
| | | |
| | | dianshiFL = new CustomFrameLayout(); |
| | | line2Fl.AddChidren(dianshiFL); |
| | | dianshiFL.X = yuleFL.Right + Application.GetRealWidth(septal); |
| | | dianshiFL.AddImageView(); |
| | | dianshiFL.AddTextButtonView(); |
| | | dianshiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_dianshi.png"; |
| | | dianshiFL.GetTextButton().Text = "电视"; |
| | | dianshiFL.AddClickView(); |
| | | |
| | | |
| | | |
| | | var line3Fl = new FrameLayout |
| | | { |
| | | Y = line2Fl.Bottom + Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line3Fl); |
| | | |
| | | redFL = new CustomFrameLayout(); |
| | | line3Fl.AddChidren(redFL); |
| | | redFL.X = Application.GetRealWidth(offset); |
| | | redFL.AddColorButtonView(); |
| | | redFL.GetColorButto().BackgroundColor = MusicColor.RedColor; |
| | | redFL.AddClickView(); |
| | | |
| | | |
| | | yellowFL = new CustomFrameLayout(); |
| | | line3Fl.AddChidren(yellowFL); |
| | | yellowFL.X = redFL.Right + Application.GetRealWidth(septal); |
| | | yellowFL.AddColorButtonView(); |
| | | yellowFL.GetColorButto().BackgroundColor = 0xffFC9C04; |
| | | yellowFL.AddClickView(); |
| | | |
| | | |
| | | blueFL = new CustomFrameLayout(); |
| | | line3Fl.AddChidren(blueFL); |
| | | blueFL.X = yellowFL.Right + Application.GetRealWidth(septal); |
| | | blueFL.AddColorButtonView(); |
| | | blueFL.GetColorButto().BackgroundColor = MusicColor.MusicTxet14SelectedColor; |
| | | blueFL.AddClickView(); |
| | | |
| | | |
| | | |
| | | |
| | | var line4Fl = new FrameLayout |
| | | { |
| | | Y = line3Fl.Bottom + Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line4Fl); |
| | | |
| | | number1FL = new CustomFrameLayout(); |
| | | line4Fl.AddChidren(number1FL); |
| | | number1FL.X = Application.GetRealWidth(offset); |
| | | number1FL.AddNumberButtonView(); |
| | | number1FL.GetNumberButto().Text = "1"; |
| | | number1FL.AddClickView(); |
| | | |
| | | |
| | | number2FL = new CustomFrameLayout(); |
| | | line4Fl.AddChidren(number2FL); |
| | | number2FL.X = number1FL.Right + Application.GetRealWidth(septal); |
| | | number2FL.AddNumberButtonView(); |
| | | number2FL.GetNumberButto().Text = "2"; |
| | | number2FL.AddClickView(); |
| | | |
| | | |
| | | number3FL = new CustomFrameLayout(); |
| | | line4Fl.AddChidren(number3FL); |
| | | number3FL.X = number2FL.Right + Application.GetRealWidth(septal); |
| | | number3FL.AddNumberButtonView(); |
| | | number3FL.GetNumberButto().Text = "3"; |
| | | number3FL.AddClickView(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var line5Fl = new FrameLayout |
| | | { |
| | | Y = line4Fl.Bottom, |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line5Fl); |
| | | |
| | | number4FL = new CustomFrameLayout(); |
| | | line5Fl.AddChidren(number4FL); |
| | | number4FL.X = Application.GetRealWidth(offset); |
| | | number4FL.AddNumberButtonView(); |
| | | number4FL.GetNumberButto().Text = "4"; |
| | | number4FL.AddClickView(); |
| | | |
| | | |
| | | |
| | | |
| | | number5FL = new CustomFrameLayout(); |
| | | line5Fl.AddChidren(number5FL); |
| | | number5FL.X = number4FL.Right + Application.GetRealWidth(septal); |
| | | number5FL.AddNumberButtonView(); |
| | | number5FL.GetNumberButto().Text = "5"; |
| | | number5FL.AddClickView(); |
| | | |
| | | |
| | | number6FL = new CustomFrameLayout(); |
| | | line5Fl.AddChidren(number6FL); |
| | | number6FL.X = number5FL.Right + Application.GetRealWidth(septal); |
| | | number6FL.AddNumberButtonView(); |
| | | number6FL.GetNumberButto().Text = "6"; |
| | | number6FL.AddClickView(); |
| | | |
| | | |
| | | |
| | | |
| | | var line6Fl = new FrameLayout |
| | | { |
| | | Y = line5Fl.Bottom, |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line6Fl); |
| | | |
| | | number7FL = new CustomFrameLayout(); |
| | | line6Fl.AddChidren(number7FL); |
| | | number7FL.X = Application.GetRealWidth(offset); |
| | | number7FL.AddNumberButtonView(); |
| | | number7FL.GetNumberButto().Text = "7"; |
| | | number7FL.AddClickView(); |
| | | |
| | | |
| | | number8FL = new CustomFrameLayout(); |
| | | line6Fl.AddChidren(number8FL); |
| | | number8FL.X = number7FL.Right + Application.GetRealWidth(septal); |
| | | number8FL.AddNumberButtonView(); |
| | | number8FL.GetNumberButto().Text = "8"; |
| | | number8FL.AddClickView(); |
| | | |
| | | |
| | | number9FL = new CustomFrameLayout(); |
| | | line6Fl.AddChidren(number9FL); |
| | | number9FL.X = number8FL.Right + Application.GetRealWidth(septal); |
| | | number9FL.AddNumberButtonView(); |
| | | number9FL.GetNumberButto().Text = "9"; |
| | | number9FL.AddClickView(); |
| | | |
| | | |
| | | |
| | | var line7Fl = new FrameLayout |
| | | { |
| | | Y = line6Fl.Bottom, |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line7Fl); |
| | | |
| | | yinguiFL = new CustomFrameLayout(); |
| | | line7Fl.AddChidren(yinguiFL); |
| | | yinguiFL.X = Application.GetRealWidth(offset); |
| | | yinguiFL.AddImageView(); |
| | | yinguiFL.AddTextButtonView(); |
| | | yinguiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_yingui.png"; |
| | | yinguiFL.GetTextButton().Text = "音轨"; |
| | | yinguiFL.AddClickView(); |
| | | |
| | | |
| | | number0FL = new CustomFrameLayout(); |
| | | line7Fl.AddChidren(number0FL); |
| | | number0FL.X = yinguiFL.Right + Application.GetRealWidth(septal); |
| | | number0FL.AddNumberButtonView(); |
| | | number0FL.GetNumberButto().Text = "0"; |
| | | number0FL.AddClickView(); |
| | | |
| | | |
| | | zimuFL = new CustomFrameLayout(); |
| | | line7Fl.AddChidren(zimuFL); |
| | | zimuFL.X = number0FL.Right + Application.GetRealWidth(septal); |
| | | zimuFL.AddImageView(); |
| | | zimuFL.AddTextButtonView(); |
| | | zimuFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_zimu.png"; |
| | | zimuFL.GetTextButton().Text = "字幕"; |
| | | zimuFL.AddClickView(); |
| | | zimuFL.AddClickView(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var line8Fl = new FrameLayout |
| | | { |
| | | Y = line7Fl.Bottom + Application.GetRealHeight(32), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line8Fl); |
| | | |
| | | jingyinFL = new CustomFrameLayout(); |
| | | line8Fl.AddChidren(jingyinFL); |
| | | jingyinFL.X = Application.GetRealWidth(offset); |
| | | jingyinFL.AddImageView(); |
| | | jingyinFL.AddTextButtonView(); |
| | | jingyinFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_jingyin.png"; |
| | | jingyinFL.GetTextButton().Text = "静音"; |
| | | jingyinFL.AddClickView(); |
| | | |
| | | |
| | | toupingFL = new CustomFrameLayout(); |
| | | line8Fl.AddChidren(toupingFL); |
| | | toupingFL.X = jingyinFL.Right + Application.GetRealWidth(septal); |
| | | toupingFL.AddImageView(); |
| | | toupingFL.AddTextButtonView(); |
| | | toupingFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_youpin.png"; |
| | | toupingFL.GetTextButton().Text = "投屏"; |
| | | toupingFL.AddClickView(); |
| | | |
| | | |
| | | zhuyeFL = new CustomFrameLayout(); |
| | | line8Fl.AddChidren(zhuyeFL); |
| | | zhuyeFL.X = toupingFL.Right + Application.GetRealWidth(septal); |
| | | zhuyeFL.AddImageView(); |
| | | zhuyeFL.AddTextButtonView(); |
| | | zhuyeFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_zhuye.png"; |
| | | zhuyeFL.GetTextButton().Text = "主页"; |
| | | zhuyeFL.AddClickView(); |
| | | |
| | | |
| | | |
| | | #region 菜单布局 |
| | | |
| | | |
| | | var baseFl = new BaseFramLayout |
| | | { |
| | | Y = line8Fl.Bottom, |
| | | Height = Application.GetRealHeight(207), |
| | | }; |
| | | layout.AddChidren(baseFl); |
| | | |
| | | |
| | | btnJia = new Button |
| | | { |
| | | Y = Application.GetRealHeight(32), |
| | | X = Application.GetRealWidth(26), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "AksIcon/ykq_jia.png", |
| | | }; |
| | | baseFl.AddChidren(btnJia); |
| | | |
| | | |
| | | btnJian = new Button |
| | | { |
| | | Y = btnJia.Bottom + Application.GetRealHeight(71), |
| | | X = Application.GetRealWidth(26), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "AksIcon/ykq_jian.png", |
| | | }; |
| | | baseFl.AddChidren(btnJian); |
| | | |
| | | |
| | | btnShang = new Button |
| | | { |
| | | Y = Application.GetRealHeight(32), |
| | | X = Application.GetRealWidth(170), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "AksIcon/ykq_shang.png", |
| | | }; |
| | | baseFl.AddChidren(btnShang); |
| | | |
| | | |
| | | btnXia = new Button |
| | | { |
| | | Y = btnShang.Bottom + Application.GetRealHeight(71), |
| | | X = Application.GetRealWidth(170), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(36), |
| | | UnSelectedImagePath = "AksIcon/ykq_xia.png", |
| | | }; |
| | | baseFl.AddChidren(btnXia); |
| | | |
| | | |
| | | |
| | | okFl = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(32), |
| | | Height = Application.GetRealWidth(143), |
| | | Width = Application.GetRealWidth(143), |
| | | BackgroundImagePath = "AksIcon/ykq_ok.png", |
| | | Gravity = Gravity.CenterHorizontal, |
| | | }; |
| | | leftLayout.AddChidren(leftBtnLine); |
| | | //频道点击控件 |
| | | FrameLayout clickLeftLayout = new FrameLayout |
| | | baseFl.AddChidren(okFl); |
| | | |
| | | |
| | | btnLeft = new Button |
| | | { |
| | | Height = leftLayout.Height, |
| | | Width = leftLayout.Width, |
| | | Width = Application.GetRealWidth(40), |
| | | Height = Application.GetRealHeight(20), |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | leftLayout.AddChidren(clickLeftLayout); |
| | | |
| | | okFl.AddChidren(btnLeft); |
| | | |
| | | |
| | | FrameLayout rightLayout = new FrameLayout |
| | | |
| | | |
| | | btnQian = new Button |
| | | { |
| | | X = leftLayout.Right + Application.GetRealWidth(100), |
| | | Y = leftLayout.Y, |
| | | Height = leftLayout.Height, |
| | | Width = leftLayout.Width, |
| | | }; |
| | | middLayout.AddChidren(rightLayout); |
| | | |
| | | |
| | | Button rightBtnTitle = new Button |
| | | { |
| | | Height = Application.GetRealHeight(22), |
| | | Width = rightLayout.Width, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = MusicColor.TextColor, |
| | | SelectedTextColor = MusicColor.MusicTxet14SelectedColor, |
| | | TextSize = TextSize.Text16, |
| | | TextID = StringId.kongzhi, |
| | | }; |
| | | rightLayout.AddChidren(rightBtnTitle); |
| | | |
| | | Button rightBtnLine = new Button |
| | | { |
| | | Y = rightBtnTitle.Bottom + Application.GetRealHeight(4), |
| | | Height = Application.GetRealHeight(2), |
| | | Width = rightBtnTitle.GetTextWidth(), |
| | | BackgroundColor = MusicColor.TextColor, |
| | | SelectedBackgroundColor = MusicColor.MusicTxet14SelectedColor, |
| | | Width = Application.GetRealWidth(40), |
| | | Height = Application.GetRealHeight(30), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | }; |
| | | rightLayout.AddChidren(rightBtnLine); |
| | | |
| | | //电视点击控件 |
| | | FrameLayout clickRightLayout = new FrameLayout |
| | | okFl.AddChidren(btnQian); |
| | | |
| | | btnRight = new Button |
| | | { |
| | | Height = leftLayout.Height, |
| | | Width = leftLayout.Width, |
| | | Width = Application.GetRealWidth(40), |
| | | Height = Application.GetRealHeight(20), |
| | | Gravity = Gravity.CenterRight, |
| | | }; |
| | | rightLayout.AddChidren(clickRightLayout); |
| | | |
| | | okFl.AddChidren(btnRight); |
| | | |
| | | btnHou = new Button |
| | | { |
| | | Width = Application.GetRealWidth(40), |
| | | Height = Application.GetRealHeight(30), |
| | | Gravity = Gravity.BottomCenter, |
| | | }; |
| | | okFl.AddChidren(btnHou); |
| | | |
| | | |
| | | |
| | | btnOk = new Button |
| | | { |
| | | Width = Application.GetRealWidth(52), |
| | | Height = Application.GetRealWidth(52), |
| | | Gravity = Gravity.Center, |
| | | }; |
| | | okFl.AddChidren(btnOk); |
| | | |
| | | |
| | | |
| | | btnLeft.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; |
| | | |
| | | }; |
| | | btnQian.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; |
| | | |
| | | }; |
| | | btnRight.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; |
| | | |
| | | }; |
| | | btnHou.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; |
| | | |
| | | }; |
| | | btnOk.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | //数字按键容器 |
| | | numberFrame = new CornerFramLayout(343, 368, 17); |
| | | numberFrame.X = Application.GetRealWidth(16); |
| | | numberFrame.Y = middLayout.Bottom + Application.GetRealHeight(16); |
| | | numberFrame.BackgroundColor = MusicColor.WhiteColor; |
| | | numberFrame.SetMargin(16, 0, 16, 0); |
| | | numberFrame.LoadNumberButtonPage(); |
| | | this.AddChidren(numberFrame); |
| | | |
| | | |
| | | //菜单容器 |
| | | CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 292, 17); |
| | | var line9Fl = new FrameLayout |
| | | { |
| | | Y = baseFl.Bottom, |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line9Fl); |
| | | |
| | | caidanFL = new CustomFrameLayout(); |
| | | line9Fl.AddChidren(caidanFL); |
| | | caidanFL.X = Application.GetRealWidth(offset); |
| | | caidanFL.AddImageView(); |
| | | caidanFL.AddTextButtonView(); |
| | | caidanFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_caidan.png"; |
| | | caidanFL.GetTextButton().Text = "菜单"; |
| | | caidanFL.AddClickView(); |
| | | |
| | | |
| | | fanhuiFL = new CustomFrameLayout(); |
| | | line9Fl.AddChidren(fanhuiFL); |
| | | fanhuiFL.X = caidanFL.Right + Application.GetRealWidth(110); |
| | | fanhuiFL.AddImageView(); |
| | | fanhuiFL.AddTextButtonView(); |
| | | fanhuiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_fanhui.png"; |
| | | fanhuiFL.GetTextButton().Text = "返回"; |
| | | fanhuiFL.AddClickView(); |
| | | |
| | | |
| | | |
| | | var line10Fl = new FrameLayout |
| | | { |
| | | Y = line9Fl.Bottom + Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line10Fl); |
| | | |
| | | shanyibuFL = new CustomFrameLayout(); |
| | | line10Fl.AddChidren(shanyibuFL); |
| | | shanyibuFL.X = Application.GetRealWidth(offset); |
| | | shanyibuFL.AddImageView(); |
| | | shanyibuFL.AddTextButtonView(); |
| | | shanyibuFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_shangyibu.png"; |
| | | shanyibuFL.GetTextButton().Text = "上一部"; |
| | | shanyibuFL.AddClickView(); |
| | | |
| | | |
| | | bofangFL = new CustomFrameLayout(); |
| | | line10Fl.AddChidren(bofangFL); |
| | | bofangFL.X = shanyibuFL.Right + Application.GetRealWidth(septal); |
| | | bofangFL.AddImageView(); |
| | | bofangFL.AddTextButtonView(); |
| | | bofangFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_bofang.png"; |
| | | bofangFL.GetTextButton().Text = "播放"; |
| | | bofangFL.AddClickView(); |
| | | |
| | | |
| | | xiayibuFL = new CustomFrameLayout(); |
| | | line10Fl.AddChidren(xiayibuFL); |
| | | xiayibuFL.X = bofangFL.Right + Application.GetRealWidth(septal); |
| | | xiayibuFL.AddImageView(); |
| | | xiayibuFL.AddTextButtonView(); |
| | | xiayibuFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_xiayibu.png"; |
| | | xiayibuFL.GetTextButton().Text = "下一部"; |
| | | xiayibuFL.AddClickView(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var line11Fl = new FrameLayout |
| | | { |
| | | Y = line10Fl.Bottom + Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line11Fl); |
| | | |
| | | kuaituiFL = new CustomFrameLayout(); |
| | | line11Fl.AddChidren(kuaituiFL); |
| | | kuaituiFL.X = Application.GetRealWidth(offset); |
| | | kuaituiFL.AddImageView(); |
| | | kuaituiFL.AddTextButtonView(); |
| | | kuaituiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_kuaitui.png"; |
| | | kuaituiFL.GetTextButton().Text = "快退"; |
| | | kuaituiFL.AddClickView(); |
| | | |
| | | |
| | | |
| | | |
| | | zantingFL = new CustomFrameLayout(); |
| | | line11Fl.AddChidren(zantingFL); |
| | | zantingFL.X = kuaituiFL.Right + Application.GetRealWidth(septal); |
| | | zantingFL.AddImageView(); |
| | | zantingFL.AddTextButtonView(); |
| | | zantingFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_zanting.png"; |
| | | zantingFL.GetTextButton().Text = "暂停"; |
| | | zantingFL.AddClickView(); |
| | | |
| | | |
| | | |
| | | |
| | | kusinjinFL = new CustomFrameLayout(); |
| | | line11Fl.AddChidren(kusinjinFL); |
| | | kusinjinFL.X = zantingFL.Right + Application.GetRealWidth(septal); |
| | | kusinjinFL.AddImageView(); |
| | | kusinjinFL.AddTextButtonView(); |
| | | kusinjinFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_kuaijin.png"; |
| | | kusinjinFL.GetTextButton().Text = "快进"; |
| | | kusinjinFL.AddClickView(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var line12Fl = new FrameLayout |
| | | { |
| | | Y = line11Fl.Bottom + Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(h), |
| | | }; |
| | | layout.AddChidren(line12Fl); |
| | | |
| | | dengguanFL = new CustomFrameLayout(); |
| | | line12Fl.AddChidren(dengguanFL); |
| | | dengguanFL.X = Application.GetRealWidth(offset); |
| | | dengguanFL.AddImageView(); |
| | | dengguanFL.AddTextButtonView(); |
| | | dengguanFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_dengguan.png"; |
| | | dengguanFL.GetTextButton().Text = "灯关"; |
| | | dengguanFL.AddClickView(); |
| | | |
| | | |
| | | tingzhiFL = new CustomFrameLayout(); |
| | | line12Fl.AddChidren(tingzhiFL); |
| | | tingzhiFL.X = dengguanFL.Right + Application.GetRealWidth(septal); |
| | | tingzhiFL.AddImageView(); |
| | | tingzhiFL.AddTextButtonView(); |
| | | tingzhiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_tingzhi.png"; |
| | | tingzhiFL.GetTextButton().Text = "停止"; |
| | | tingzhiFL.AddClickView(); |
| | | |
| | | |
| | | |
| | | dankongdengFL = new CustomFrameLayout(); |
| | | line12Fl.AddChidren(dankongdengFL); |
| | | dankongdengFL.X = tingzhiFL.Right + Application.GetRealWidth(septal); |
| | | dankongdengFL.AddImageView(); |
| | | dankongdengFL.AddTextButtonView(); |
| | | dankongdengFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_dankongdeng.png"; |
| | | dankongdengFL.GetTextButton().Text = "单控灯"; |
| | | dankongdengFL.AddClickView(); |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | //底部容器 |
| | | CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 72, 17); |
| | | cornerBottomFram.X = Application.GetRealWidth(16); |
| | | cornerBottomFram.Y = middLayout.Bottom + Application.GetRealHeight(16); |
| | | cornerBottomFram.Y = layout.Bottom + Application.GetRealHeight(16); |
| | | cornerBottomFram.BackgroundColor = MusicColor.WhiteColor; |
| | | this.AddChidren(cornerBottomFram); |
| | | |
| | | menuFram = new MenuFramLayout(); |
| | | menuFram.Y = Application.GetRealHeight(24); |
| | | menuFram.AddView(cornerBottomFram); |
| | | |
| | | typeMultiFramLayout = new TypeMultiFramLayout(); |
| | | typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32); |
| | | typeMultiFramLayout.multiFramLayout.Y = Application.GetRealHeight(16); |
| | | typeMultiFramLayout.AddView(cornerBottomFram); |
| | | typeMultiFramLayout.btnBottonRightName.TextID = StringId.dianshi; |
| | | |
| | | //初始值 |
| | | leftBtnTitle.IsSelected = true; |
| | | leftBtnLine.IsSelected = true; |
| | | leftBtnLine.Visible = true; |
| | | rightBtnTitle.IsSelected = false; |
| | | rightBtnLine.IsSelected = false; |
| | | rightBtnLine.Visible = false; |
| | | numberFrame.Visible = true; |
| | | cornerBottomFram.Visible = false; |
| | | |
| | | //频道点击事件 |
| | | clickLeftLayout.MouseDownEventHandler += (sen, e) => |
| | | { |
| | | leftBtnTitle.IsSelected = true; |
| | | leftBtnLine.IsSelected = true; |
| | | leftBtnLine.Visible = true; |
| | | rightBtnTitle.IsSelected = false; |
| | | rightBtnLine.IsSelected = false; |
| | | rightBtnLine.Visible = false; |
| | | numberFrame.Visible = true; |
| | | cornerBottomFram.Visible = false; |
| | | this.AdjustRealHeight(16); |
| | | |
| | | }; |
| | | //控制点击事件 |
| | | clickRightLayout.MouseDownEventHandler += (sen, e) => |
| | | { |
| | | leftBtnTitle.IsSelected = false; |
| | | leftBtnLine.IsSelected = false; |
| | | leftBtnLine.Visible = false; |
| | | rightBtnTitle.IsSelected = true; |
| | | rightBtnLine.IsSelected = true; |
| | | rightBtnLine.Visible = true; |
| | | numberFrame.Visible = false; |
| | | cornerBottomFram.Visible = true; |
| | | this.AdjustRealHeight(-60); |
| | | |
| | | }; |
| | | typeMultiFramLayout.btnBottonRightName.TextID = StringId.xuniyaokongqi; |
| | | |
| | | this.AdjustRealHeight(16); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 自己弄一个FrameLayout |
| | | /// </summary> |
| | | class CustomFrameLayout : FrameLayout |
| | | { |
| | | public const int widthFrameLayout = 36; |
| | | public const int heightFrameLayout = 49; |
| | | public CustomFrameLayout(int width = widthFrameLayout, int height = heightFrameLayout) |
| | | { |
| | | this.Width = Application.GetRealWidth(width); |
| | | this.Height = Application.GetRealHeight(height); |
| | | } |
| | | Button btnImage = new Button |
| | | { |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | Gravity = Gravity.TopCenter, |
| | | |
| | | }; |
| | | Button btnText = new Button |
| | | { |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealHeight(16), |
| | | TextSize = TextSize.Text12, |
| | | TextColor = MusicColor.WhiteColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | }; |
| | | Button btnNumber = new Button |
| | | { |
| | | Width = Application.GetRealWidth(widthFrameLayout), |
| | | Height = Application.GetRealHeight(heightFrameLayout), |
| | | Gravity = Gravity.Center, |
| | | TextSize = 20, |
| | | TextColor = MusicColor.WhiteColor, |
| | | IsBold = true, |
| | | |
| | | }; |
| | | Button btn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(12), |
| | | Height = Application.GetRealWidth(12), |
| | | Gravity = Gravity.Center, |
| | | Radius = (uint)Application.GetRealHeight(6), |
| | | }; |
| | | |
| | | public FrameLayout clickFl = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(widthFrameLayout), |
| | | Height = Application.GetRealHeight(heightFrameLayout), |
| | | }; |
| | | |
| | | |
| | | public void AddImageView() |
| | | { |
| | | this.AddChidren(btnImage); |
| | | |
| | | } |
| | | public void AddTextButtonView() |
| | | { |
| | | btnText.Y = btnImage.Bottom; |
| | | this.AddChidren(btnText); |
| | | } |
| | | public void AddColorButtonView() |
| | | { |
| | | this.AddChidren(btn); |
| | | } |
| | | |
| | | public void AddNumberButtonView() |
| | | { |
| | | this.AddChidren(btnNumber); |
| | | } |
| | | public Button GetImageButton() |
| | | { |
| | | return this.btnImage; |
| | | } |
| | | public Button GetTextButton() |
| | | { |
| | | return this.btnText; |
| | | } |
| | | |
| | | public Button GetColorButto() |
| | | { |
| | | return this.btn; |
| | | } |
| | | public Button GetNumberButto() |
| | | { |
| | | return this.btnNumber; |
| | | } |
| | | |
| | | public void AddClickView() |
| | | { |
| | | this.AddChidren(clickFl); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 事件监听方法 |
| | | /// 是定要添加AddClickView(),点击事件才生效; |
| | | /// </summary> |
| | | /// <param name="action">回调(父类对象)</param> |
| | | public void SetClickListener(Action action) |
| | | { |
| | | clickFl.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | //this.BackgroundColor = 0xff484378; |
| | | action?.Invoke(); |
| | | }; |
| | | |
| | | clickFl.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //this.BackgroundColor = 0xff484378; |
| | | }; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |