From 3a26f6025130dcaae4aa82ea19b16ad902450eb8 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 28 十一月 2019 11:43:47 +0800 Subject: [PATCH] 合并全部代码完成 --- ZigbeeApp/Shared/Phone/UserView/HomePage.cs | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs index 11eef73..be5e2ba 100755 --- a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs +++ b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs @@ -49,10 +49,9 @@ } }; - //*******寰呮敼***** - UserPage.Instance.Fresh(); if (Config.Instance.IsLogin) { + ShowLoginLoadView(); CommonPage.Loading.Start(); Action action = async () => { @@ -62,19 +61,18 @@ { new System.Threading.Thread(async () => { - //鍚姩ZigBee - ZigBee.Common.Application.Init(); //鐧诲綍鎴愬姛 - var homes = await House.GetHomeLists(); - + var homes = await House.GetHomeLists(); + //鍚姩ZigBee + ZigBee.Common.Application.Init(); //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼ await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); - Room.CanInitAllRoom = true; Room.InitAllRoom(); Application.RunOnMainThread(() => { + CommonPage.Instance.RemoveViewByTag("Login"); UserPage.Instance.Fresh(); CommonPage.Loading.Hide(); }); @@ -94,20 +92,19 @@ //鐧诲綍澶辫触锛屼篃鐩存帴杩涘叆涓婚〉 new System.Threading.Thread(async () => { - //鍚姩ZigBee - ZigBee.Common.Application.Init(); - //鐧诲綍鎴愬姛 - var homes = await House.GetHomeLists(); + var homes = await House.GetHomeLists(); + //鍚姩ZigBee + ZigBee.Common.Application.Init(); //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼ await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); - Room.CanInitAllRoom = true; Room.InitAllRoom(); Application.RunOnMainThread(() => { + CommonPage.Instance.RemoveViewByTag("Login"); UserPage.Instance.Fresh(); CommonPage.Loading.Hide(); }); @@ -127,6 +124,14 @@ } } + + public void ShowLoginLoadView() + { + var loginLoad = new LoginLoading { }; + CommonPage.Instance.AddChidren(loginLoad); + loginLoad.Show(); + } + /// <summary> /// Logins the by PWDA sync. /// </summary> -- Gitblit v1.8.0