黄学彪
2020-04-28 e22fdb94322e6cec38e5e4a9aec13d431a133fde
ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using Shared.Common;
using System.Text;
namespace Shared.Phone.UserView
{
    /// <summary>
@@ -113,8 +113,8 @@
        public Button homePageIMG = new Button
        {
            Y = Application.GetRealHeight(tabBarEnumIMG_Y),
            Height = Application.GetMinRealAverage(tabBarEnumIMG_Height),
            Width = Application.GetMinRealAverage(tabBarEnumIMG_Width),
            Height = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Height),
            Width = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Width),
            UnSelectedImagePath = "Navigation/Home.png",
            SelectedImagePath = "Navigation/HomeSelected.png",
            Gravity = Gravity.CenterHorizontal
@@ -150,8 +150,8 @@
        public Button categoryIMG = new Button
        {
            Y = Application.GetRealHeight(tabBarEnumIMG_Y),
            Height = Application.GetMinRealAverage(tabBarEnumIMG_Height),
            Width = Application.GetMinRealAverage(tabBarEnumIMG_Width),
            Height = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Height),
            Width = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Width),
            UnSelectedImagePath = "Navigation/Category.png",
            SelectedImagePath = "Navigation/CategorySelected.png",
            Gravity = Gravity.CenterHorizontal
@@ -187,8 +187,8 @@
        public Button settingIMG = new Button
        {
            Y = Application.GetRealHeight(tabBarEnumIMG_Y),
            Height = Application.GetMinRealAverage(tabBarEnumIMG_Height),
            Width = Application.GetMinRealAverage(tabBarEnumIMG_Width),
            Height = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Height),
            Width = UserCenter.HdlControlLogic.Current.GetPictrueRealSize(tabBarEnumIMG_Width),
            UnSelectedImagePath = "Navigation/Setting.png",
            SelectedImagePath = "Navigation/SettingSelected.png",
            Gravity = Gravity.CenterHorizontal
@@ -205,44 +205,44 @@
            SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
            Gravity = Gravity.CenterHorizontal,
            TextSize = 10
        };
        };
        #endregion
        #region 强制显示自动化界面
        /// <summary>
        /// 强制显示自动化列表界面
        /// <summary>
        /// 强制显示自动化列表界面
        /// </summary>
        public void ShowCategoryAutoListForm()
        {
            //关闭全部界面,直到主页为止
            UserCenter.UserCenterLogic.CloseAllOpenForm();
            //强制显示自动化列表界面
            UserCenter.UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 2;
            BottomEventHandler(Instance.categoryIMG, null);
        public void ShowCategoryAutoListForm()
        {
            //关闭全部界面,直到主页为止
            UserCenter.UserCenterLogic.CloseAllOpenForm();
            //强制显示自动化列表界面
            UserCenter.UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 2;
            BottomEventHandler(Instance.categoryIMG, null);
        }
        #endregion
        EventHandler<MouseEventArgs> BottomEventHandler = (sender, e) =>
        {
            if (sender == Instance.homePageIMG || sender == Instance.homePageName)
            {
                if (Instance.homePageName.IsSelected == true && e != null)
                {
                    //只有是手动点击的时候才处理
                    return;
                }
            {
                if (Instance.homePageName.IsSelected == true && e != null)
                {
                    //只有是手动点击的时候才处理
                    return;
                }
                Instance.BodyView.RemoveAll();
                //主页
                CommonPage.Instance.IsDrawerLockMode = false;
                Instance.homePageName.IsSelected = true;
                Instance.homePageIMG.IsSelected = true;
                Instance.categoryName.IsSelected = false;
                Instance.categoryIMG.IsSelected = false;
                Instance.settingName.IsSelected = false;
                Instance.homePageIMG.IsSelected = true;
                Instance.categoryName.IsSelected = false;
                Instance.categoryIMG.IsSelected = false;
                Instance.settingName.IsSelected = false;
                Instance.settingIMG.IsSelected = false;
                var home = new MainPage.HomeMainPageForm();
@@ -251,23 +251,23 @@
            }
            else if (sender == Instance.categoryIMG || sender == Instance.categoryName)
            {
                if (Instance.categoryName.IsSelected == true && e != null)
                {
                    //只有是手动点击的时候才处理
                    return;
                }
            {
                if (Instance.categoryName.IsSelected == true && e != null)
                {
                    //只有是手动点击的时候才处理
                    return;
                }
                Instance.BodyView.RemoveAll();
                //分类
                CommonPage.Instance.IsDrawerLockMode = true;
                Instance.categoryName.IsSelected = true;
                Instance.categoryIMG.IsSelected = true;
                Instance.homePageName.IsSelected = false;
                Instance.homePageIMG.IsSelected = false;
                Instance.settingName.IsSelected = false;
                Instance.categoryIMG.IsSelected = true;
                Instance.homePageName.IsSelected = false;
                Instance.homePageIMG.IsSelected = false;
                Instance.settingName.IsSelected = false;
                Instance.settingIMG.IsSelected = false;
                var category = new Category.CategoryMainForm { };
@@ -275,21 +275,21 @@
                category.ShowForm();
            }
            else if (sender == Instance.settingIMG || sender == Instance.settingName)
            {
                if (Instance.settingName.IsSelected == true && e != null)
                {
                    return;
                }
            {
                if (Instance.settingName.IsSelected == true && e != null)
                {
                    return;
                }
                Instance.BodyView.RemoveAll();
                //个人中心
                CommonPage.Instance.IsDrawerLockMode = true;
                Instance.settingName.IsSelected = true;
                Instance.settingIMG.IsSelected = true;
                Instance.homePageName.IsSelected = false;
                Instance.homePageIMG.IsSelected = false;
                Instance.categoryName.IsSelected = false;
                Instance.settingIMG.IsSelected = true;
                Instance.homePageName.IsSelected = false;
                Instance.homePageIMG.IsSelected = false;
                Instance.categoryName.IsSelected = false;
                Instance.categoryIMG.IsSelected = false;
                var form = new UserCenter.UserMain.UserMainForm();