wxr
2021-07-01 93c3423f0fdb79500b3779e2fcbd3a041be061fd
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
using System;
using Shared;
using HDL_ON.UI.CSS;
using HDL_ON.Stan;
 
namespace HDL_ON.UI
{
    /// <summary>
    /// 过户账号个人资料确认界面
    /// </summary>
    public class TransferUserConfirmPage : EditorCommonForm
    {
        #region ■ 变量声明___________________________
 
        /// <summary>
        /// 账号信息
        /// </summary>
        private AccountInfoResult accountInfo = null;
 
        #endregion
 
        #region ■ 初始化_____________________________
 
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        /// <param name="i_accountInfo"></param>
        public void ShowForm(AccountInfoResult i_accountInfo)
        {
            this.accountInfo = i_accountInfo;
 
            //个人资料
            base.SetTitleText(Language.StringByID(StringId.Profile));
 
            //初始化中部信息
            this.InitMiddleFrame();
        }
 
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空bodyFrame
            this.ClearBodyFrame();
 
            //上部的白色背景
            var frameBack1 = new FrameLayout();
            frameBack1.BackgroundColor = CSS_Color.MainBackgroundColor;
            frameBack1.Height = Application.GetRealHeight(204);
            bodyFrameLayout.AddChidren(frameBack1);
 
            //头像
            var btnHeadImage = new ImageView();
            btnHeadImage.Y = Application.GetRealHeight(32);
            btnHeadImage.Gravity = Gravity.CenterHorizontal;
            btnHeadImage.Width = Application.GetRealWidth(84);
            btnHeadImage.Height = Application.GetRealWidth(84);
            btnHeadImage.Radius = (uint)Application.GetRealWidth(42);
            btnHeadImage.ImagePath = "LoginIcon/2.png";
            frameBack1.AddChidren(btnHeadImage);
 
            //昵称
            var btnName = new NormalViewControl(frameBack1.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(24), false);
            btnName.Y = btnHeadImage.Bottom + Application.GetRealHeight(11);
            btnName.Gravity = Gravity.CenterHorizontal;
            btnName.IsBold = true;
            btnName.TextSize = CSS_FontSize.SubheadingFontSize;
            btnName.TextColor = CSS_Color.FirstLevelTitleColor;
            btnName.Text = accountInfo.MemberName;
            btnName.TextAlignment = TextAlignment.Center;
            frameBack1.AddChidren(btnName);
 
            //账号
            var btnAccount = new NormalViewControl(frameBack1.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(16), false);
            btnAccount.Y = btnName.Bottom + Application.GetRealHeight(7);
            btnAccount.Gravity = Gravity.CenterHorizontal;
            btnAccount.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
            btnAccount.TextAlignment = TextAlignment.Center;
            btnAccount.Text = accountInfo.Account;
            frameBack1.AddChidren(btnAccount);
 
            //确认的白色背景
            var frameBack2 = new FrameLayout();
            frameBack2.Y = frameBack1.Bottom + Application.GetRealHeight(8);
            frameBack2.Height = Application.GetRealHeight(50);
            frameBack2.BackgroundColor = CSS_Color.MainBackgroundColor;
            bodyFrameLayout.AddChidren(frameBack2);
            //确认过户
            var btnConform = new NormalViewControl(200, 24, true);
            btnConform.Gravity = Gravity.Center;
            btnConform.TextSize = CSS_FontSize.SubheadingFontSize;
            btnConform.TextAlignment = TextAlignment.Center;
            btnConform.TextColor = CSS_Color.MainColor;
            btnConform.TextID = StringId.ConfirmTransferre;
            frameBack2.AddChidren(btnConform);
            btnConform.ButtonClickEvent += (sender, e) =>
            {
                //如果设置有安全验证,则需要验证
                HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
                {
                    var form = new TransferingResidenceForm();
                    form.AddForm(this.accountInfo);
                });
            };
 
            HdlThreadLogic.Current.RunThread(() =>
            {
                //用线程去下载头像
                var headImageBytes = ImageUtlis.Current.DownHeadImageByImageKey(this.accountInfo.MemberHeadIcon, true);
                if (headImageBytes != null && headImageBytes.Length > 0)
                {
                    HdlThreadLogic.Current.RunMain(() =>
                    {
                        btnHeadImage.ImageBytes = headImageBytes;
                    }, ShowErrorMode.NO);
                }
            }); 
        }
 
        #endregion
    }
 
}