wei
2021-01-11 b271bcceb1c4e718377ca86b6213816abcf7482a
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
using System;
using HDL_ON.UI.CSS;
using Shared;
 
namespace HDL_ON.UI
{
    /// <summary>
    /// 通用确认按钮
    /// </summary>
    public class ConfirmButton : Button
    {
        public ConfirmButton()
        {
            Gravity = Gravity.CenterHorizontal;
            Width = Application.GetRealWidth(220);
            Height = Application.GetRealWidth(44);
            BackgroundColor = CSS_Color.MainColor;
            TextAlignment = TextAlignment.Center;
            TextColor = CSS_Color.MainBackgroundColor;
            TextSize = CSS_FontSize.SubheadingFontSize;
            IsBold = true;
            Radius = (uint)Application.GetRealWidth(22);
            BorderColor = 0x00000000;
            BorderWidth = 0;
 
        }
    }
 
    public class BottomViewConfirmButton
    {
        public void LoadView(FrameLayout bodyView,EventHandler<MouseEventArgs> eventHandler,string confirmText)
        {
            var bottomView = new FrameLayout()
            {
                Y = Application.GetRealHeight(591),
                Height = Application.GetRealHeight(76) + Application.GetRealWidth(44),
                Radius = (uint)Application.GetRealWidth(22),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            bodyView.AddChidren(bottomView);
 
            var btnConfrim = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(12),
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealWidth(44),
                Radius = (uint)Application.GetRealWidth(22),
                BackgroundColor = CSS_Color.MainColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.Center,
                IsBold = true,
                Text = confirmText,
            };
            bottomView.AddChidren(btnConfrim);
 
            btnConfrim.MouseUpEventHandler = eventHandler;
        }
 
    }
}