xm
2021-11-24 a448538f9279d76158bd010e696e7012c0696439
HDL_ON/UI/MainPage.cs
@@ -26,14 +26,14 @@
    /// <summary>
    /// 版本号
    /// </summary>
    public static string VersionString = "1.3.1103";
    public static string VersionString = "1.3.1123";
    ///// <summary>
    ///// 客户端类型
    ///// </summary>
    //public static string ClientType = APIClientType.HDL_ON_PRO.ToString();
    /// <summary>
    ///
    ///
    /// </summary>
    public static Entity.CityInfo cityInfo = new Entity.CityInfo();
    /// <summary>
@@ -86,84 +86,8 @@
    /// </summary>
    public static bool Increase
    {
        /// <summary>
        /// BaseView
        /// </summary>
        public static FrameLayout BaseView { get; internal set; }
        /// <summary>
        /// BasePageView
        /// </summary>
        public static PageLayout BasePageView { get; set; }
        /// <summary>
        /// 用户控制父容器
        /// </summary>
        public static UserPage UserBasePage;
        /// <summary>
        /// 版本号
        /// </summary>
        public static string VersionString = "1.3.1123";
        ///// <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 Action RefreshAir;
        /// <summary>
        /// 回退页面action 没有需要可以不用
        /// </summary>
        public static Action ReturnRefreshAction;
        /// <summary>
        /// 无登录模式
        /// </summary>
        public static bool NoLoginMode = false;
        /// <summary>
        /// 网络连接状态
        /// 0:无网络
        /// </summary>
        public static int InternetStatus = 2;
        /// <summary>
        /// 是否进入后台
        /// </summary>
        public static bool IsEnterBackground = false;
        /// <summary>
        /// 当前分页索引
        /// 0:收藏
        /// 1:分类
        /// 2:智能
        /// 3:个人
        /// </summary>
        public static int CurPageIndex = 9999;
        ///// <summary>
        ///// 公司代码
        ///// 预留第三方定制标记
        ///// 0:HDL
        ///// </summary>
        //public static int Company = 0;
        /// <summary>
        /// 右滑后退提示按钮
        /// </summary>
        public static Button BtnBackIcon;
        /// <summary>
        /// 后退右滑了多少距离,超过一定距离才触发后退事件
        /// </summary>
        public static int StartX = 0;
        /// <summary>
        /// 是否全面屏手机
        /// </summary>
        public static bool Increase
        {
            get
            {
      get
      {
#if __IOS__
                if (Application.PhoneType>10)
                {
@@ -222,8 +146,6 @@
        BaseView = Application.MainPage;
        Application.MainPage.BackgroundColor = CSS_Color.MainBackgroundColor;
        //#region 测试
        //var ddd = new UI.test.TestDialog();
        //ddd.InitView();
@@ -420,30 +342,30 @@
        {
          Entity.FunctionList.List.Clear();
          Entity.SpatialInfo.CurrentSpatial.Clear();
                ///等待获取住宅信息
                Application.RunOnMainThread(() =>
               {
                if (waitPage != null)
                {
                  waitPage.RemoveFromParent();
                  waitPage = null;
                }
          ///等待获取住宅信息
          Application.RunOnMainThread(() =>
          {
            if (waitPage != null)
            {
              waitPage.RemoveFromParent();
              waitPage = null;
            }
                      //跳转页面----
                      UserBasePage = new UserPage();
                BasePageView.AddChidren(UserBasePage);
                UserBasePage.LoadPage();
                BasePageView.PageIndex = 0;
            //跳转页面----
            UserBasePage = new UserPage();
            BasePageView.AddChidren(UserBasePage);
            UserBasePage.LoadPage();
            BasePageView.PageIndex = 0;
                if (isFirstOpen)
                {
                        //启动密码验证
                        new AppUnlockPage().LoadPage(isFirstOpen);
                }
                      //主页加载完成,回调事件
                      pageShowEvent?.Invoke();
                pageShowEvent = null;
              });
            if (isFirstOpen)
            {
              //启动密码验证
              new AppUnlockPage().LoadPage(isFirstOpen);
            }
            //主页加载完成,回调事件
            pageShowEvent?.Invoke();
            pageShowEvent = null;
          });
        }
        catch (Exception ex)
        {
@@ -452,14 +374,14 @@
        finally
        {
          Application.RunOnMainThread(() =>
                {
                if (downloadData)
                {
                  DB_ResidenceData.Instance.EixtAccount();
                        ///初始化app数据
                        Common.ApiUtlis.Ins.DownloadData();
                };
              });
          {
            if (downloadData)
            {
              DB_ResidenceData.Instance.EixtAccount();
              ///初始化app数据
              Common.ApiUtlis.Ins.DownloadData();
            };
          });
        }
      }).Start();
@@ -479,7 +401,7 @@
        if (BasePageView == null || BasePageView.ChildrenCount <= 1)
        {
          result = 2;//无法再后退,可以执行退到桌面
              }
        }
        if (BasePageView.ChildrenCount > 1)
        {
          int index = BasePageView.ChildrenCount - 1;
@@ -488,14 +410,14 @@
          {
            var loading = view as Loading;
            if (loading.CurStatus == false)//有一些等待界面隐藏了,但是没有移除到,需要先移除
                  {
            {
              loading.RemoveFromParent();
              result = LoadEvent_BackAction();
            }
            else
            {
              result = 1;//正在等待某些操作
                  }
            }
          }
          else
          {
@@ -522,7 +444,7 @@
        else
        {
          result = 2;//无法再后退,可以执行退到桌面
              }
        }
      });
      return result;
    }
@@ -534,11 +456,11 @@
    public static void Log(string msg)
    {
#if DEBUG
      Console.WriteLine(msg);
            Console.WriteLine(msg);
#endif
    }
  }
}
}