From 47d1c43905afa377e411dbfa8bec325de3cd6579 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期一, 07 八月 2023 15:35:30 +0800 Subject: [PATCH] 2023年08月07日15:35:10 --- HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs | 1155 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 977 insertions(+), 178 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs index 808dbea..36d44a3 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs @@ -16,21 +16,55 @@ } 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() @@ -53,42 +87,222 @@ /// </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) => { @@ -102,7 +316,7 @@ typeMultiFramLayout.SetRightFlClickListener((f) => { Console.WriteLine("4"); - action?.Invoke(IntType.TV); + action?.Invoke(IntType.Control); }); } @@ -123,190 +337,775 @@ }; 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> + /// 鑷繁寮勪竴涓狥rameLayout + /// </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> + /// 浜嬩欢鐩戝惉鏂规硶 + /// 鏄畾瑕佹坊鍔燗ddClickView(),鐐瑰嚮浜嬩欢鎵嶇敓鏁�; + /// </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; + }; + + + } + + } } -- Gitblit v1.8.0