gxc
2020-02-28 66a9965c44ecc32a6696abca876ab9d1cd091584
ZigbeeApp/Shared/Phone/Device/Account/PhoneEmailForm.cs
@@ -61,7 +61,9 @@
                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                Radius = (uint)Application.GetRealHeight(height / 2),
                IsSelected = true,
                Tag = "Phone"
                IsBold=true,
                Tag = "Phone",
                TextSize= CommonFormResouce.TextSize
            };
            PhoneEmailFL.AddChidren(SelectedPhone);
@@ -76,7 +78,8 @@
                SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                Radius = (uint)Application.GetRealHeight(height / 2),
                IsSelected = false,
                Tag = "Email"
                Tag = "Email",
                TextSize = CommonFormResouce.TextSize
            };
            PhoneEmailFL.AddChidren(SelectedEmail);
        }
@@ -108,6 +111,10 @@
        /// Button_Height
        /// </summary>
        private int Button_Height = 92;
        /// <summary>
        /// accountLine
        /// </summary>
        private Button accountLine;
        /// <summary>
        /// Init
@@ -135,26 +142,25 @@
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                Text = $"+{CommonPage.PhoneZoneStr}",
                TextAlignment = TextAlignment.Center,
                TextSize = CommonFormResouce.loginTextSize
                TextSize = CommonFormResouce.TextSize
            };
            accountFL.AddChidren(PhoneZoneBtn);
            PhoneZoneBtn.MouseUpEventHandler += (sender, e) =>
            {
                var form = new AreaCodeSelectForm();                 parFL.AddChidren(form);                 form.InitForm();                 form.ShowForm();                 form.FinishSelectEvent += (code) =>                 {                     (sender as Button).Text = "+" + code;                 };
                //var zoneListView = new PhoneZone { };
                //zoneListView.ActionSelectedZone += (zone) =>
                //{
                //    var t = CommonPage.PhoneZoneStr;
                //    (sender as Button).Text = "+" + zone;
                //};
                //parFL.AddChidren(zoneListView);
                //zoneListView.Show();
                var form = new AreaCodeSelectForm();
                parFL.AddChidren(form);
                form.InitForm();
                form.ShowForm();
                form.FinishSelectEvent += (code) =>
                {
                    (sender as Button).Text = "+" + code;
                    CommonPage.PhoneZoneStr = code;
                };
            };
            AccountET = new EditText()
            {
                X = Application.GetRealWidth(193),
                X = Application.GetRealWidth(222),
                Width = Application.GetRealWidth(600),
                Height = Application.GetRealHeight(Button_Height),
                Gravity = Gravity.CenterVertical,
@@ -163,18 +169,39 @@
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text = account,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CommonFormResouce.loginTextSize
                TextSize = CommonFormResouce.PlaceHolderTextSize
            };
            accountFL.AddChidren(AccountET);
            var accountLine = new Button()
            accountLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2,
                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            accountFL.AddChidren(accountLine);
            AccountET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if (focusEvent.Focus)
            {
                accountLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                accountLine.Height = 2;
            }
            else
            {
                accountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                accountLine.Height = 1;
            }
        }
    }
@@ -188,6 +215,10 @@
        /// Button_Height
        /// </summary>
        private int Button_Height = 92;
        /// <summary>
        /// accountLine
        /// </summary>
        private Button accountLine;
        /// <summary>
        /// Init
@@ -227,18 +258,40 @@
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text = account,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CommonFormResouce.loginTextSize
                TextSize = CommonFormResouce.PlaceHolderTextSize
            };
            accountFL.AddChidren(AccountET);
            var accountLine = new Button()
            accountLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height)-2,
                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            accountFL.AddChidren(accountLine);
            AccountET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if(focusEvent.Focus)
            {
                accountLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                accountLine.Height = 2;
            }
            else
            {
                accountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                accountLine.Height = 1;
            }
        }
    }
@@ -252,6 +305,10 @@
        /// Button_Height
        /// </summary>
        private int Button_Height = 92;
        /// <summary>
        /// accountLine
        /// </summary>
        private Button accountLine;
        /// <summary>
        /// Init
