黄学彪
2021-01-28 1fcf2302f79f9cbea5ef17c3688311ed65cfabb4
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using System;
using System.Collections.Generic;
using System.Text;
using HDL_ON.UI.CSS;
using Shared;
 
namespace HDL_ON.UI
{
    /// <summary>
    /// 欢迎回家的界面
    /// </summary>
    public class WellcomToHomeForm
    {
        /// <summary>
        /// 显示欢迎回家的弹窗界面
        /// </summary>
        public void ShowForm()
        {
            //整个界面的灰色背景
            var frameBack = new Dialog();
            frameBack.Show();
 
            //中间白色区域
            var frameWite = new FrameLayout();
            frameWite.Y = Application.GetRealHeight(223);
            frameWite.Height = Application.GetRealHeight(245);
            frameWite.Width = Application.GetRealWidth(288);
            frameWite.BackgroundColor = CSS.CSS_Color.MainBackgroundColor;
            frameWite.Radius = (uint)Application.GetRealWidth(12);
            frameWite.Gravity = Gravity.CenterHorizontal;
            frameBack.AddChidren(frameWite);
 
            //Icon图标
            var picIcon = new Button();
            picIcon.Y = Application.GetRealHeight(152);
            picIcon.Height = Application.GetRealWidth(160);
            picIcon.Width = Application.GetRealWidth(160);
            picIcon.Gravity = Gravity.CenterHorizontal;
            picIcon.UnSelectedImagePath = "oRobot.png";
            frameBack.AddChidren(picIcon);
 
            //欢迎回家
            var btnText = new Button();
            btnText.Y = Application.GetRealHeight(98);
            btnText.Height = Application.GetRealHeight(24);
            btnText.TextSize = 16;
            btnText.TextAlignment = TextAlignment.Center;
            btnText.TextColor = CSS.CSS_Color.MainColor;
            btnText.TextID = StringId.WellComBackHome;
            frameWite.AddChidren(btnText);
 
            //确认
            var btnOk = new Button();
            btnOk.Y = btnText.Bottom + Application.GetRealHeight(48);
            btnOk.Height = Application.GetRealHeight(44);
            btnOk.Width = Application.GetRealWidth(220);
            btnOk.TextSize = 16;
            btnOk.IsBold = true;
            btnOk.TextAlignment = TextAlignment.Center;
            btnOk.TextColor = CSS.CSS_Color.MainBackgroundColor;
            btnOk.BackgroundColor = CSS.CSS_Color.MainColor;
            btnOk.Gravity = Gravity.CenterHorizontal;
            btnOk.Radius = (uint)Application.GetRealHeight(22);
            btnOk.TextID = StringId.Confirm;
            frameWite.AddChidren(btnOk);
 
            btnOk.MouseUpEventHandler += (sender, e) =>
            {
                frameBack.Close();
            };
        }
    }
}