黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
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
using System;
using System.Collections.Generic;
using System.Text;
 
namespace Shared.Phone.UserCenter.GatewayManage
{
    /// <summary>
    /// 网关添加成功的显示界面
    /// </summary>
    public class GatewayAddSuccessForm : EditorCommonForm
    {
        #region ■ 变量声明___________________________
 
        #endregion
 
        #region ■ 初始化_____________________________
 
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        public void ShowForm()
        {
            if (HdlFormLogic.Current.IsFormOpen("WiredGatewayListForm") == true)
            {
                //设置头部信息  添加有线网关
                base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddWiredGateway));
            }
            else
            {
                //设置头部信息  添加无线网关
                base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddWirelessGateway));
            }
 
            //初始化中部信息
            this.InitMiddleFrame();
        }
 
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空bodyFrame
            this.ClearBodyFrame();
 
            var btnPic = new PicViewControl(452, 377);
            btnPic.UnSelectedImagePath = "Gateway/AddGatewaySuccess.png";
            btnPic.Gravity = Gravity.CenterHorizontal;
            btnPic.Y = Application.GetRealHeight(369);
            bodyFrameLayout.AddChidren(btnPic);
 
            //添加智能网关成功
            var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(85), false);
            btnMsg.IsBold = true;
            btnMsg.Y = Application.GetRealHeight(732);
            btnMsg.TextAlignment = TextAlignment.Center;
            btnMsg.TextSize = 20;
            btnMsg.TextID = R.MyInternationalizationString.uAddgatewaySuccess;
            bodyFrameLayout.AddChidren(btnMsg);
 
            //继续添加网关
            var frameAdd = new FrameLayoutStatuControl();
            frameAdd.UseClickStatu = false;
            frameAdd.Y = Application.GetRealHeight(1224);
            frameAdd.Gravity = Gravity.CenterHorizontal;
            frameAdd.Width = Application.GetRealWidth(746);
            frameAdd.Height = Application.GetRealHeight(184);
            frameAdd.BackgroundImagePath = "Item/BottomButtonGround.png";
            bodyFrameLayout.AddChidren(frameAdd);
            var btnAdd = new NormalViewControl(300, 65, true);
            btnAdd.IsBold = true;
            btnAdd.TextColor = UserCenterColor.Current.White;
            btnAdd.TextSize = 16;
            btnAdd.Y = Application.GetRealHeight(49);
            btnAdd.Gravity = Gravity.CenterHorizontal;
            btnAdd.TextAlignment = TextAlignment.Center;
            btnAdd.TextID = R.MyInternationalizationString.uContinuteToAddGateway;
            frameAdd.AddChidren(btnAdd, ChidrenBindMode.BindEvent);
            frameAdd.ButtonClickEvent += (sender, e) =>
            {
                //让它退到菜单选择界面
                HdlFormLogic.Current.CloseAllOpenForm("NewGateWayMenuSelectForm");
            };
 
            //返回主页
            var btnGoback = new BottomClickButton(688);
            btnGoback.TextID = R.MyInternationalizationString.uGobackToHomePage;
            btnGoback.Y = Application.GetRealHeight(1460);
            bodyFrameLayout.AddChidren(btnGoback);
            btnGoback.ButtonClickEvent += (sender, e) =>
            {
                //让它退到主页
                HdlFormLogic.Current.CloseAllOpenForm(null, true);
            };
        }
 
        #endregion
 
        #region ■ 一般方法___________________________
 
        #endregion
    }
}