wxr
2020-12-01 a46cd0adb5af29e8a9cf47c219475acaedfcf839
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
using System;
using Shared;
namespace HDL_ON.UI.UI2.Intelligence.Automation.LogicView
{
    public class SwitchView
    {
 
        /// <summary>
        /// 主控件
        /// </summary>
        public FrameLayout frameLayout = new FrameLayout
        {
            BackgroundColor = CSS.CSS_Color.view,
            Y = Application.GetRealHeight(515),
            X = Application.GetRealWidth(16),
            Height = Application.GetRealHeight(44*44),
            Width = Application.GetRealWidth(343),
            Radius=(uint)Application.GetRealHeight(12)
        };
        /// <summary>
        /// 取消
        /// </summary>
        public Button btnCancel = new Button
        {
            TextAlignment = TextAlignment.Center,
            TextSize = TextSize.text16,
            TextColor = CSS.CSS_Color.textRedColor,
            TextID=StringId.cancelSelected,
            Y = Application.GetRealHeight(611),
            X = Application.GetRealWidth(16),
            Height = Application.GetRealHeight(44),
            Width = Application.GetRealWidth(343),
            BackgroundColor = CSS.CSS_Color.view,
            Radius = (uint)Application.GetRealHeight(12)
        };
        /// <summary>
        /// View的方法
        /// </summary>
        ///  <param name="frame">父控件</param>
        /// <param name="i">显示View数量</param>
        /// <returns></returns>
        public void FLayoutView(FrameLayout frame,int i)
        {
            frameLayout.Y = Application.GetRealHeight(603 - (44 * i));
            frameLayout.Height = Application.GetRealHeight(44 * i);
            frame.AddChidren(frameLayout);
            frame.AddChidren(btnCancel);
            btnCancel.MouseUpEventHandler += (sender1, e1) =>
            {
                frame.RemoveFromParent();
            };
 
        }
    }
}