using System; using System.Collections.Generic; using System.Text; namespace Shared.Phone.UserCenter { /// /// 场景图片的控件 /// public class ScenePictrueControl : FrameRowControl { #region ■ 初始化_____________________________ /// /// 场景图片的控件(拥有桌布) /// public ScenePictrueControl() { this.UseClickStatu = false; this.Height = Application.GetRealHeight(420); } /// /// 初始化控件 /// /// 场景控件 public void InitControl(Common.SceneUI sceneUI) { //场景图片 var btnPic = new ImageView(); btnPic.X = Application.GetRealWidth(179); btnPic.Width = Application.GetRealWidth(844); btnPic.Height = Application.GetRealHeight(397); if (sceneUI.IconPathType == 0) { btnPic.ImagePath = sceneUI.IconPath; } else if (Common.Global.IsExistsByHomeId(sceneUI.IconPath) == true) { btnPic.ImageBytes = Common.Global.ReadFileByHomeId(sceneUI.IconPath); } btnPic.Radius = (uint)Application.GetRealHeight(17); this.AddChidren(btnPic, ChidrenBindMode.NotBind); //它的上面有一层阴影 var frameBack = new FrameLayout(); frameBack.Width = btnPic.Width; frameBack.Height = btnPic.Height; frameBack.X = btnPic.X; frameBack.BackgroundColor = 0x40000000; frameBack.Radius = (uint)Application.GetRealHeight(17); this.AddChidren(frameBack, ChidrenBindMode.BindEventOnly); var btnName = new NormalViewControl(251, 282, true); btnName.IsMoreLines = true; btnName.X = ControlCommonResourse.XXLeft; btnName.Y = Application.GetRealHeight(58); btnName.BackgroundColor = 0xd6333333; btnName.RadiusEx = 17; btnName.Text = sceneUI.Name; btnName.TextSize = 15; btnName.TextColor = UserCenterColor.Current.White; btnName.TextAlignment = TextAlignment.Center; this.AddChidren(btnName, ChidrenBindMode.BindEventOnly); } #endregion } }