using System;
|
using Shared.Common;
|
namespace Shared.Phone.Device.CommonForm
|
{
|
/// <summary>
|
/// Complete button.
|
/// <para>默认文字: 完成 </para>
|
/// <para>白色字体</para>
|
/// <para>黑色背景</para>
|
/// <para>文字居中</para>
|
/// <para>默认字号大小</para>
|
/// </summary>
|
public class CompleteButton:Button
|
{
|
/// <summary>
|
/// CompleteButton
|
/// </summary>
|
/// <param name="y"></param>
|
/// <param name="width"></param>
|
/// <param name="height"></param>
|
public CompleteButton(int y, int width, int height)
|
{
|
this.Y = Application.GetRealHeight(y);
|
this.Width = Application.GetRealWidth(width);
|
this.Height = Application.GetRealHeight(height);
|
TextID = R.MyInternationalizationString.Complete;
|
BackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor;
|
TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
|
Gravity = Gravity.CenterHorizontal;
|
Radius = (uint)Application.GetRealHeight(height / 2);
|
}
|
/// <summary>
|
/// SetTitle
|
/// </summary>
|
/// <param name="title"></param>
|
public void SetTitle(string title)
|
{
|
Text = title;
|
}
|
/// <summary>
|
/// SetTitle
|
/// </summary>
|
/// <param name="title"></param>
|
public void SetTitle(int title)
|
{
|
SetTitle(Language.StringByID(title));
|
}
|
}
|
}
|