| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Net; |
| | | using System.Text; |
| | | using HDL_ON.DAL; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | namespace HDL_ON |
| | | { |
| | | public static class MainPage |
| | | { |
| | | public static FrameLayout BaseView { get; internal set; } |
| | | |
| | | //public static PageLayout MainPageView { get; internal set; } |
| | | |
| | | public static bool DisplayCompleted = false; |
| | | |
| | | public static UserInfo LoginUser; |
| | | |
| | | public static List<string> LocationFiles; |
| | | |
| | | public static string VersionString = "3.01205"; |
| | | |
| | | /// <summary> |
| | | /// 公司代码 |
| | |
| | | BaseView = Application.MainPage; |
| | | Application.MainPage.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | |
| | | //MainPageView = new PageLayout() { |
| | | // IsShowPoint = false, |
| | | //}; |
| | | //BaseView.AddChidren(MainPageView); |
| | | |
| | | var loginBaseView = new UI1Login.LoginBaseView(); |
| | | BaseView.AddChidren(loginBaseView); |
| | | var fisrtView = new UI1Login.LoginPage(); |
| | | 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(); |
| | | |
| | | fisrtView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | loginBaseView.AddChidren(fisrtView); |
| | | fisrtView.LoadView(); |
| | | |
| | | //HDL_ON |
| | | } |
| | | else |
| | | { |
| | | //跳转页面---- |
| | | var ss = new UI.UserPage(); |
| | | BaseView.AddChidren(ss); |
| | | ss.LoadPage(); |
| | | } |
| | | } |
| | | catch |
| | | { |