HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-10-10 2ed75b8b337048e5d75e6d9ec8307633134f02fd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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));
        }
    }
}