old mode 100755
new mode 100644
| | |
| | | using Shared.Phone.UserView; |
| | | using System.Net.Http; |
| | | using Shared.Phone.Device.CommonForm; |
| | | using Com.Tencent.MM.Sdk.Openapi; |
| | | |
| | | namespace Shared.Phone.Device.Account |
| | | { |
| | |
| | | /// 密码 |
| | | /// </summary> |
| | | private string password; |
| | | /// <summary> |
| | | /// wechat |
| | | /// </summary> |
| | | private Button wechatBtn; |
| | | /// <summary> |
| | | /// qq |
| | | /// </summary> |
| | | private Button qqBtn; |
| | | |
| | | |
| | | #endregion |
| | |
| | | Width = Application.GetRealWidth(942), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, |
| | | Radius = (uint)Application.GetRealHeight(30) |
| | | Radius = (uint)Application.GetRealHeight(17) |
| | | }; |
| | | midFrameLayout.AddChidren(accountPwdFL); |
| | | |
| | |
| | | loginByCodeBtn = new Button() |
| | | { |
| | | X=Application.GetRealWidth(98), |
| | | Y = Application.GetRealHeight(1431), |
| | | Y = Application.GetRealHeight(1466), |
| | | Width = Application.GetRealWidth(300), |
| | | Height = Application.GetRealHeight(49), |
| | | TextID = R.MyInternationalizationString.LoginByCode, |
| | |
| | | registerBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(738), |
| | | Y = Application.GetRealHeight(1431), |
| | | Y = Application.GetRealHeight(1466), |
| | | Width = Application.GetRealWidth(244), |
| | | Height = Application.GetRealHeight(49), |
| | | TextID = R.MyInternationalizationString.Register, |
| | |
| | | TextSize = CommonFormResouce.loginTextSize |
| | | }; |
| | | midFrameLayout.AddChidren(registerBtn); |
| | | |
| | | wechatBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(395), |
| | | Y = Application.GetRealHeight(1737), |
| | | Width = Application.GetMinRealAverage(115), |
| | | Height = Application.GetMinRealAverage(115), |
| | | UnSelectedImagePath = "Account/Wechat.png" |
| | | }; |
| | | midFrameLayout.AddChidren(wechatBtn); |
| | | |
| | | qqBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(567), |
| | | Y = Application.GetRealHeight(1737), |
| | | Width = Application.GetMinRealAverage(115), |
| | | Height = Application.GetMinRealAverage(115), |
| | | UnSelectedImagePath = "Account/QQ.png" |
| | | }; |
| | | midFrameLayout.AddChidren(qqBtn); |
| | | |
| | | #endregion |
| | | |
| | |
| | | registerBtn.MouseUpEventHandler += Register; |
| | | //忘记密码 |
| | | forgotPasswordBtn.MouseUpEventHandler += ForgetPWD_MouseUpEvent; |
| | | |
| | | //wechat |
| | | wechatBtn.MouseUpEventHandler += LoginByWechat; |
| | | //qq |
| | | qqBtn.MouseUpEventHandler += LoginByQQ; |
| | | } |
| | | |
| | | #endregion |
| | |
| | | /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param> |
| | | private void LoginByCode(object sender,MouseEventArgs mouseEventArgs) |
| | | { |
| | | this.RemoveFromParent(); |
| | | //this.RemoveFromParent(); |
| | | var loginByCodePage = new AccountLoginByCode(); |
| | | CommonPage.Instance.AddChidren(loginByCodePage); |
| | | loginByCodePage.Show(); |
| | | } |
| | | IWXAPI api; |
| | | /// <summary> |
| | | /// wechat登录 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void LoginByWechat(object sender,MouseEventArgs mouseEventArgs) |
| | | { |
| | | var req = new SendAuth.Req { Scope = "snsapi_userinfo", State = "ZigbeeApp" }; |
| | | api.SendReq(req); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// qq登录 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="mouseEventArgs"></param> |
| | | private void LoginByQQ(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | private void Pwd_TextChange(object sender,string mouseEventArgs) |
| | | { |
| | | loginErrorBtn.Text = ""; |
| | | if (1 <= pwdRow.PasswrodET.Text.Trim().Length && pwdRow.PasswrodET.Text.Trim().Length <= 16 && phoneRow.AccountET.Text.Trim().Length > 0) |
| | | if (1 <= pwdRow.PasswrodET.Text.Trim().Length && pwdRow.PasswrodET.Text.Trim().Length <= 16 && (phoneRow.AccountET.Text.Trim().Length > 0 || emailRow.AccountET.Text.Trim().Length>0)) |
| | | { |
| | | loginBtn.Enable = loginBtn.IsSelected = true; |
| | | } |