wei
2020-11-27 e53a1951d6aa07ad22aad9816da4703496fcbccd
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
using System;
using HDL_ON.UI.CSS;
using Shared;
using Xamarin.Essentials;
 
namespace HDL_ON.UI
{
    /// <summary>
    /// 我的服务器信息页面
    /// </summary>
    public class MyServerInfoPage : FrameLayout
    {
        FrameLayout bodyView;
 
        public MyServerInfoPage()
        {
            bodyView = this;
        }
 
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
            //服务器信息
            new TopViewDiv(bodyView, Language.StringByID(StringId.ServerInformation)).LoadTopView();
 
            ImageView imageView = new ImageView()
            {
                Y = Application.GetMinRealAverage(88),
                Width = Application.GetMinRealAverage(200),
                Height = Application.GetMinRealAverage(180),
                ImagePath = "PersonalCenter/ServerInfo.png",
                Gravity = Gravity.CenterHorizontal
            };
            bodyView.AddChidren(imageView);
 
            var serverBtn = new Button()
            {
                X = Application.GetRealWidth(40),
                Y = imageView.Bottom + Application.GetRealHeight(12),
                Width = Application.GetRealWidth(295),
                Height = Application.GetRealHeight(22),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                //Text = "当前账号服务器所属:中国,代码xxxx",
                IsBold = true
 
            };
            bodyView.AddChidren(serverBtn);
 
            var tipBtn = new Button()
            {
                X = Application.GetRealWidth(40),
                Y = serverBtn.Bottom + Application.GetRealHeight(12),
                Width = Application.GetRealWidth(295),
                Height = Application.GetRealHeight(80),
                TextAlignment = TextAlignment.TopLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
                //Text = "*服务器是您当前云端数据存储的所在区域,无需必要,我们不建议发生迁移",
                TextID = StringId.CurrentAccountServerOwnershipTip,
                IsMoreLines = true
 
            };
            bodyView.AddChidren(tipBtn);
 
            var callBtn = new TextButton()
            {
                X = Application.GetRealWidth(40),
                Y = Application.GetRealHeight(606),
                Width = Application.GetRealWidth(168),
                Height = Application.GetRealHeight(22),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.TextualColor,
                TextSize = CSS_FontSize.TextFontSize,
                //Text = "*若需要迁移服务器,请拨打",
                TextID = StringId.ToMigrateTheServerPleaseCall,
 
            };
            bodyView.AddChidren(callBtn);
            callBtn.Width = callBtn.GetTextWidth() + Application.GetRealWidth(2);
 
            var phoneBtn = new TextButton()
            {
                X = callBtn.Right + Application.GetRealHeight(2),
                Y = Application.GetRealHeight(606),
                Width = Application.GetRealWidth(200),
                Height = Application.GetRealHeight(22),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                Text = "400-855-8535",
                IsBold = true
            };
            bodyView.AddChidren(phoneBtn);
 
            phoneBtn.MouseUpEventHandler += (sender, e) =>
            {
                PhoneDialer.Open(Constant.SUPPORT_TELEPHONENUMBER);
            };
 
            serverBtn.Text = Language.StringByID(StringId.CurrentAccountServerOwnership) + UserInfo.Current.GlobalRegion.regionName;
 
        }
    }
}