HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-09-22 ade5917841b0fdcb1df7353ef7c56b1a1bdc9282
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
using System;
using Shared.Common;
 
namespace Shared.Phone.Login
{
    public class AccountResetPWDSuccess : FrameLayout
    {
        public AccountResetPWDSuccess()
        {
            Tag = "Forgot";
        }
        /// <summary>
        /// Show
        /// </summary>
        public void Show()
        {
            var dialog = new FrameLayout()
            {
                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
            };
            AddChidren(dialog);
 
            var blackBG = new FrameLayout()
            {
                Y = Application.GetRealHeight(576),
                Width = Application.GetRealWidth(827),
                Height = Application.GetRealHeight(904),
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                Radius=(uint)Application.GetRealHeight(20)
            };
            AddChidren(blackBG);
 
            var sucBtn = new Button()
            {
                Y = Application.GetRealHeight(657),
                Width = Application.GetMinReal(346),
                Height = Application.GetMinReal(346),
                Gravity = Gravity.CenterHorizontal,
                UnSelectedImagePath = "Account/ChangeSuccess.png"
            };
            AddChidren(sucBtn);
 
            var tipBtn = new Button()
            {
                Y = sucBtn.Bottom+Application.GetRealHeight(35),
                Width = Application.GetRealWidth(500),
                Height = Application.GetRealHeight(80),
                Gravity = Gravity.CenterHorizontal,
                TextID = R.MyInternationalizationString.ResetSuccess,
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextSize = 16
            };
            AddChidren(tipBtn);
 
            var tip = new Button()
            {
                Y = tipBtn.Bottom+ Application.GetRealHeight(15),
                Width = Application.GetRealWidth(700),
                Height = Application.GetRealHeight(80),
                Gravity = Gravity.CenterHorizontal,
                TextID = R.MyInternationalizationString.ResetScucessPleaseLogin,
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                TextSize = 14,
            };
            AddChidren(tip);
 
            var loginBtn = new Button()
            {
                Y = Application.GetRealHeight(1284),
                Width = Application.GetRealWidth(688),
                Height = Application.GetRealHeight(127),
                Gravity = Gravity.CenterHorizontal,
                TextID = R.MyInternationalizationString.Login,
                TextSize = 15,
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor,
                BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor,
                Radius = (uint)Application.GetRealHeight(127 / 2),
                IsSelected = true
            };
            AddChidren(loginBtn);
 
            loginBtn.MouseUpEventHandler += (sender, e) =>
            {
                try
                {
                    CommonPage.Instance.RemoveViewByTag("Forgot");
                    CommonPage.Instance.RemoveViewByTag("Login");
                }
                catch
                {
 
                }
                finally
                {
                    var login = new AccountLoginForm();
                    CommonPage.Instance.AddChidren(login);
                    login.ShowForm();
                }
            };
        }
    }
}