JLChen
2020-04-15 19545253f1977af3ef84b301183c2e12107983c9
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
using System;
using System.Collections.Generic;
using System.IO;
 
namespace Shared.SimpleControl.Phone
{
    public static class UserSettingView
    {
        public static void InitUserSettingView ()
        {
            FrameLayout topView = new FrameLayout () {
                Y = Application.GetRealHeight (36),
                Height = Application.GetRealHeight (90),
                Width = Application.GetRealWidth (640),
                BackgroundColor = SkinStyle.Current.MainColor,
            };
            UserMiddle.SettingBodyView.AddChidren (topView);
 
            Button LogoButton = new Button () {
                Width = Application.GetRealWidth (154),
                Height = Application.GetRealHeight (90),
                UnSelectedImagePath = MainPage.LogoString,
            };
            topView.AddChidren (LogoButton);
 
            Button NameButton = new Button () {
                Width = Application.GetRealWidth (400),
                Height = Application.GetMinReal (90),
                TextID = R.MyInternationalizationString.Setting,
                TextColor = SkinStyle.Current.TextColor1,
                Gravity = Gravity.CenterHorizontal,
                TextAlignment = TextAlignment.Center,
                TextSize = 20,
                //FontName = "TitilliumText25L"
            };
            topView.AddChidren (NameButton);
 
            if(MainPage.LoginUser.AccountString == "464027401@qq.com" ) {
                NameButton.MouseUpEventHandler += (sender, e) => {
                    new Alert ("", UserConfig.Instance.tokenID, "close").Show();
                };
            }
 
            FrameLayout topUserMsgView = new FrameLayout () {
                Y = Application.GetRealHeight (126),
                Height = Application.GetRealHeight (175),
                BackgroundColor = SkinStyle.Current.ViewColor
            };
            UserMiddle.SettingView.AddChidren (topUserMsgView);
 
            Button btnUserIcon = new Button () {
                X = Application.GetRealWidth (27),
                Width = Application.GetMinRealAverage (96),
                Height = Application.GetMinRealAverage (96),
                Gravity = Gravity.CenterVertical,
                Radius = 5,
                BorderColor = SkinStyle.Current.Transparent,
                BorderWidth = 0,
                UnSelectedImagePath = "AccountSettings/User.png",
            };
            topUserMsgView.AddChidren (btnUserIcon);
 
 
            Button btnUserName = new Button () {
                X = btnUserIcon.Right + Application.GetRealWidth (20),
                Y = Application.GetRealHeight (40),
                Width = Application.GetRealWidth (400),
                Height = Application.GetRealHeight (50),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = SkinStyle.Current.TextColor1,
                TextID = R.MyInternationalizationString.Account
            };
            topUserMsgView.AddChidren (btnUserName);
 
            Button btnUserAccount = new Button () {
                X = btnUserName.X,
                Y = btnUserName.Bottom,
                Width = btnUserName.Width,
                Height = btnUserName.Height,
                TextAlignment = TextAlignment.CenterLeft,
                Text = "",
                TextColor = SkinStyle.Current.TextColor1
            };
            topUserMsgView.AddChidren (btnUserAccount);
            if (MainPage.LoginUser != null) {
                btnUserAccount.Text += MainPage.LoginUser.AccountString;
            }
            Button btnTopUserMsgRight = new Button () {
                X = Application.GetRealWidth (570),
                Width = Application.GetRealWidth (28),
                Height = Application.GetRealHeight (40),
                Gravity = Gravity.CenterVertical,
                UnSelectedImagePath = "Item/Right.png",
                SelectedImagePath = "Item/RightSelected.png",
            };
            topUserMsgView.AddChidren (btnTopUserMsgRight);
 
         
            Button btTopNull = new Button () {
                BackgroundColor = SkinStyle.Current.MainColor,
                Height = Application.GetRealHeight (50),
            };
            UserMiddle.SettingView.AddChidren (btTopNull);
 
 
            Button btnNullSkin = new Button () {
                Height = Application.GetRealHeight (5),
                BackgroundColor = SkinStyle.Current.MainColor
            };
            UserMiddle.SettingView.AddChidren (btnNullSkin);
 
        }
    }
}