HDL Home App 第二版本 旧平台金堂用 正在使用
hxb
2022-08-30 25429f085093d89d543a0b90e30d0d62d1b7dac9
ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -40,7 +40,7 @@
        /// <summary>
        /// 用户主体界面(中间部分)
        /// </summary>
        private FrameLayout bodyFrameView = null;
        private NormalFrameLayout bodyFrameView = null;
        /// <summary>
        /// 界面缓存(2020.05.07:切换时不移除界面,直接隐藏)
        /// </summary>
@@ -52,7 +52,15 @@
        /// <summary>
        /// 如果设置此变量为true,则在单击底部菜单时,强制无条件全部刷新
        /// </summary>
        public bool RefreshForm = false;
        public bool RefreshAllForm = false;
        /// <summary>
        /// 刷新主页
        /// </summary>
        public bool RefreshMainPageForm = false;
        /// <summary>
        /// 刷新分类
        /// </summary>
        public bool RefreshCategoryForm = false;
        #endregion
@@ -66,7 +74,11 @@
            BackgroundColor = Shared.Common.ZigbeeColor.Current.MainColor;
            Shared.Application.LocationAction += (lon, lat) =>
            {
                Login.AccountLogic.Instance.ReceiveAppLatAndLon(lon.ToString(), lat.ToString());
                //GPS坐标转成高德坐标
                double out_lng, out_lat;
                HdlGpsLocationConvertLogic.Current.WGS84_to_GCJ02(lon, lat, out out_lng, out out_lat);
                //上报经纬度
                Login.AccountLogic.Instance.ReceiveAppLatAndLon(out_lng.ToString(), out_lat.ToString());
            };
        }
@@ -80,14 +92,14 @@
                return;
            }
#if iOS
            if (Shared.Application.PhoneType >= 10)
            if (Shared.Application.IsFullScreen == true)
            {
                //高版本的苹果机型,屏幕底部会有一个黑色的杠
                ControlCommonResourse.BottomFrameHeight = Application.GetRealHeight(242);
                ControlCommonResourse.BottomFrameHeight = Application.GetRealHeight(180);
            }
#endif
            //用户主体界面(中间部分)
            this.bodyFrameView = new FrameLayout();
            this.bodyFrameView = new NormalFrameLayout();
            bodyFrameView.Height = this.Height - UserCenter.ControlCommonResourse.BottomFrameHeight;
            bodyFrameView.BackgroundColor = Shared.Common.ZigbeeColor.Current.MainColor;
            this.AddChidren(bodyFrameView);
@@ -229,20 +241,20 @@
        /// <param name="handClick">是否是手动点击</param>
        private void BottomMenuClickEvent(MenuSelectEnum selectEnum, bool handClick)
        {
            if (this.RefreshForm == false && selectEnum == this.nowSelectMenu && handClick == true)
            if (this.RefreshAllForm == false && selectEnum == this.nowSelectMenu && handClick == true)
            {
                //手动点击同一个菜单,则不做处理
                return;
            }
            //如果强制指定刷新界面的话
            if (this.RefreshForm == true)
            if (this.RefreshAllForm == true)
            {
                //全部刷新
                this.listForm = new List<EditorCommonForm>() { null, null, null };
                this.bodyFrameView.RemoveAll();
                this.RefreshForm = false;
                this.RefreshAllForm = false;
            }
            this.nowSelectMenu = selectEnum;
@@ -252,6 +264,13 @@
            {
                //左滑菜单可
                CommonPage.Instance.IsDrawerLockMode = false;
                if (this.RefreshMainPageForm == true)
                {
                    //刷新主页
                    listForm[0]?.CloseForm();
                    listForm[0] = null;
                    this.RefreshMainPageForm = false;
                }
                if (listForm[0] == null)
                {
                    var form = new MainPage.HomeMainPageForm();
@@ -265,6 +284,13 @@
            {
                //左滑菜单不可
                CommonPage.Instance.IsDrawerLockMode = true;
                if (this.RefreshCategoryForm == true)
                {
                    //刷新分类
                    listForm[1]?.CloseForm();
                    listForm[1] = null;
                    this.RefreshCategoryForm = false;
                }
                if (listForm[1] == null)
                {
                    var form = new Category.CategoryMainForm();
@@ -327,7 +353,7 @@
        public void ShowCategoryAutoListForm()
        {
            //关闭全部界面,直到主页为止
            UserCenterLogic.CloseAllOpenForm();
            UserCenterLogic.CloseAllOpenForm(null, false);
            //强制显示自动化列表界面
            UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 2;