From 9acd3887f1f8db40d59f991b1726a61aa7c7637c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 12 五月 2021 15:13:56 +0800
Subject: [PATCH] Merge branch 'CJL' into wxr4

---
 HDL_ON/UI/MainPage.cs |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index c10c1b8..bc607ef 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -20,7 +20,7 @@
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string VersionString = "1.2.0413";
+        public static string VersionString = "1.2.0428";
         ///// <summary>
         ///// 瀹㈡埛绔被鍨�
         ///// </summary>
@@ -346,12 +346,17 @@
             int result = 0;
             Application.RunOnMainThread(() =>
             {
-                if (BaseView.ChildrenCount>1)
+                if (BasePageView == null || BasePageView.ChildrenCount<=1 )
                 {
-                    var view = BaseView.GetChildren(BaseView.ChildrenCount - 1);
-                    if(view.GetType() == typeof(Loading))
+                    result = 2;//鏃犳硶鍐嶅悗閫�锛屽彲浠ユ墽琛岄��鍒版闈�
+                }
+                if (BasePageView.ChildrenCount > 1)
+                {
+                    int index = BasePageView.ChildrenCount - 1;
+                    var view = BasePageView.GetChildren(index);
+                    if (view.GetType() == typeof(Loading))
                     {
-                        var loading  = view as Loading;
+                        var loading = view as Loading;
                         if (loading.CurStatus == false)//鏈変竴浜涚瓑寰呯晫闈㈤殣钘忎簡锛屼絾鏄病鏈夌Щ闄ゅ埌锛岄渶瑕佸厛绉婚櫎
                         {
                             loading.RemoveFromParent();
@@ -362,22 +367,17 @@
                             result = 1;//姝e湪绛夊緟鏌愪簺鎿嶄綔
                         }
                     }
-                }
-                else
-                {
-                    if (BasePageView.ChildrenCount > 1)
+                    else
                     {
-                        int index = BasePageView.ChildrenCount - 1;
-                        var view = BasePageView.GetChildren(index);
                         if (view != null)
                         {
                             view.RemoveFromParent();
                         }
                     }
-                    else
-                    {
-                        result = 2;//鏃犳硶鍐嶅悗閫�锛屽彲浠ユ墽琛岄��鍒版闈�
-                    }
+                }
+                else
+                {
+                    result = 2;//鏃犳硶鍐嶅悗閫�锛屽彲浠ユ墽琛岄��鍒版闈�
                 }
             });
             return result;

--
Gitblit v1.8.0