From ccdff82fac4bcc1067ec806ade5ae897f1214f4d Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 01 四月 2021 14:41:53 +0800
Subject: [PATCH] 异常捕获
---
HDL_ON/UI/MainPage.cs | 40 +++++++++++++++++++++++++++-------------
1 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 2d35284..c5a62b3 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -18,15 +18,9 @@
/// </summary>
public static PageLayout BasePageView { get; set; }
/// <summary>
- /// DisplayCompleted
- /// </summary>
- public static bool DisplayCompleted = false;
-
- //public static UserInfo LoginUser;
- /// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string VersionString = "1.1.0223";
+ public static string VersionString = "1.2.0401";
///// <summary>
///// 瀹㈡埛绔被鍨�
///// </summary>
@@ -41,6 +35,10 @@
/// </summary>
public static Action RefreshAir;
/// <summary>
+ /// 鍥為��椤甸潰action 娌℃湁闇�瑕佸彲浠ヤ笉鐢�
+ /// </summary>
+ public static Action ReturnRefreshAction;
+ /// <summary>
/// 鏃犵櫥褰曟ā寮�
/// </summary>
public static bool NoLoginMode = false;
@@ -53,6 +51,14 @@
/// 鏄惁杩涘叆鍚庡彴
/// </summary>
public static bool IsEnterBackground = false;
+ /// <summary>
+ /// 褰撳墠鍒嗛〉绱㈠紩
+ /// 0:鏀惰棌
+ /// 1:鍒嗙被
+ /// 2:鏅鸿兘
+ /// 3:涓汉
+ /// </summary>
+ public static int CurPageIndex = 9999;
///// <summary>
///// 鍏徃浠g爜
@@ -184,19 +190,27 @@
waitPage.RemoveFromParent();
BaseView.RemoveAll();
BasePageView = new PageLayout();
- BasePageView.ScrollEnabled = false;
+ BasePageView.ScrollEnabled = true;
BasePageView.IsShowPoint = false;
BasePageView.PageChange = (sender, e) =>
{
if (e < BasePageView.ChildrenCount - 1)
{
- MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
- }
-
- while (e < BasePageView.ChildrenCount - 1)
- {
BasePageView.GetChildren(BasePageView.ChildrenCount - 1).RemoveFromParent();
}
+ try
+ {
+ ReturnRefreshAction?.Invoke();
+ ReturnRefreshAction = null;
+ }
+ catch (Exception ex)
+ {
+ Log($"鍚庨��浜嬩欢寮傚父:{ex.Message}");
+ }
+ //while (e < BasePageView.ChildrenCount - 1)
+ //{
+ // BasePageView.GetChildren(BasePageView.ChildrenCount - 1).RemoveFromParent();
+ //}
};
BasePageView.MouseDownEventHandler += (sender, e) =>
{
--
Gitblit v1.8.0