wei
2021-04-19 db1b76418c083e74fe16a65cddddf578de3d09cc
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
using System;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.ArmCenter
{
    public class ArmCenterPage : FrameLayout
    {
        /// <summary>
        /// 主窗体
        /// </summary>
        FrameLayout bodyView;
        public ArmCenterPage()
        {
            bodyView = this;
        }
 
        public void LoadPage()
        {
            Action skipAction = () => {
 
            };
 
            new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView_ArmCenter(skipAction);
 
            VerticalScrolViewLayout contentView = new VerticalScrolViewLayout()
            {
                Height = Application.GetRealHeight(603),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                ScrollEnabled = false,
            };
            bodyView.AddChidren(contentView);
 
            contentView.AddChidren(new Button()
            {
                Height =Application.GetRealWidth(32),
            });
 
            //安防状态背景图
            Button btnArmTipIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(198),
                Height = Application.GetRealWidth(198),
                UnSelectedImagePath = "FunctionIcon/ArmCenter/NoDefenseBigIcon.png",
                SelectedImagePath = "FunctionIcon/ArmCenter/InDefenseBigIcon.png",
            };
            contentView.AddChidren(btnArmTipIcon);
 
            contentView.AddChidren(new Button()
            {
                Height = Application.GetRealWidth(16),
            });
 
            //自定义布防标题
            Button btnCustomDeploymentTitle = new Button()
            {
                X = Application.GetRealWidth(24),
                Height = Application.GetRealWidth(54),
                TextAlignment = TextAlignment.CenterLeft,
                IsBold = true,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextID = StringId.CustomDeployment,
            };
            contentView.AddChidren(btnCustomDeploymentTitle);
 
            HorizontalScrolViewLayout customDeploymentView = new HorizontalScrolViewLayout()
            {
                X = Application.GetRealWidth(23),
                Height = Application.GetRealWidth(80),
            };
            contentView.AddChidren(customDeploymentView);
 
 
 
 
 
 
 
        }
    }
 
 
    /// <summary>
    /// 安防自定义控件
    /// </summary>
    public class ArmDiyView
    {
        public FrameLayout ArmDiyButton;
 
        /// <summary>
        /// 
        /// </summary>
        /// <param name="IconPath">图片路径</param>
        /// <param name="Text">显示文本</param>
        public ArmDiyView(string UnSelectedIconPath, string SelectedIconPath, string Text)
        {
            ArmDiyButton = new FrameLayout()
            {
                Width = Application.GetRealWidth(82),
                Height = Application.GetRealWidth(80),
            };
 
            Button btnIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Width = Application.GetRealWidth(40),
                Height = Application.GetRealWidth(40),
                UnSelectedImagePath = UnSelectedIconPath,
                SelectedImagePath = SelectedIconPath,
            };
            ArmDiyButton.AddChidren(btnIcon);
 
            Button btnText = new Button()
            {
                Y = Application.GetRealWidth(40),
                Height = Application.GetRealWidth(41),
                Text = Text,
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            };
            ArmDiyButton.AddChidren(btnText);
 
        }
            
    }
}