From 7ee9224f4779efc78bfc8130e518e7d123864d47 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 11 四月 2023 11:42:38 +0800 Subject: [PATCH] 修复退出登录,挤下线卡死问题 --- HDL_ON/UI/MainPage.cs | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index 397b590..8c30533 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -211,7 +211,10 @@ /// </summary> public static void GoLoginPage(UserInfo userInfo = null) { - BaseView.RemoveAll(); + for (int i = 0; i < BaseView.ChildrenCount; i++) + { + BaseView.GetChildren(i).RemoveFromParent(); + } BaseView.BackgroundColor = CSS_Color.BackgroundColor; var fisrtView = new UI.UI1Login.LoginPage(); fisrtView.BackgroundColor = CSS_Color.MainBackgroundColor; @@ -226,7 +229,11 @@ /// <param name="pageShowEvent">涓婚〉鏄剧ず涔嬪悗瑙﹀彂鐨勪簨浠�(娌℃湁浣忓畢鐨勮瘽,鍒欎笉浼氳Е鍙�)</param> public static void GoUserPage(bool downloadData, bool isFirstOpen = false, Action pageShowEvent = null) { - BaseView.RemoveAll(); + + for (int i = 0; i < BaseView.ChildrenCount; i++) + { + BaseView.GetChildren(i).RemoveFromParent(); + } #region 鍚庨��浜嬩欢 BasePageView = new PageLayout(); BasePageView.ScrollEnabled = false; -- Gitblit v1.8.0