| | |
| | | {
|
| | | btnTiyan.CanClick = false;
|
| | | //显示启动页
|
| | | HomePage.Instance.ShowLoginLoadView();
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //初始化全部体验数据
|
| | |
| | | var re = isBindAuthAsync(authStr);
|
| | | if (re)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //直接登录
|
| | | HomePage.Instance.ShowLoginLoadView();
|
| | | });
|
| | | ProgressBar.Show(Language.StringByID(R.MyInternationalizationString.Logining));
|
| | |
|
| | | var resultRegID = Shared.Common.CommonPage.Instance.PushRegID();
|
| | | var homes = HdlResidenceLogic.Current.GetHomeListsFromDb(false);
|
| | | //刷新个人中心的内存及线程
|
| | | UserCenterLogic.InitUserCenterMenmoryAndThread();
|
| | | bool result = UserCenterLogic.InitUserCenterMenmoryAndThread();
|
| | |
|
| | | //启动ZigBee
|
| | | ZigBee.Common.Application.Init();
|
| | |
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | ProgressBar.Close();
|
| | | this.RemoveFromParent();
|
| | | CommonPage.Instance.RemoveViewByTag("Login");
|
| | | UserPage.Instance.ReFreshControl();
|
| | | if (result == true)
|
| | | {
|
| | | //false:开启了调试功能
|
| | | UserPage.Instance.ReFreshControl();
|
| | | }
|
| | | });
|
| | | }
|
| | | else
|
| | |
| | | //Error 不能直接从服务器取,只能根据状态码逐一判断
|
| | | if (stateCodeStr == "SUCCESS")
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //显示启动页
|
| | | HomePage.Instance.ShowLoginLoadView();
|
| | | });
|
| | | //存储数据
|
| | | var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
|
| | | var revertData = responseDataObj;
|
| | |
| | | var resultRegID = CommonPage.Instance.PushRegID();
|
| | | var homes = HdlResidenceLogic.Current.GetHomeListsFromDb(false);
|
| | | //刷新个人中心的内存及线程
|
| | | UserCenterLogic.InitUserCenterMenmoryAndThread();
|
| | | bool result = UserCenterLogic.InitUserCenterMenmoryAndThread();
|
| | |
|
| | | //启动ZigBee
|
| | | ZigBee.Common.Application.Init();
|
| | |
|
| | |
| | | CommonPage.Loading.Hide();
|
| | | this.RemoveFromParent();
|
| | | CommonPage.Instance.RemoveViewByTag("Login");
|
| | | UserPage.Instance.ReFreshControl();
|
| | | if (result == true)
|
| | | {
|
| | | //false:开启了调试功能
|
| | | UserPage.Instance.ReFreshControl();
|
| | | }
|
| | | });
|
| | | return;
|
| | | }
|