using System; using Shared; namespace HDL_ON.UI.Music.View { public class MusicSourceView { /// /// 父控件View /// public FrameLayout fLayout = new FrameLayout { BackgroundColor = MusicColor.WhiteColor, Height = Application.GetRealHeight(50), Width = Application.GetRealWidth(375), }; /// ///图标 /// public Button iconBtn = new Button { X = Application.GetRealWidth(16), Y = Application.GetRealHeight(13), Width = Application.GetMinRealAverage(24), Height = Application.GetMinRealAverage(24), }; /// ///文本 /// public Button textBtn = new Button { X = Application.GetRealWidth(16), Y = Application.GetRealHeight(14), Width = Application.GetRealWidth(140), Height = Application.GetRealHeight(22), TextColor = MusicColor.TextColor, TextSize = TextSize.Text16, TextAlignment = TextAlignment.CenterLeft, }; /// ///写入文本 /// public Button inputTextBtn = new Button { X = Application.GetRealWidth(375-140-52), Y = Application.GetRealHeight(15), Width = Application.GetRealWidth(140), Height = Application.GetRealHeight(20), TextAlignment=TextAlignment.CenterRight, TextColor = MusicColor.MusicNoTxetColor, TextSize = TextSize.Text14, }; /// ///下一级菜单图标 /// public Button nextLevelBtn = new Button { X = Application.GetRealWidth(339), Y = Application.GetRealHeight(17), Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), UnSelectedImagePath = "MusicIcon/sourceNetx.png", }; /// ///线 /// public Button lineBtn = new Button { X = Application.GetRealWidth(16), Width = Application.GetRealWidth(375 - 16 - 16), BackgroundColor = MusicColor.LineColor, }; /// /// 点击事件 /// public Button clickBtn = new Button { Height = Application.GetRealHeight(50), Width = Application.GetRealWidth(375), }; /// /// 音乐源控件的方法 /// /// /// public void FrameLayoutView(FrameLayout frameLayout,bool IsView=true) { if (IsView) { fLayout.AddChidren(iconBtn); textBtn.X = Application.GetRealWidth(56); nextLevelBtn.X = Application.GetRealWidth(339); nextLevelBtn.Y = Application.GetRealHeight(17); nextLevelBtn.Width = Application.GetMinRealAverage(16); nextLevelBtn.Height = Application.GetMinRealAverage(16); } else { textBtn.X = Application.GetRealWidth(16); fLayout.AddChidren(inputTextBtn); nextLevelBtn.X = Application.GetRealWidth(333); nextLevelBtn.Y = Application.GetRealHeight(11); nextLevelBtn.Width = Application.GetMinRealAverage(28); nextLevelBtn.Height = Application.GetMinRealAverage(28); nextLevelBtn.UnSelectedImagePath = "MusicIcon/edit.png"; } fLayout.AddChidren(textBtn); fLayout.AddChidren(nextLevelBtn); lineBtn.Y = fLayout.Height - 1; lineBtn.Height= H_W.Line; fLayout.AddChidren(lineBtn); fLayout.AddChidren(clickBtn); frameLayout.AddChidren(fLayout); } } }