@@ -282,7 +339,7 @@
            AccountET = new EditText()
            {
                X = Application.GetRealWidth(236),
                X = Application.GetRealWidth(222),
                Width = Application.GetRealWidth(700),
                Height = Application.GetRealHeight(Button_Height),
                Gravity = Gravity.CenterVertical,
@@ -291,20 +348,43 @@
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text = account,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CommonFormResouce.loginTextSize
                TextSize = CommonFormResouce.PlaceHolderTextSize
            };
            accountFL.AddChidren(AccountET);
            var accountLine = new Button()
            accountLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2,
                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            accountFL.AddChidren(accountLine);
            AccountET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if (focusEvent.Focus)
            {
                accountLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                accountLine.Height = 2;
            }
            else
            {
                accountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                accountLine.Height = 1;
            }
        }
    }
    public class EmailLoginRowForm : FrameLayout
    {
@@ -316,6 +396,10 @@
        /// Button_Height
        /// </summary>
        private int Button_Height = 92;
        /// <summary>
        /// accountLine
        /// </summary>
        private Button accountLine;
        /// <summary>
        /// Init
@@ -346,7 +430,7 @@
            AccountET = new EditText()
            {
                X = Application.GetRealWidth(193),
                X = Application.GetRealWidth(222),
                Width = Application.GetRealWidth(700),
                Height = Application.GetRealHeight(Button_Height),
                Gravity = Gravity.CenterVertical,
@@ -355,19 +439,41 @@
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text = account,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CommonFormResouce.loginTextSize
                TextSize = CommonFormResouce.PlaceHolderTextSize
            };
            accountFL.AddChidren(AccountET);
            var accountLine = new Button()
            accountLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2,
                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            accountFL.AddChidren(accountLine);
            AccountET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if (focusEvent.Focus)
            {
                accountLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                accountLine.Height = 2;
            }
            else
            {
                accountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                accountLine.Height = 1;
            }
        }
    }
    public class EmailForgotRowForm : FrameLayout
@@ -380,6 +486,10 @@
        /// Button_Height
        /// </summary>
        private int Button_Height = 92;
        /// <summary>
        /// accountLine
        /// </summary>
        private Button accountLine;
        /// <summary>
        /// Init
@@ -409,18 +519,39 @@
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text = account,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CommonFormResouce.loginTextSize
                TextSize = CommonFormResouce.PlaceHolderTextSize
            };
            accountFL.AddChidren(AccountET);
            var accountLine = new Button()
            accountLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2,
                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            accountFL.AddChidren(accountLine);
            AccountET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if (focusEvent.Focus)
            {
                accountLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                accountLine.Height = 2;
            }
            else
            {
                accountLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                accountLine.Height = 1;
            }
        }
    }
@@ -442,6 +573,10 @@
        /// VerificationCodeET
        /// </summary>
        public EditText VerificationCodeET;
        /// <summary>
        /// pwdLine
        /// </summary>
        private Button pwdLine;
        /// <summary>
        /// Init
@@ -473,7 +608,7 @@
            VerificationCodeET = new EditText()
            {
                X = Application.GetRealWidth(236),
                X = Application.GetRealWidth(222),
                Width = Application.GetRealWidth(350),
                Height = Application.GetRealHeight(Button_Height),
                Gravity = Gravity.CenterVertical,
@@ -505,19 +640,42 @@
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                SelectedTextColor = ZigbeeColor.Current.GXCTextColor,
                TextAlignment = TextAlignment.Center,
                TextSize=CommonFormResouce.TextSize,
                Enable = false,
                IsSelected = false
                IsSelected = false,
                IsBold=true
            };
            codeFL.AddChidren(SendCodeBtn);
            var pwdLine = new Button()
            pwdLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2,
                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            codeFL.AddChidren(pwdLine);
            VerificationCodeET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if (focusEvent.Focus)
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                pwdLine.Height = 2;
            }
            else
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                pwdLine.Height = 1;
            }
        }
    }
@@ -535,6 +693,10 @@
        /// Button_Height
        /// </summary>
        private int Button_Height = 92;
        /// <summary>
        /// pwdLine
        /// </summary>
        private Button pwdLine;
        /// <summary>
        /// Init
@@ -567,7 +729,7 @@
            PasswrodET = new EditText()
            {
                X = Application.GetRealWidth(236),
                X = Application.GetRealWidth(222),
                Width = Application.GetRealWidth(550),
                Height = Application.GetRealHeight(Button_Height),
                Gravity = Gravity.CenterVertical,
@@ -576,7 +738,7 @@
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text = password,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CommonFormResouce.loginTextSize,
                TextSize = CommonFormResouce.PlaceHolderTextSize,
                SecureTextEntry = true
            };
            pwdFL.AddChidren(PasswrodET);
@@ -599,14 +761,16 @@
                PasswrodET.SecureTextEntry = (sender as Button).IsSelected;
            };
            var pwdLine = new Button()
            pwdLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2,
                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            pwdFL.AddChidren(pwdLine);
            PasswrodET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// SetPlaceholdText
@@ -615,6 +779,25 @@
        public void SetPlaceholdText(string holdText)
        {
            PasswrodET.PlaceholderText = holdText;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if (focusEvent.Focus)
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                pwdLine.Height = 2;
            }
            else
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                pwdLine.Height = 1;
            }
        }
    }
@@ -632,6 +815,10 @@
        /// Button_Height
        /// </summary>
        private int Button_Height = 92;
        /// <summary>
        /// pwdLine
        /// </summary>
        private Button pwdLine;
        /// <summary>
        /// Init
