From 5ec581e5d37b108fc9d59e89afd8e94e21b32080 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期二, 17 十月 2023 17:33:36 +0800 Subject: [PATCH] 2023年10月17日17:33:33 --- HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs | 334 +++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 260 insertions(+), 74 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs index c9f223b..5dcca72 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs @@ -9,7 +9,7 @@ namespace HDL_ON.UI.UI2.FuntionControlView.Aks { /// <summary> - ///閬ユ帶鍣ㄧ晫闈� + ///铏氭嫙閬ユ帶鍣ㄧ晫闈� /// </summary> public class YkqPage : BaseFramLayout { @@ -36,6 +36,7 @@ /// 鍒囨崲璁惧瀹瑰櫒 /// </summary> TypeMultiFramLayout typeMultiFramLayout; + TypeSingleFramLayout tyySingleFramLayout; Button switchBtn; CustomFrameLayout xinxiFL; @@ -105,8 +106,9 @@ private void EventListener() { //寮�鍏� - switchBtn.MouseDownEventHandler += (senser, e) => + switchBtn.MouseUpEventHandler += (senser, e) => { + switchBtn.IsSelected = false; KeyControl("on_off", "寮�/鍏�"); }; //淇℃伅 @@ -152,7 +154,7 @@ //1 number1FL.SetClickListener(() => { - KeyControl("number_1", "1"); + KeyControl("number_1", "1"); }); //2 number2FL.SetClickListener(() => @@ -235,16 +237,16 @@ }); //宸� - btnLeft.MouseDownEventHandler += (sender, e) => + btnLeft.MouseUpEventHandler += (sender, e) => { - okFl.BackgroundImagePath = "AksIcon/ykq_left_selected.png"; + okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; KeyControl("key_left", "宸�"); }; //涓� - btnShang.MouseDownEventHandler += (sender, e) => + btnShang.MouseUpEventHandler += (sender, e) => { - okFl.BackgroundImagePath = "AksIcon/ykq_qian_selected.png"; + okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; KeyControl("key_up", "涓�"); }; @@ -252,37 +254,48 @@ //鍙� btnRight.MouseDownEventHandler += (sender, e) => { - okFl.BackgroundImagePath = "AksIcon/ykq_right_selected.png"; + + okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; KeyControl("key_right", "鍙�"); }; //涓� - btnXia.MouseDownEventHandler += (sender, e) => + btnXia.MouseUpEventHandler += (sender, e) => { - okFl.BackgroundImagePath = "AksIcon/ykq_hou_selected.png"; + okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; + KeyControl("key_down", "涓�"); }; //OK btnOk.MouseDownEventHandler += (sender, e) => { - okFl.BackgroundImagePath = "AksIcon/ykq_ok_selected.png"; + okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; + KeyControl("key_ok", "纭畾"); }; //闊抽噺+ - btnYingliangjia.MouseDownEventHandler += (sen, e) => { + btnYingliangjia.MouseUpEventHandler += (sen, e) => + { + btnYingliangjia.IsSelected = false; KeyControl("volume_up", "闊抽噺+"); }; //闊抽噺- - btnYingliangjian.MouseDownEventHandler += (sen, e) => { + btnYingliangjian.MouseUpEventHandler += (sen, e) => + { + btnYingliangjian.IsSelected = false; KeyControl("volume_down", "闊抽噺-"); }; //棰戦亾+ - btnPindaojia.MouseDownEventHandler += (sen, e) => { + btnPindaojia.MouseUpEventHandler += (sen, e) => + { + btnPindaojia.IsSelected = false; KeyControl("ch_up", "棰戦亾+"); }; //棰戦亾- - btnPindaojian.MouseDownEventHandler += (sen, e) => { + btnPindaojian.MouseUpEventHandler += (sen, e) => + { + btnPindaojian.IsSelected = false; KeyControl("ch_down", "棰戦亾-"); }; @@ -349,25 +362,35 @@ }); - - //鏃跺簭鍣� - 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) => + }); + //璁惧鍒囨崲 + typeMultiFramLayout.SetRightFlClickListener((f) => + { + action?.Invoke(IntType.Control); + }); + } + if (tyySingleFramLayout != null) { - Console.WriteLine("4"); - action?.Invoke(IntType.Control); - }); + tyySingleFramLayout.SetClickListener((f) => + { + action?.Invoke(IntType.Control); + }); + } } - + /// <summary> + /// 鍒濆鍖栫晫闈� + /// </summary> private void InitUI() { this.BackgroundColor = MusicColor.ViewColor; @@ -380,7 +403,8 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = MusicColor.TextColor, TextSize = TextSize.Text16, - TextID = StringId.xuniyaokongqi, + Text = this.remoteControl.name, + IsBold = true, }; this.AddChidren(btnTitle); @@ -389,7 +413,7 @@ { Y = btnTitle.Bottom + Application.GetRealHeight(16), Width = Application.GetRealWidth(240), - Height = Application.GetRealHeight(1095),//閬ユ帶鍣ㄥ浐瀹氶珮搴� + Height = Application.GetRealHeight(1095 - 122 - 60),//閬ユ帶鍣ㄥ浐瀹氶珮搴� Radius = (uint)Application.GetRealHeight(17), BackgroundColor = 0xff798394, Gravity = Gravity.CenterHorizontal, @@ -402,7 +426,7 @@ Y = btnTitle.Bottom + Application.GetRealHeight(16), //X = Application.GetRealWidth(71), Width = Application.GetRealWidth(232), - Height = Application.GetRealHeight(1095),//閬ユ帶鍣ㄥ浐瀹氶珮搴� + Height = Application.GetRealHeight(1095 - 122 - 60),//閬ユ帶鍣ㄥ浐瀹氶珮搴� Radius = (uint)Application.GetRealHeight(17), BackgroundColor = 0xff19181E, Gravity = Gravity.CenterHorizontal, @@ -418,21 +442,30 @@ Width = Application.GetRealWidth(48), Gravity = Gravity.CenterHorizontal, BackgroundColor = 0xff201F25, - Radius = (uint)Application.GetRealHeight(24), + Radius = (uint)Application.GetRealWidth(24), }; layout.AddChidren(switchFl); switchBtn = new Button { - Height = Application.GetRealWidth(32), - Width = Application.GetRealWidth(32), + Height = Application.GetRealWidth(48), + Width = Application.GetRealWidth(48), Gravity = Gravity.Center, UnSelectedImagePath = "AksIcon/ykq_kai.png", + SelectedImagePath = "AksIcon/ykq_kaiguang_selected.png" }; switchFl.AddChidren(switchBtn); + switchBtn.MouseDownEventHandler += (senser, e) => + { + switchBtn.IsSelected = true; + }; + switchBtn.MouseUpOutsideEventHandler += (senser, e) => + { + switchBtn.IsSelected = false; + }; - int h = 49; + int h = 49 - 6; int offset = 28;//x杞村亸绉婚噺 int septal = 36;//闂撮殧 #region @@ -450,6 +483,7 @@ xinxiFL.AddImageView(); xinxiFL.AddTextButtonView(); xinxiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_xinxi.png"; + xinxiFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_xinxi_selected.png"; xinxiFL.GetTextButton().Text = "淇℃伅"; xinxiFL.AddClickView(); @@ -460,13 +494,14 @@ shoucangFL.AddImageView(); shoucangFL.AddTextButtonView(); shoucangFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_shoucang.png"; + shoucangFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_shoucang_selected.png"; shoucangFL.GetTextButton().Text = "鏀惰棌"; shoucangFL.AddClickView(); var line2Fl = new FrameLayout { - Y = line1Fl.Bottom + Application.GetRealHeight(16), + Y = line1Fl.Bottom + Application.GetRealHeight(8), Height = Application.GetRealHeight(h), }; layout.AddChidren(line2Fl); @@ -477,6 +512,7 @@ dianyingFL.AddImageView(); dianyingFL.AddTextButtonView(); dianyingFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_dianying.png"; + dianyingFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_dianying_selected.png"; dianyingFL.GetTextButton().Text = "鐢靛奖"; dianyingFL.AddClickView(); @@ -487,6 +523,7 @@ yuleFL.AddImageView(); yuleFL.AddTextButtonView(); yuleFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_yule.png"; + yuleFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_yule_selected.png"; yuleFL.GetTextButton().Text = "濞变箰"; yuleFL.AddClickView(); @@ -496,6 +533,7 @@ dianshiFL.AddImageView(); dianshiFL.AddTextButtonView(); dianshiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_dianshi.png"; + dianshiFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_dianshi_selected.png"; dianshiFL.GetTextButton().Text = "鐢佃"; dianshiFL.AddClickView(); @@ -503,7 +541,7 @@ var line3Fl = new FrameLayout { - Y = line2Fl.Bottom + Application.GetRealHeight(16), + Y = line2Fl.Bottom + Application.GetRealHeight(8), Height = Application.GetRealHeight(h), }; layout.AddChidren(line3Fl); @@ -536,7 +574,7 @@ var line4Fl = new FrameLayout { - Y = line3Fl.Bottom + Application.GetRealHeight(16), + Y = line3Fl.Bottom + Application.GetRealHeight(8), Height = Application.GetRealHeight(h), }; layout.AddChidren(line4Fl); @@ -648,6 +686,7 @@ yinguiFL.AddImageView(); yinguiFL.AddTextButtonView(); yinguiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_yingui.png"; + yinguiFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_yingui_selected.png"; yinguiFL.GetTextButton().Text = "闊宠建"; yinguiFL.AddClickView(); @@ -666,6 +705,7 @@ zimuFL.AddImageView(); zimuFL.AddTextButtonView(); zimuFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_zimu.png"; + zimuFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_zimu_selected.png"; zimuFL.GetTextButton().Text = "瀛楀箷"; zimuFL.AddClickView(); zimuFL.AddClickView(); @@ -676,7 +716,7 @@ var line8Fl = new FrameLayout { - Y = line7Fl.Bottom + Application.GetRealHeight(32), + Y = line7Fl.Bottom + Application.GetRealHeight(16), Height = Application.GetRealHeight(h), }; layout.AddChidren(line8Fl); @@ -687,6 +727,7 @@ jingyinFL.AddImageView(); jingyinFL.AddTextButtonView(); jingyinFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_jingyin.png"; + jingyinFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_jingyin_selected.png"; jingyinFL.GetTextButton().Text = "闈欓煶"; jingyinFL.AddClickView(); @@ -696,7 +737,8 @@ toupingFL.X = jingyinFL.Right + Application.GetRealWidth(septal); toupingFL.AddImageView(); toupingFL.AddTextButtonView(); - toupingFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_youpin.png"; + toupingFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_toupin.png"; + toupingFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_touping_selected.png"; toupingFL.GetTextButton().Text = "鎶曞睆"; toupingFL.AddClickView(); @@ -707,6 +749,7 @@ zhuyeFL.AddImageView(); zhuyeFL.AddTextButtonView(); zhuyeFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_zhuye.png"; + zhuyeFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_zhuye_selected.png"; zhuyeFL.GetTextButton().Text = "涓婚〉"; zhuyeFL.AddClickView(); @@ -718,20 +761,30 @@ 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), - UnSelectedImagePath = "AksIcon/ykq_jia.png", + UnSelectedImagePath = "AksIcon/ykq_yingliangjia.png", + SelectedImagePath = "AksIcon/ykq_yingliangjia_selected.png", }; baseFl.AddChidren(btnYingliangjia); + btnYingliangjia.MouseDownEventHandler += (sen, e) => + { + btnYingliangjia.IsSelected = true; + }; + btnYingliangjia.MouseUpOutsideEventHandler += (sen, e) => + { + + btnYingliangjia.IsSelected = false; + }; btnYingliangjian = new Button @@ -740,20 +793,43 @@ X = Application.GetRealWidth(26), Width = Application.GetRealWidth(36), Height = Application.GetRealWidth(36), - UnSelectedImagePath = "AksIcon/ykq_jian.png", + UnSelectedImagePath = "AksIcon/ykq_yingliangjian.png", + SelectedImagePath = "AksIcon/ykq_yingliangjian_selected.png", }; baseFl.AddChidren(btnYingliangjian); - - - btnPindaojia = new Button + btnYingliangjian.MouseDownEventHandler += (sen, e) => { - Y = Application.GetRealHeight(32), + + btnYingliangjian.IsSelected = true; + }; + btnYingliangjian.MouseUpOutsideEventHandler += (sen, e) => + { + + btnYingliangjian.IsSelected = false; + }; + + + + btnPindaojia = new Button + { + Y = Application.GetRealHeight(16), X = Application.GetRealWidth(170), Width = Application.GetRealWidth(36), Height = Application.GetRealWidth(36), - UnSelectedImagePath = "AksIcon/ykq_shang.png", + UnSelectedImagePath = "AksIcon/ykq_pindaojia.png", + SelectedImagePath = "AksIcon/ykq_pindaojia_selected.png", }; baseFl.AddChidren(btnPindaojia); + btnPindaojia.MouseDownEventHandler += (sen, e) => + { + + btnPindaojia.IsSelected = true; + }; + btnPindaojia.MouseUpOutsideEventHandler += (sen, e) => + { + + btnPindaojia.IsSelected = false; + }; btnPindaojian = new Button @@ -762,15 +838,27 @@ X = Application.GetRealWidth(170), Width = Application.GetRealWidth(36), Height = Application.GetRealWidth(36), - UnSelectedImagePath = "AksIcon/ykq_xia.png", + UnSelectedImagePath = "AksIcon/ykq_pindaojian.png", + SelectedImagePath = "AksIcon/ykq_pindaojian_selected.png", }; baseFl.AddChidren(btnPindaojian); + btnPindaojian.MouseDownEventHandler += (sen, e) => + { + + btnPindaojian.IsSelected = true; + }; + + btnPindaojian.MouseUpOutsideEventHandler += (sen, e) => + { + + btnPindaojian.IsSelected = false; + }; okFl = new FrameLayout { - Y = Application.GetRealHeight(32), + Y = Application.GetRealHeight(16), Height = Application.GetRealWidth(143), Width = Application.GetRealWidth(143), BackgroundImagePath = "AksIcon/ykq_ok.png", @@ -829,27 +917,57 @@ - btnLeft.MouseUpEventHandler += (sender, e) => + + + btnLeft.MouseUpOutsideEventHandler += (sender, e) => { okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; }; - btnShang.MouseUpEventHandler += (sender, e) => + btnLeft.MouseDownEventHandler += (sender, e) => + { + okFl.BackgroundImagePath = "AksIcon/ykq_left_selected.png"; + + }; + btnShang.MouseDownEventHandler += (sender, e) => + { + okFl.BackgroundImagePath = "AksIcon/ykq_shang_selected.png"; + + + }; + btnShang.MouseUpOutsideEventHandler += (sender, e) => { okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; }; - btnRight.MouseUpEventHandler += (sender, e) => + btnRight.MouseDownEventHandler += (sender, e) => + { + okFl.BackgroundImagePath = "AksIcon/ykq_right_selected.png"; + + }; + btnRight.MouseUpOutsideEventHandler += (sender, e) => { okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; }; - btnXia.MouseUpEventHandler += (sender, e) => + + btnXia.MouseDownEventHandler += (sender, e) => + { + okFl.BackgroundImagePath = "AksIcon/ykq_xia_selected.png"; + + }; + + btnXia.MouseUpOutsideEventHandler += (sender, e) => { okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; }; - btnOk.MouseUpEventHandler += (sender, e) => + btnOk.MouseDownEventHandler += (sender, e) => + { + okFl.BackgroundImagePath = "AksIcon/ykq_ok_selected.png"; + + }; + btnOk.MouseUpOutsideEventHandler += (sender, e) => { okFl.BackgroundImagePath = "AksIcon/ykq_ok.png"; @@ -876,6 +994,7 @@ caidanFL.AddImageView(); caidanFL.AddTextButtonView(); caidanFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_caidan.png"; + caidanFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_caidan_selected.png"; caidanFL.GetTextButton().Text = "鑿滃崟"; caidanFL.AddClickView(); @@ -886,6 +1005,7 @@ fanhuiFL.AddImageView(); fanhuiFL.AddTextButtonView(); fanhuiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_fanhui.png"; + fanhuiFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_fanhui_selected.png"; fanhuiFL.GetTextButton().Text = "杩斿洖"; fanhuiFL.AddClickView(); @@ -893,7 +1013,7 @@ var line10Fl = new FrameLayout { - Y = line9Fl.Bottom + Application.GetRealHeight(16), + Y = line9Fl.Bottom + Application.GetRealHeight(8), Height = Application.GetRealHeight(h), }; layout.AddChidren(line10Fl); @@ -904,6 +1024,7 @@ shanyibuFL.AddImageView(); shanyibuFL.AddTextButtonView(); shanyibuFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_shangyibu.png"; + shanyibuFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_shangyibu_selected.png"; shanyibuFL.GetTextButton().Text = "涓婁竴閮�"; shanyibuFL.AddClickView(); @@ -913,7 +1034,8 @@ bofangFL.X = shanyibuFL.Right + Application.GetRealWidth(septal); bofangFL.AddImageView(); bofangFL.AddTextButtonView(); - bofangFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_bofang.png"; + bofangFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_bofan.png"; + bofangFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_bofan_selected.png"; bofangFL.GetTextButton().Text = "鎾斁"; bofangFL.AddClickView(); @@ -924,6 +1046,7 @@ xiayibuFL.AddImageView(); xiayibuFL.AddTextButtonView(); xiayibuFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_xiayibu.png"; + xiayibuFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_xiayibu_selected.png"; xiayibuFL.GetTextButton().Text = "涓嬩竴閮�"; xiayibuFL.AddClickView(); @@ -934,7 +1057,7 @@ var line11Fl = new FrameLayout { - Y = line10Fl.Bottom + Application.GetRealHeight(16), + Y = line10Fl.Bottom + Application.GetRealHeight(8), Height = Application.GetRealHeight(h), }; layout.AddChidren(line11Fl); @@ -945,6 +1068,7 @@ kuaituiFL.AddImageView(); kuaituiFL.AddTextButtonView(); kuaituiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_kuaitui.png"; + kuaituiFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_kuaijin_selected.png"; kuaituiFL.GetTextButton().Text = "蹇��"; kuaituiFL.AddClickView(); @@ -957,6 +1081,7 @@ zantingFL.AddImageView(); zantingFL.AddTextButtonView(); zantingFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_zanting.png"; + zantingFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_zanting_selected.png"; zantingFL.GetTextButton().Text = "鏆傚仠"; zantingFL.AddClickView(); @@ -969,6 +1094,7 @@ kusinjinFL.AddImageView(); kusinjinFL.AddTextButtonView(); kusinjinFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_kuaijin.png"; + kusinjinFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_kuaitui_selected.png"; kusinjinFL.GetTextButton().Text = "蹇繘"; kusinjinFL.AddClickView(); @@ -979,7 +1105,7 @@ var line12Fl = new FrameLayout { - Y = line11Fl.Bottom + Application.GetRealHeight(16), + Y = line11Fl.Bottom + Application.GetRealHeight(8), Height = Application.GetRealHeight(h), }; layout.AddChidren(line12Fl); @@ -990,7 +1116,8 @@ dengguanFL.AddImageView(); dengguanFL.AddTextButtonView(); dengguanFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_dengguan.png"; - dengguanFL.GetTextButton().Text = "鐏叧"; + dengguanFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_dengguang_selected.png"; + dengguanFL.GetTextButton().Text = "鐏厜1"; dengguanFL.AddClickView(); @@ -1000,6 +1127,7 @@ tingzhiFL.AddImageView(); tingzhiFL.AddTextButtonView(); tingzhiFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_tingzhi.png"; + tingzhiFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_tingzhi_selected.png"; tingzhiFL.GetTextButton().Text = "鍋滄"; tingzhiFL.AddClickView(); @@ -1011,7 +1139,8 @@ dankongdengFL.AddImageView(); dankongdengFL.AddTextButtonView(); dankongdengFL.GetImageButton().UnSelectedImagePath = "AksIcon/ykq_dankongdeng.png"; - dankongdengFL.GetTextButton().Text = "鍗曟帶鐏�"; + dankongdengFL.GetImageButton().SelectedImagePath = "AksIcon/ykq_dankongdeng_selected.png"; + dankongdengFL.GetTextButton().Text = "鐏厜2"; dankongdengFL.AddClickView(); #endregion @@ -1026,10 +1155,42 @@ cornerBottomFram.BackgroundColor = MusicColor.WhiteColor; this.AddChidren(cornerBottomFram); - typeMultiFramLayout = new TypeMultiFramLayout(); - typeMultiFramLayout.multiFramLayout.Y = Application.GetRealHeight(16); - typeMultiFramLayout.AddView(cornerBottomFram); - typeMultiFramLayout.btnBottonRightName.TextID = StringId.xuniyaokongqi; + + 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.btnRightName.Text = this.remoteControl.name; + } this.AdjustRealHeight(16); } @@ -1039,14 +1200,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 @@ -1068,7 +1230,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); @@ -1087,8 +1249,10 @@ Height = Application.GetRealHeight(16), TextSize = TextSize.Text12, TextColor = MusicColor.WhiteColor, + SelectedTextColor = MusicColor.MusicTxet14SelectedColor, TextAlignment = TextAlignment.Center, Gravity = Gravity.CenterHorizontal, + Padding = new Padding(0, 0, 0, 0), }; Button btnNumber = new Button { @@ -1097,6 +1261,7 @@ Gravity = Gravity.Center, TextSize = 20, TextColor = MusicColor.WhiteColor, + SelectedTextColor = MusicColor.MusicTxet14SelectedColor, IsBold = true, }; @@ -1105,7 +1270,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 = 0xFFF2F3F7, }; public FrameLayout clickFl = new FrameLayout @@ -1167,13 +1334,32 @@ { clickFl.MouseDownEventHandler += (sender, e) => { - this.BackgroundColor = 0xff798394; - action?.Invoke(); + //this.BackgroundColor = 0xff798394; + btnImage.IsSelected = true; + btnText.IsSelected = true; + btnNumber.IsSelected = true; + btn.IsSelected = true; + + }; clickFl.MouseUpEventHandler += (sender, e) => { - this.BackgroundColor = 0x00000000; + //this.BackgroundColor = 0x00000000; + btnImage.IsSelected = false; + btnText.IsSelected = false; + btnNumber.IsSelected = false; + btn.IsSelected = false; + action?.Invoke(); + }; + + clickFl.MouseUpOutsideEventHandler += (sender, e) => + { + //this.BackgroundColor = 0x00000000; + btnImage.IsSelected = false; + btnText.IsSelected = false; + btnNumber.IsSelected = false; + btn.IsSelected = false; }; } -- Gitblit v1.8.0