using System;
|
using System.Collections.Generic;
|
using System.Text;
|
|
namespace Shared.Phone.UserCenter
|
{
|
/// <summary>
|
/// 场景图片的控件
|
/// </summary>
|
public class ScenePictrueControl : FrameRowControl
|
{
|
#region ■ 初始化_____________________________
|
|
/// <summary>
|
/// 场景图片的控件(拥有桌布)
|
/// </summary>
|
public ScenePictrueControl()
|
{
|
this.UseClickStatu = false;
|
this.Height = Application.GetRealHeight(440);
|
}
|
|
/// <summary>
|
/// 初始化控件
|
/// </summary>
|
/// <param name="sceneUI">场景控件</param>
|
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 btnShadow = new PicViewControl(btnPic.Width + Application.GetRealWidth(14 * 2), btnPic.Height + Application.GetRealHeight(43), false);
|
btnShadow.X = btnPic.X - Application.GetRealWidth(14);
|
btnShadow.UnSelectedImagePath = "Scene/SceneShadow.png";
|
this.AddChidren(btnShadow, 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
|
}
|
}
|