@@ -673,7 +860,7 @@
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text = password,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CommonFormResouce.loginTextSize,
                TextSize = CommonFormResouce.PlaceHolderTextSize,
                SecureTextEntry = true
            };
            pwdFL.AddChidren(PasswrodET);
@@ -696,14 +883,16 @@
                PasswrodET.SecureTextEntry = (sender as Button).IsSelected;
            };
            var pwdLine = new Button()
            pwdLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2,
                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            pwdFL.AddChidren(pwdLine);
            PasswrodET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// SetPlaceholdText
@@ -712,6 +901,25 @@
        public void SetPlaceholdText(string holdText)
        {
            PasswrodET.PlaceholderText = holdText;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if (focusEvent.Focus)
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                pwdLine.Height = 2;
            }
            else
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                pwdLine.Height = 1;
            }
        }
    }
@@ -729,6 +937,10 @@
        /// Button_Height
        /// </summary>
        private int Button_Height = 92;
        /// <summary>
        /// pwdLine
        /// </summary>
        private Button pwdLine;
        /// <summary>
        /// Init
@@ -760,7 +972,7 @@
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text = password,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CommonFormResouce.loginTextSize,
                TextSize = CommonFormResouce.PlaceHolderTextSize,
                SecureTextEntry = true
            };
            pwdFL.AddChidren(PasswrodET);
@@ -783,14 +995,16 @@
                PasswrodET.SecureTextEntry = (sender as Button).IsSelected;
            };
            var pwdLine = new Button()
            pwdLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2,
                Width = Application.GetRealWidth(CommonFormResouce.Row_Width),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            pwdFL.AddChidren(pwdLine);
            PasswrodET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// SetPlaceholdText
@@ -799,6 +1013,26 @@
        public void SetPlaceholdText(string holdText)
        {
            PasswrodET.PlaceholderText = holdText;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if (focusEvent.Focus)
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                pwdLine.Height = 2;
            }
            else
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                pwdLine.Height = 1;
            }
        }
    }
@@ -820,6 +1054,10 @@
        /// VerificationCodeET
        /// </summary>
        public EditText VerificationCodeET;
        /// <summary>
        /// pwdLine
        /// </summary>
        private Button pwdLine;
        /// <summary>
        /// sendCodeBG
        /// </summary>
@@ -862,7 +1100,7 @@
            VerificationCodeET = new EditText()
            {
                X = Application.GetRealWidth(236),
                X = Application.GetRealWidth(222),
                Width = Application.GetRealWidth(300),
                Height = Application.GetRealHeight(Button_Height),
                Gravity = Gravity.CenterVertical,
@@ -888,18 +1126,42 @@
                SelectedBackgroundColor=ZigbeeColor.Current.GXCButtonSelectedColor,
                Enable = false,
                IsSelected = false,
                Radius=(uint)Application.GetRealHeight(12)
                Radius=(uint)Application.GetRealHeight(12),
                IsBold=true,
                TextSize=CommonFormResouce.TextSize
            };
            codeFL.AddChidren(SendCodeBtn);
        var pwdLine = new Button()
            pwdLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2,
                Width = Application.GetRealWidth(536),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            codeFL.AddChidren(pwdLine);
            VerificationCodeET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if (focusEvent.Focus)
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                pwdLine.Height = 2;
            }
            else
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                pwdLine.Height = 1;
            }
        }
        /// <summary>
@@ -977,6 +1239,10 @@
        /// </summary>
        public EditText VerificationCodeET;
        /// <summary>
        /// pwdLine
        /// </summary>
        private Button pwdLine;
        /// <summary>
        /// Timer
        /// </summary>
        private Timer t;
@@ -1036,18 +1302,41 @@
                SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor,
                Enable = false,
                IsSelected = false,
                Radius = (uint)Application.GetRealHeight(12)
                Radius = (uint)Application.GetRealHeight(12),
                IsBold=true,
                TextSize=CommonFormResouce.TextSize
            };
            codeFL.AddChidren(SendCodeBtn);
            var pwdLine = new Button()
            pwdLine = new Button()
            {
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 1,
                Y = Application.GetRealHeight(CommonFormResouce.Row_Height) - 2,
                Width = Application.GetRealWidth(536),
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor
            };
            codeFL.AddChidren(pwdLine);
            VerificationCodeET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
        /// 光标改变
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="focusEvent"></param>
        private void Text_FoucesChangeEvent(object sender, FocusEventArgs focusEvent)
        {
            if (focusEvent.Focus)
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCSelectedLineColor;
                pwdLine.Height = 2;
            }
            else
            {
                pwdLine.BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor;
                pwdLine.Height = 1;
            }
        }
        /// <summary>