| | |
| | | |
| | | namespace Shared.Phone.Login |
| | | { |
| | | public class PhoneEmailForm : FrameLayout |
| | | public class PhoneEmailForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// 选择手机 |
| | |
| | | PhoneEmailFL = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(y), |
| | | Width = Application.GetMinRealAverage(905), |
| | | Height = Application.GetMinRealAverage(170), |
| | | Width = this.GetPictrueRealSize(905), |
| | | Height = this.GetPictrueRealSize(170), |
| | | //BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor, |
| | | //Radius = (uint)Application.GetRealHeight(height / 2), |
| | | Gravity = Gravity.CenterHorizontal |
| | |
| | | |
| | | var bg = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(905), |
| | | Height = Application.GetMinRealAverage(170), |
| | | Width = this.GetPictrueRealSize(905), |
| | | Height = this.GetPictrueRealSize(170), |
| | | UnSelectedImagePath = "Account/PhoneEmail_White.png", |
| | | Gravity = Gravity.CenterHorizontal |
| | | }; |
| | |
| | | SelectedPhone = new Button() |
| | | { |
| | | X=Application.GetRealWidth(10), |
| | | Width = Application.GetMinRealAverage(905 / 2 + 20), |
| | | Height=Application.GetMinRealAverage(height), |
| | | Width = this.GetPictrueRealSize(905 / 2 + 20), |
| | | Height=this.GetPictrueRealSize(height), |
| | | SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor, |
| | | TextID = R.MyInternationalizationString.PhoneNum, |
| | | TextColor = ZigbeeColor.Current.GXCTextColor, |
| | |
| | | |
| | | SelectedEmail = new Button() |
| | | { |
| | | X = Application.GetMinRealAverage(905 / 2 - 20), |
| | | Width = Application.GetMinRealAverage(905 / 2 + 20), |
| | | Height = Application.GetMinRealAverage(height), |
| | | X = this.GetPictrueRealSize(905 / 2 - 20), |
| | | Width = this.GetPictrueRealSize(905 / 2 + 20), |
| | | Height = this.GetPictrueRealSize(height), |
| | | SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor, |
| | | TextID = R.MyInternationalizationString.Email, |
| | | TextColor = ZigbeeColor.Current.GXCTextColor, |
| | |
| | | } |
| | | } |
| | | |
| | | public class PhoneRowForm : FrameLayout |
| | | public class PhoneRowForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// 手机区号btn |
| | |
| | | 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; |
| | | CommonPage.PhoneZoneStr = code; |
| | | }; |
| | | }; |
| | | //目前只针对+86 |
| | | //PhoneZoneBtn.MouseUpEventHandler += (sender, e) => |
| | | //{ |
| | | // 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() |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public class PhoneLoginRowForm : FrameLayout |
| | | public class PhoneLoginRowForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// 账号输入控件 |
| | |
| | | /// <param name="account"></param> |
| | | public void Init(FrameLayout frameLayout, FrameLayout parFL, string account, int x, int y) |
| | | { |
| | | var accountFL = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(x), |
| | | Y = Application.GetRealHeight(y), |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = Application.GetRealHeight(CommonFormResouce.Row_Height), |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor |
| | | }; |
| | | frameLayout.AddChidren(accountFL); |
| | | this.X = Application.GetRealWidth(x); |
| | | this.Y = Application.GetRealHeight(y); |
| | | this.Width = Application.GetRealWidth(CommonFormResouce.Row_Width); |
| | | this.Height = Application.GetRealHeight(CommonFormResouce.Row_Height); |
| | | this.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; |
| | | frameLayout.AddChidren(this); |
| | | |
| | | var accountBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(69), |
| | | Width = Application.GetMinRealAverage(Button_Height), |
| | | Height = Application.GetMinRealAverage(Button_Height), |
| | | Width = this.GetPictrueRealSize(Button_Height), |
| | | Height = this.GetPictrueRealSize(Button_Height), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Account/Account.png" |
| | | }; |
| | | accountFL.AddChidren(accountBtn); |
| | | this.AddChidren(accountBtn); |
| | | |
| | | AccountET = new EditText() |
| | | { |
| | |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | Text = account, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize, |
| | | IsNumberKeyboardType = true |
| | | }; |
| | | accountFL.AddChidren(AccountET); |
| | | this.AddChidren(AccountET); |
| | | |
| | | accountLine = new Button() |
| | | { |
| | |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | accountFL.AddChidren(accountLine); |
| | | this.AddChidren(accountLine); |
| | | |
| | | AccountET.FoucsChanged += Text_FoucesChangeEvent; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public class EmailRowForm : FrameLayout |
| | | public class EmailRowForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// 账号输入控件 |
| | |
| | | var accountBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(29), |
| | | Width = Application.GetMinRealAverage(Button_Height), |
| | | Height = Application.GetMinRealAverage(Button_Height), |
| | | Width = this.GetPictrueRealSize(Button_Height), |
| | | Height = this.GetPictrueRealSize(Button_Height), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Account/Account.png" |
| | | }; |
| | |
| | | } |
| | | |
| | | |
| | | public class EmailLoginRowForm : FrameLayout |
| | | public class EmailLoginRowForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// 账号输入控件 |
| | |
| | | /// <param name="account"></param> |
| | | public void Init(FrameLayout frameLayout, string account, int x, int y) |
| | | { |
| | | var accountFL = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(x), |
| | | Y = Application.GetRealHeight(y), |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = Application.GetRealHeight(CommonFormResouce.Row_Height), |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor |
| | | }; |
| | | frameLayout.AddChidren(accountFL); |
| | | this.X = Application.GetRealWidth(x); |
| | | this.Y = Application.GetRealHeight(y); |
| | | this.Width = Application.GetRealWidth(CommonFormResouce.Row_Width); |
| | | this.Height = Application.GetRealHeight(CommonFormResouce.Row_Height); |
| | | this.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; |
| | | frameLayout.AddChidren(this); |
| | | |
| | | var accountBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(69), |
| | | Width = Application.GetMinRealAverage(Button_Height), |
| | | Height = Application.GetMinRealAverage(Button_Height), |
| | | Width = this.GetPictrueRealSize(Button_Height), |
| | | Height = this.GetPictrueRealSize(Button_Height), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Account/Account.png" |
| | | }; |
| | | accountFL.AddChidren(accountBtn); |
| | | this.AddChidren(accountBtn); |
| | | |
| | | AccountET = new EditText() |
| | | { |
| | | X = Application.GetRealWidth(222), |
| | | X = Application.GetRealWidth(193), |
| | | Width = Application.GetRealWidth(700), |
| | | Height = Application.GetRealHeight(Button_Height), |
| | | Gravity = Gravity.CenterVertical, |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize |
| | | }; |
| | | accountFL.AddChidren(AccountET); |
| | | this.AddChidren(AccountET); |
| | | |
| | | accountLine = new Button() |
| | | { |
| | |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | accountFL.AddChidren(accountLine); |
| | | this.AddChidren(accountLine); |
| | | |
| | | AccountET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | public class EmailForgotRowForm : FrameLayout |
| | | public class EmailForgotRowForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// 账号输入控件 |
| | |
| | | } |
| | | } |
| | | |
| | | public class VerificationCodeRowForm : FrameLayout |
| | | public class VerificationCodeRowForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// Button_Height |
| | |
| | | var codeBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(29), |
| | | Width = Application.GetMinRealAverage(Button_Height), |
| | | Height = Application.GetMinRealAverage(Button_Height), |
| | | Width = this.GetPictrueRealSize(Button_Height), |
| | | Height = this.GetPictrueRealSize(Button_Height), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Account/Code.png" |
| | | }; |
| | |
| | | } |
| | | } |
| | | |
| | | public class PwdRowForm : FrameLayout |
| | | public class PwdRowForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// PasswrodET |
| | |
| | | var passwordBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(29), |
| | | Width = Application.GetMinRealAverage(Button_Height), |
| | | Height = Application.GetMinRealAverage(Button_Height), |
| | | Width = this.GetPictrueRealSize(Button_Height), |
| | | Height = this.GetPictrueRealSize(Button_Height), |
| | | Gravity=Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Account/Password.png" |
| | | }; |
| | |
| | | } |
| | | } |
| | | |
| | | public class PwdLoginRowForm : FrameLayout |
| | | public class PwdLoginRowForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// PasswrodET |
| | |
| | | /// <param name="y"></param> |
| | | public void Init(FrameLayout frameLayout, int x, int y, string password = "") |
| | | { |
| | | var pwdFL = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(x), |
| | | Y = Application.GetRealHeight(y), |
| | | Width = Application.GetRealWidth(CommonFormResouce.Row_Width), |
| | | Height = Application.GetRealHeight(CommonFormResouce.Row_Height), |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor |
| | | }; |
| | | frameLayout.AddChidren(pwdFL); |
| | | this.X = Application.GetRealWidth(x); |
| | | this.Y = Application.GetRealHeight(y); |
| | | this.Width = Application.GetRealWidth(CommonFormResouce.Row_Width); |
| | | this.Height = Application.GetRealHeight(CommonFormResouce.Row_Height); |
| | | this.BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; |
| | | frameLayout.AddChidren(this); |
| | | |
| | | var passwordBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(69), |
| | | Width = Application.GetMinRealAverage(Button_Height), |
| | | Height = Application.GetMinRealAverage(Button_Height), |
| | | Width = this.GetPictrueRealSize(Button_Height), |
| | | Height = this.GetPictrueRealSize(Button_Height), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Account/Password.png" |
| | | }; |
| | | pwdFL.AddChidren(passwordBtn); |
| | | this.AddChidren(passwordBtn); |
| | | |
| | | PasswrodET = new EditText() |
| | | { |
| | |
| | | TextSize = CommonFormResouce.PlaceHolderTextSize, |
| | | SecureTextEntry = true |
| | | }; |
| | | pwdFL.AddChidren(PasswrodET); |
| | | this.AddChidren(PasswrodET); |
| | | |
| | | hidenPWDbtn = new Button() |
| | | { |
| | |
| | | UnSelectedImagePath = "Account/UnhidePwd.png", |
| | | IsSelected = true |
| | | }; |
| | | pwdFL.AddChidren(hidenPWDbtn); |
| | | this.AddChidren(hidenPWDbtn); |
| | | |
| | | hidenPWDbtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | Height = 1, |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor |
| | | }; |
| | | pwdFL.AddChidren(pwdLine); |
| | | this.AddChidren(pwdLine); |
| | | |
| | | PasswrodET.FoucsChanged += Text_FoucesChangeEvent; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public class PwdForForgetRowForm : FrameLayout |
| | | public class PwdForForgetRowForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// PasswrodET |
| | |
| | | } |
| | | } |
| | | |
| | | public class CodeForRegisterRowForm : FrameLayout |
| | | public class CodeForRegisterRowForm : FrameLayoutBase |
| | | { |
| | | /// <summary> |
| | | /// Button_Height |
| | |
| | | /// <summary> |
| | | /// sendCode |
| | | /// </summary> |
| | | public Button SendCodeBtn; |
| | | public NormalViewControl SendCodeBtn; |
| | | /// <summary> |
| | | /// VerificationCodeET |
| | | /// </summary> |
| | |
| | | var codeBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(29), |
| | | Width = Application.GetMinRealAverage(Button_Height), |
| | | Height = Application.GetMinRealAverage(Button_Height), |
| | | Width = this.GetPictrueRealSize(Button_Height), |
| | | Height = this.GetPictrueRealSize(Button_Height), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Account/Code.png" |
| | | }; |
| | |
| | | }; |
| | | codeFL.AddChidren(VerificationCodeET); |
| | | |
| | | SendCodeBtn = new Button() |
| | | SendCodeBtn = new NormalViewControl(300, 127, true) |
| | | { |
| | | X = Application.GetRealWidth(CommonFormResouce.Row_Width - 300), |
| | | Width = Application.GetRealWidth(300), |
| | | Height = Application.GetRealHeight(127), |
| | | Gravity = Gravity.CenterVertical, |
| | | TextID = R.MyInternationalizationString.SendVerificationCode, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | BackgroundColor = ZigbeeColor.Current.GXCButtonDisableColor, |
| | | SelectedBackgroundColor=ZigbeeColor.Current.GXCButtonSelectedColor, |
| | | Enable = false, |
| | | IsSelected = false, |
| | | BackgroundColor = 0xFFFEBCA9, |
| | | CanClick = false, |
| | | Radius=(uint)Application.GetRealHeight(12), |
| | | IsBold=true, |
| | | TextSize=CommonFormResouce.TextSize |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// TimeOut |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void TimeOut(object sender, System.Timers.ElapsedEventArgs e) |
| | | { |
| | | var span = DateTime.Now - dateBegin; |
| | | if (span.TotalSeconds <= 61) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | SendCodeBtn.Text = Convert.ToInt16(60 - span.TotalSeconds) + "s" + Language.StringByID(R.MyInternationalizationString.SendVerificationCodeAgain); |
| | | SendCodeBtn.Enable = SendCodeBtn.IsSelected = false; |
| | | SendCodeBtn.BackgroundColor = ZigbeeColor.Current.GXCClearColor; |
| | | SendCodeBtn.SelectedBackgroundColor= ZigbeeColor.Current.GXCClearColor; |
| | | SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextBlackColor; |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | SendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode; |
| | | SendCodeBtn.BackgroundColor = ZigbeeColor.Current.GXCButtonDisableColor; |
| | | SendCodeBtn.SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor; |
| | | SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextWhiteColor; |
| | | SendCodeBtn.Enable = SendCodeBtn.IsSelected = true; |
| | | t.Stop(); |
| | | t.Close(); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// TimeBegin |
| | | /// </summary> |
| | | public void TimeBegin() |
| | | { |
| | | t.Interval = 1000; |
| | | t.AutoReset = true; |
| | | t.Enabled = true; |
| | | t.Elapsed += TimeOut; |
| | | //启动计时器倒计时-60s |
| | | t.Start(); |
| | | dateBegin = DateTime.Now; |
| | | SendCodeBtn.BackgroundColor = UserCenterColor.Current.White; |
| | | SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextBlackColor; |
| | | |
| | | HdlThreadLogic.Current.RunThread(() => |
| | | { |
| | | //后重发 |
| | | string txtValue = Language.StringByID(R.MyInternationalizationString.SendVerificationCodeAgain); |
| | | int timeOut = 60; |
| | | while (timeOut > 0 && SendCodeBtn.Parent != null) |
| | | { |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | SendCodeBtn.Text = timeOut + "s" + txtValue; |
| | | }); |
| | | timeOut--; |
| | | System.Threading.Thread.Sleep(1000); |
| | | } |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | SendCodeBtn.TextID = R.MyInternationalizationString.SendVerificationCode; |
| | | SendCodeBtn.BackgroundColor = 0xFFFC744B; |
| | | SendCodeBtn.TextColor = ZigbeeColor.Current.GXCTextWhiteColor; |
| | | SendCodeBtn.CanClick = true; |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |