From 74a9ba8e9a2df9c39f9c2eb212a5ac889a055cd4 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 03 十二月 2019 10:47:51 +0800
Subject: [PATCH] 优化UI细节(请合并最新代码)
---
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