| | |
| | | namespace Shared.Phone.UserView |
| | | { |
| | | /// <summary> |
| | | /// Home page. |
| | | /// Home page.第二版呀 |
| | | /// </summary> |
| | | public class HomePage : PageLayout |
| | | { |
| | |
| | | { |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | //启动ZigBee |
| | | ZigBee.Common.Application.Init(); |
| | | |
| | | //登录成功 |
| | | var homes = await House.GetHomeLists(); |
| | | |
| | | //刷新个人中心的内存及线程 |
| | | await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); |
| | | |
| | | Room.canInitAllRoom = true; |
| | | Room.CanInitAllRoom = true; |
| | | Room.InitAllRoom(); |
| | | |
| | | Application.RunOnMainThread(() => |
| | |
| | | //登录失败,也直接进入主页 |
| | | new System.Threading.Thread(async () => |
| | | { |
| | | //启动ZigBee |
| | | ZigBee.Common.Application.Init(); |
| | | |
| | | //登录成功 |
| | |
| | | //刷新个人中心的内存及线程 |
| | | await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); |
| | | |
| | | Room.canInitAllRoom = true; |
| | | Room.CanInitAllRoom = true; |
| | | Room.InitAllRoom(); |
| | | |
| | | Application.RunOnMainThread(() => |
| | |
| | | |
| | | var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString()); |
| | | var revertData = responseDataObj; |
| | | Config.Instance.UserID = revertData.UserID; |
| | | Config.Instance.MasterID = revertData.MainUserID; |
| | | Config.Instance.AccountType = revertData.UserType; |
| | | Config.Instance.Account = revertData.Account; |
| | | Config.Instance.Password = password;
|
| | | Config.Instance.MD5PWD = revertData.MD5PWD; |
| | | Config.Instance.Guid = revertData.Guid; |
| | | Config.Instance.MqttKey = revertData.MqttKey; |
| | | Config.Instance.LoginDateTime = DateTime.Now; |