陈嘉乐
2021-03-09 83df0ebfbd306d0fb5a51a21a7ef2271c0c507ec
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
using System;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice.View
{
    public class FailView
    {
        public void ShouError(Action<Dialog> action)
        {
            Dialog dialog = new Dialog();
            #region 界面布局
            dialog.BackgroundColor = CSS.CSS_Color.viewMiddle;
            PirDevice.View.TopView topView = new View.TopView();
            topView.topNameBtn.TextID = StringId.tianjiayaokongqi;
            dialog.AddChidren(topView.FLayoutView());
            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { dialog.Close(); };
 
            FrameLayout fLayout = new FrameLayout
            {
                Y = Application.GetRealHeight(64),
                BackgroundColor = CSS.CSS_Color.textWhiteColor,
                Height = Application.GetRealHeight(667-64),
                Width = Application.GetRealWidth(375),
            };
            dialog.AddChidren(fLayout);
 
            //图标
            Button iconBtn = new Button
            {
                Y = Application.GetRealHeight(106),
                X = Application.GetRealWidth(98),
                Width = Application.GetRealWidth(180),
                Height = Application.GetRealWidth(180),
                UnSelectedImagePath = "PirIcon/failed.png",
            };
            fLayout.AddChidren(iconBtn);
 
            //添加失败
            Button text1Btn = new Button
            {
                Width = Application.GetRealWidth(375 - 32),
                Height = Application.GetRealHeight(22),
                Y = Application.GetRealHeight(302),
                X = Application.GetRealWidth(16),
                TextID = StringId.tianjiashibai,
                TextSize = TextSize.text16,
                TextColor = CSS.CSS_Color.textRedColor,
                TextAlignment = TextAlignment.Center,
            };
            fLayout.AddChidren(text1Btn);
            //重试
            View.SaveView saveView = new View.SaveView();
            dialog.AddChidren(saveView.FLayoutView());
            saveView.btnSave.TextID = StringId.chongshii;
            saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            dialog.Show();
            saveView.btnClick.MouseUpEventHandler += (sender,e) => {
                action(dialog);
            };
            #endregion
 
        }
    }
}