| | |
| | | /// <param name="account">登陆账号</param>
|
| | | public void ShowForm(string account = "")
|
| | | {
|
| | | if (Config.Instance.IsLogin == true)
|
| | | if (account == string.Empty)
|
| | | {
|
| | | return;
|
| | | //使用上一次登陆的账号
|
| | | account = Common.Config.Instance.Account;
|
| | | }
|
| | | CommonPage.Instance.IsDrawerLockMode = true;
|
| | | this.Tag = "Login";
|
| | |
| | | var btnTiyan = new NormalViewControl(300, 100, true);
|
| | | btnTiyan.Y = btnLoginByCode.Y;
|
| | | btnTiyan.TextAlignment = TextAlignment.Center;
|
| | | btnTiyan.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnTiyan.TextColor = UserCenterColor.Current.TextOrangeColor;
|
| | | btnTiyan.TextSize = 12;
|
| | | btnTiyan.Gravity = Gravity.CenterHorizontal;
|
| | | btnTiyan.Text = "游客体验";
|
| | | btnTiyan.TextID = R.MyInternationalizationString.uExperienceAccount;
|
| | | frameMidBack.AddChidren(btnTiyan);
|
| | | btnTiyan.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | |
| | | {
|
| | | this.RemoveFromParent();
|
| | | CommonPage.Instance.RemoveViewByTag("Login");
|
| | | UserPage.Instance.Fresh();
|
| | | UserPage.Instance.ReFreshControl();
|
| | | });
|
| | | });
|
| | | };
|
| | |
| | | //字体总宽度
|
| | | int fontWidth = 0;
|
| | | int btnWidth = 0;
|
| | | #if Android
|
| | |
|
| | | //特殊的误差值
|
| | | int speceilValue = Application.GetRealWidth(20);
|
| | | #endif
|
| | | #if iOS
|
| | | //特殊的误差值
|
| | | int speceilValue = Application.GetRealWidth(10);
|
| | | #endif
|
| | | int speceilValue = ControlCommonResourse.TwoTextSpace;
|
| | |
|
| | | //我已阅读并同意
|
| | | var btnMsg1 = new NormalViewControl(100, 90, true);
|
| | | btnMsg1.Gravity = Gravity.CenterVertical;
|
| | |
| | | HomePage.Instance.ShowLoginLoadView();
|
| | | });
|
| | | var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
|
| | | var homes = await House.GetHomeLists();
|
| | | var homes = await HdlResidenceLogic.Current.GetHomeListsFromDb();
|
| | | //刷新个人中心的内存及线程
|
| | | await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
|
| | | //启动ZigBee
|
| | |
| | | {
|
| | | this.RemoveFromParent();
|
| | | CommonPage.Instance.RemoveViewByTag("Login");
|
| | | UserPage.Instance.Fresh();
|
| | | UserPage.Instance.ReFreshControl();
|
| | | });
|
| | | }
|
| | | else
|
| | |
| | | var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
|
| | | var revertData = responseDataObj;
|
| | | //标记上一次是不是同一个账号登陆
|
| | | UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
|
| | | Config.Instance.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
|
| | | Config.Instance.Account = revertData.Account;
|
| | | Config.Instance.MD5PWD = revertData.MD5PWD;
|
| | | Config.Instance.Guid = revertData.Guid;
|
| | |
| | | var revertData = responseDataObj;
|
| | | Config.ReFresh();
|
| | | //标记上一次是不是同一个账号登陆
|
| | | UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
|
| | | Config.Instance.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
|
| | | Config.Instance.Account = revertData.Account;
|
| | | Config.Instance.Password = i_psw;
|
| | | Config.Instance.MD5PWD = revertData.MD5PWD;
|
| | |
| | | Config.Instance.Save();
|
| | |
|
| | | var resultRegID = await CommonPage.Instance.PushRegID();
|
| | | var homes = await House.GetHomeLists();
|
| | | var homes = await HdlResidenceLogic.Current.GetHomeListsFromDb();
|
| | | //刷新个人中心的内存及线程
|
| | | await UserCenterLogic.InitUserCenterMenmoryAndThread();
|
| | | //启动ZigBee
|
| | |
| | | CommonPage.Loading.Hide();
|
| | | this.RemoveFromParent();
|
| | | CommonPage.Instance.RemoveViewByTag("Login");
|
| | | UserPage.Instance.Fresh();
|
| | | UserPage.Instance.ReFreshControl();
|
| | | });
|
| | | return;
|
| | | }
|