From 1a4b95a7ebef71838bd3eda2c22056bbf0db65ec Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 10 一月 2020 16:39:54 +0800
Subject: [PATCH] 2019阶段备份
---
HDL_ON/UI/MainPage.cs | 56 ++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 46005fc..2595cca 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -8,6 +8,7 @@
public static class MainPage
{
public static FrameLayout BaseView { get; internal set; }
+ public static PageLayout BasePageView { get; set; }
public static bool DisplayCompleted = false;
@@ -15,7 +16,7 @@
public static List<string> LocationFiles;
- public static string VersionString = "3.01205";
+ public static string VersionString = "1.0103";
/// <summary>
/// 鍏徃浠g爜
@@ -39,33 +40,60 @@
Application.MainPage.BackgroundColor = CSS_Color.MainBackgroundColor;
- Log("1");
LoginUser = Newtonsoft.Json.JsonConvert.DeserializeObject<UserInfo>(System.Text.Encoding.UTF8.GetString(MyIO.FileUtils.ReadFile("Register_File")));
- Log("2");
//鍒ゆ柇闇�涓嶉渶瑕佺櫥褰曪紝鏈夋病鏈夌櫥褰曪紝鎴栬�呯櫥褰曟槸鍚﹁繃鏈燂紝
if (LoginUser == null || !LoginUser.IsLogin)
{
- var fisrtView = new UI.UI1Login.LoginPage();
- fisrtView.BackgroundColor = CSS_Color.MainBackgroundColor;
- BaseView.AddChidren(fisrtView);
- fisrtView.LoadView();
-
+ GoLoginPage();
}
else
{
- //璺宠浆椤甸潰----
- var ss = new UI.UserPage();
- BaseView.AddChidren(ss);
- ss.LoadPage();
+ GoUserPage();
}
}
- catch
+ catch (Exception ex)
{
-
+ MainPage.Log("root erorr : " + ex.Message);
}
}
/// <summary>
+ /// 杩涘叆鐧诲綍鐣岄潰
+ /// </summary>
+ public static void GoLoginPage(string account ="")
+ {
+ BaseView.RemoveAll();
+
+ var fisrtView = new UI.UI1Login.LoginPage();
+ fisrtView.BackgroundColor = CSS_Color.MainBackgroundColor;
+ BaseView.AddChidren(fisrtView);
+ fisrtView.LoadView(account);
+ }
+
+ /// <summary>
+ /// 杩涘叆涓婚〉
+ /// </summary>
+ public static void GoUserPage()
+ {
+ BaseView.RemoveAll();
+ BasePageView = new PageLayout();
+ BaseView.AddChidren(BasePageView);
+
+ //璺宠浆椤甸潰----
+ var userPage = new UI.UserPage();
+ BasePageView.AddChidren(userPage);
+ userPage.LoadPage();
+
+
+ BasePageView.PageChange += (sender, e) => {
+ while (e < BasePageView.ChildrenCount - 1)
+ {
+ BasePageView.GetChildren(BasePageView.ChildrenCount - 1).RemoveFromParent();
+ }
+ };
+ }
+
+ /// <summary>
/// 鑷畾涔夋棩蹇楄緭鍑�
/// </summary>
public static void Log(string msg)
--
Gitblit v1.8.0