From c9a987ced5454cfc6b9363eadcad038191706f5b Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期六, 12 十二月 2020 16:37:09 +0800
Subject: [PATCH] 2020-12-12 1.解锁设置优化

---
 HDL_ON/UI/MainPage.cs |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index dbc4eed..fdb0e3d 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -108,9 +108,8 @@
                     })
                     { IsBackground = true }.Start();
 
-                    GoUserPage();
-                    //鍚姩瀵嗙爜楠岃瘉
-                    new AppUnlockPage().LoadPage();
+                    GoUserPage(true);
+                  
 
                     ///鍒濆鍖朼pp鏁版嵁
                     InitializationData();
@@ -146,7 +145,8 @@
         /// <summary>
         /// 杩涘叆涓婚〉
         /// </summary>
-        public static void GoUserPage()
+        /// <param name="isFirstOpen">濡傛灉鏄涓�娆″惎鍔� 妫�娴嬫牎楠屽瘑鐮�</param>
+        public static void GoUserPage(bool isFirstOpen = false)
         {
             //鍔犺浇Loading鏁堟灉
             var waitPage = new Loading();
@@ -207,13 +207,20 @@
                         };
                         BaseView.AddChidren(BasePageView);
 
-                    //璺宠浆椤甸潰----
-                    var userPage = new UserPage();
+                        //璺宠浆椤甸潰----
+                        var userPage = new UserPage();
                         BasePageView.AddChidren(userPage);
                         userPage.LoadPage();
                         BasePageView.PageIndex = 0;
+
+                        if (isFirstOpen)
+                        {
+                            //鍚姩瀵嗙爜楠岃瘉
+                            new AppUnlockPage().LoadPage(isFirstOpen);
+                        }
                     });
-                }catch(Exception ex)
+                }
+                catch (Exception ex)
                 {
                     MainPage.Log($"GoUserPage : {ex.Message}");
                 }

--
Gitblit v1.8.0