| | |
| | | { |
| | | public static class MainPage |
| | | { |
| | | /// <summary> |
| | | /// BaseView |
| | | /// </summary> |
| | | public static FrameLayout BaseView { get; internal set; } |
| | | /// <summary> |
| | | /// BasePageView |
| | | /// </summary> |
| | | public static PageLayout BasePageView { get; set; } |
| | | |
| | | /// <summary> |
| | | /// DisplayCompleted |
| | | /// </summary> |
| | | public static bool DisplayCompleted = false; |
| | | |
| | | public static UserInfo LoginUser; |
| | | |
| | | //public static UserInfo LoginUser; |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "1.0.0924"; |
| | | /// <summary> |
| | | /// 客户端类型 |
| | | /// </summary> |
| | | public static string ClientType = APIClientType.HDL_ON_PRO.ToString(); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public static Entity.CityInfo cityInfo = new Entity.CityInfo(); |
| | | /// <summary> |
| | | /// 天气刷新action |
| | |
| | | /// </summary> |
| | | public static bool IsRemote = false; |
| | | |
| | | /// <summary> |
| | | /// 公司代码 |
| | | /// 预留第三方定制标记 |
| | | /// 0:HDL |
| | | /// </summary> |
| | | public static int Company = 0; |
| | | ///// <summary> |
| | | ///// 公司代码 |
| | | ///// 预留第三方定制标记 |
| | | ///// 0:HDL |
| | | ///// </summary> |
| | | //public static int Company = 0; |
| | | |
| | | /// <summary> |
| | | /// 是否全面屏手机 |
| | |
| | | |
| | | //BusSocket.Start(); |
| | | //CommonPage.InitReceiveEvent(); |
| | | |
| | | LoginUser = Newtonsoft.Json.JsonConvert.DeserializeObject<UserInfo>(System.Text.Encoding.UTF8.GetString(FileUtils.ReadFile("UserInfo_File"))); |
| | | |
| | | //LoginUser = Newtonsoft.Json.JsonConvert.DeserializeObject<UserInfo>(System.Text.Encoding.UTF8.GetString(FileUtils.ReadFile("UserInfo_File"))); |
| | | //判断需不需要登录,有没有登录,或者登录是否过期, |
| | | if (LoginUser == null || !LoginUser.IsLogin) |
| | | if (UserInfo.Current == null || !UserInfo.Current.IsLogin) |
| | | { |
| | | GoLoginPage(LoginUser); |
| | | GoLoginPage(UserInfo.Current); |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <summary> |
| | | /// 进入登录界面 |
| | | /// </summary> |
| | | public static void GoLoginPage(UserInfo userInfo =null) |
| | | public static void GoLoginPage(UserInfo userInfo = null) |
| | | { |
| | | BaseView.RemoveAll(); |
| | | BaseView.BackgroundColor = CSS_Color.BackgroundColor; |
| | |
| | | #endif |
| | | } |
| | | |
| | | |
| | | } |
| | | } |