From 1ebda09d954de4409c5a7f3ba3c3ee75626ec7c0 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 01 四月 2021 16:08:16 +0800
Subject: [PATCH] 2021-4-1-6
---
HDL_ON/UI/MainPage.cs | 55 +++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 41 insertions(+), 14 deletions(-)
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index f0f3cc5..55244e7 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.0114";
+ public static string VersionString = "1.2.0330";
///// <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爜
@@ -91,6 +97,12 @@
BaseView = Application.MainPage;
Application.MainPage.BackgroundColor = CSS_Color.MainBackgroundColor;
+
+ //#region 娴嬭瘯
+ //var ddd = new UI.test.TestDialog();
+ //ddd.InitView();
+ //return;
+ //#endregion
if (string.IsNullOrEmpty(OnAppConfig.Instance.LastLoginUserId))
{
@@ -165,7 +177,6 @@
addResidencePage.LoadView();
return;
}
-
new System.Threading.Thread(() =>
{
try
@@ -179,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) =>
{
@@ -203,11 +222,14 @@
};
BaseView.AddChidren(BasePageView);
+
//璺宠浆椤甸潰----
var UserBasePage = new UserPage();
BasePageView.AddChidren(UserBasePage);
UserBasePage.LoadPage();
BasePageView.PageIndex = 0;
+
+
if (isFirstOpen)
{
@@ -226,11 +248,16 @@
{
Application.RunOnMainThread(() =>
{
+
+
if (downloadData)
{
///鍒濆鍖朼pp鏁版嵁
Common.ApiUtlis.Ins.DownloadData();
};
+
+
+
});
}
}).Start();
--
Gitblit v1.8.0