黄学彪
2020-05-07 7f2d401e502bf89eea7404745c9ff7d103b37a63
整一个
15个文件已修改
10827 ■■■■ 已修改文件
ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs 10050 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/ListRoomViewFrom.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewaySearchListForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserView/HomePage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserView/UserPage.cs 577 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/R.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
Diff too large
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -182,7 +182,7 @@
            //目前不知道郭雪城的这个具体放在哪个的位置
            this.functionSceneAutoBodyView = new FrameLayout();
            functionSceneAutoBodyView.Y = frameSwitchBack.Bottom;
            functionSceneAutoBodyView.Height = Application.GetRealHeight(1423);
            functionSceneAutoBodyView.Height = bodyFrameLayout.Height - frameSwitchBack.Bottom;
            bodyFrameLayout.AddChidren(functionSceneAutoBodyView);
            //场景,功能,自动化的切换控件
@@ -334,7 +334,9 @@
            var dicGroupDevice = this.GetAllGroupDevice(room);
            if (dicGroupDevice.Count == 0)
            {
                this.ShowNoFunctionTip();
                //没有功能{0}请在个人中心--设备管理处添加
                string[] arryMsg = Language.StringByID(R.MyInternationalizationString.NoFunction).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
                this.ShowNotDataImage(functionSceneBodyView, arryMsg);
                return;
            }
@@ -429,35 +431,6 @@
                //初始化默认的设备列表控件
                this.InitListDeviceControls(listDeviceView, nowSelectDeviceInfo, room);
            }
        }
        /// <summary>
        /// 提示没有功能
        /// </summary>
        private void ShowNoFunctionTip()
        {
            var noFunction = new Button()
            {
                Y = Application.GetRealHeight(320),
                Width = this.GetPictrueRealSize(757),
                Height = this.GetPictrueRealSize(435),
                UnSelectedImagePath = "Item/NoFunction.png",
                Gravity = Gravity.CenterHorizontal
            };
            functionSceneBodyView.AddChidren(noFunction);
            var noFunctionTip = new Button()
            {
                Y = noFunction.Bottom + Application.GetRealHeight(32),
                Height = Application.GetRealHeight(200),
                Width = Application.GetRealWidth(700),
                Gravity = Gravity.CenterHorizontal,
                Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}", "\r\n"),
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                TextAlignment = TextAlignment.Center,
                IsMoreLines = true
            };
            functionSceneBodyView.AddChidren(noFunctionTip);
        }
        #endregion
@@ -621,7 +594,9 @@
            }
            if (listScene.Count == 0)
            {
                this.ShowNoSceneTip();
                //没有场景{0}请点击右上角添加
                string[] arryMsg = Language.StringByID(R.MyInternationalizationString.NoScene).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
                this.ShowNotDataImage(functionSceneBodyView, arryMsg);
                return;
            }
@@ -758,36 +733,6 @@
                });
            });
        }
        /// <summary>
        /// 显示没有场景
        /// </summary>
        private void ShowNoSceneTip()
        {
            var noFunction = new Button()
            {
                Y = Application.GetRealHeight(320),
                Width = this.GetPictrueRealSize(757),
                Height = this.GetPictrueRealSize(435),
                UnSelectedImagePath = "Item/NoFunction.png",
                Gravity = Gravity.CenterHorizontal
            };
            functionSceneBodyView.AddChidren(noFunction);
            var noScenceTip = new Button()
            {
                Y = noFunction.Bottom + Application.GetRealHeight(32),
                Height = Application.GetRealHeight(200),
                Width = Application.GetRealWidth(700),
                Gravity = Gravity.CenterHorizontal,
                Text = Language.StringByID(R.MyInternationalizationString.NoScene).Replace("{\\r\\n}", "\r\n"),
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                TextAlignment = TextAlignment.Center,
                IsMoreLines = true
            };
            functionSceneBodyView.AddChidren(noScenceTip);
        }
        #endregion
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -240,10 +240,14 @@
            };
            //下拉刷新自动化列表的事件
            logicScrolView.BeginHeaderRefreshingAction += () =>
            {
                //重新刷新logic列表
                Common.Logic.LogicList.Clear();
                Read(logicScrolView, no);
            {
                if (!Config.Instance.Home.IsVirtually)
                {
                    //虚拟的不获取网关逻辑列表
                    //重新刷新logic列表
                    Common.Logic.LogicList.Clear();
                    Read(logicScrolView, no);
                }
                //关闭刷新View;
                logicScrolView.EndHeaderRefreshing();
            };
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -32,12 +32,8 @@
            view.toptitleNameBtn.TextID = MyInternationalizationString.selection;
            view.clickBtn.MouseDownEventHandler += (sender, e) =>
            {
                UserView.HomePage.Instance.ScrollEnabled = true;
                if (action != null)
                {
                    action(Send.CurrentDoorLock.IsDoorLockNormallyMode);
                }
                UserView.HomePage.Instance.ScrollEnabled = true;
                action(Send.CurrentDoorLock.IsDoorLockNormallyMode);
                RemoveFromParent();
            };
@@ -117,6 +113,10 @@
                        UserView.HomePage.Instance.AddChidren(soneLogicList);
                        UserView.HomePage.Instance.PageIndex += 1;
                        soneLogicList.Show();
                        action = soneLogicList.action;
                        //添加历史记录
                        UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock, 9004, "");
                    }
                    else
                    {
@@ -234,8 +234,8 @@
                                     var soneLogicList = new SoneLogicList();
                                     UserView.HomePage.Instance.AddChidren(soneLogicList);
                                     UserView.HomePage.Instance.PageIndex += 1;
                                     soneLogicList.Show();
                                     soneLogicList.Show();
                                     action = soneLogicList.action;
                                 }
                             }
                             catch
ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
@@ -207,7 +207,7 @@
                    {
                        this.RemoveFromParent();
                        CommonPage.Instance.RemoveViewByTag("Login");
                        UserPage.Instance.Fresh();
                        UserPage.Instance.ReFreshControl();
                    });
                });
            };
@@ -851,7 +851,7 @@
                        {
                            this.RemoveFromParent();
                            CommonPage.Instance.RemoveViewByTag("Login");
                            UserPage.Instance.Fresh();
                            UserPage.Instance.ReFreshControl();
                        });
                    }
                    else
@@ -1115,7 +1115,7 @@
                    CommonPage.Loading.Hide();
                    this.RemoveFromParent();
                    CommonPage.Instance.RemoveViewByTag("Login");
                    UserPage.Instance.Fresh();
                    UserPage.Instance.ReFreshControl();
                });
                return;
            }
ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs
@@ -125,7 +125,7 @@
                            this.RemoveFromParent();
                            CommonPage.Instance.RemoveViewByTag("Register");
                            CommonPage.Instance.RemoveViewByTag("Login");
                            UserPage.Instance.Fresh();
                            UserPage.Instance.ReFreshControl();
                        });
                    }
                    else
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -250,13 +250,10 @@
            }
            //功能和场景bodyView
            this.bodyFrameLayout = new FrameLayout()
            {
                Y = functionSceneView.Bottom,
                Height = Application.GetRealHeight(750),
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
            };
            this.bodyFrameLayout = new FrameLayout();
            bodyFrameLayout.Y = functionSceneView.Bottom;
            bodyFrameLayout.Height = this.listBodyContr.frameTable.Height - functionSceneView.Bottom;
            bodyFrameLayout.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
            this.listBodyContr.frameTable.AddChidren(bodyFrameLayout);
            //选择功能分栏
@@ -549,7 +546,8 @@
            //当前房间的设备数
            if (listDevice.Count == 0)
            {
                ShowNoFunctionTip();
                //还没有功能哦
                this.ShowNotDataImage(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.NoFunction_Tip));
                return;
            }
            //设备列表容器控件
@@ -696,33 +694,6 @@
            }
        }
        /// <summary>
        /// 显示没有功能
        /// </summary>
        private void ShowNoFunctionTip()
        {
            var noFunction = new Button
            {
                Y = Application.GetRealHeight(69),
                Width = this.GetPictrueRealSize(683),
                Height = this.GetPictrueRealSize(392),
                Gravity = Gravity.CenterHorizontal,
                UnSelectedImagePath = "Item/NoFunction.png"
            };
            bodyFrameLayout.AddChidren(noFunction);
            var noFunctionTip = new Button()
            {
                Y = noFunction.Bottom,
                Height = Application.GetRealHeight(200),
                Text = Language.StringByID(R.MyInternationalizationString.NoFunction_Tip).Replace("{\\r\\n}", "\r\n"),
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                TextAlignment = TextAlignment.Center,
                IsMoreLines = true
            };
            bodyFrameLayout.AddChidren(noFunctionTip);
        }
        #endregion
        #region ■ 重置设备卡片控件坐标_______________
@@ -829,8 +800,8 @@
            if (listScene.Count == 0)
            {
                //显示没场景
                this.ShowNoSceneTip();
                //还没有场景哦
                this.ShowNotDataImage(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.NoScene_Tip));
                return;
            }
            //列表控件
@@ -912,26 +883,6 @@
                    System.Threading.Thread.Sleep(50);
                }
            }
        }
        /// <summary>
        /// 显示没场景
        /// </summary>
        private void ShowNoSceneTip()
        {
            var picNoFunc = new PicViewControl(683, 392);
            picNoFunc.Y = Application.GetRealHeight(69);
            picNoFunc.Gravity = Gravity.CenterHorizontal;
            picNoFunc.UnSelectedImagePath = "Item/NoFunction.png";
            bodyFrameLayout.AddChidren(picNoFunc);
            var btnTip = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(200), false);
            btnTip.Y = picNoFunc.Bottom;
            btnTip.Text = Language.StringByID(R.MyInternationalizationString.NoScene_Tip).Replace("{\\r\\n}", "\r\n");
            btnTip.TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor;
            btnTip.TextAlignment = TextAlignment.Center;
            btnTip.IsMoreLines = true;
            bodyFrameLayout.AddChidren(btnTip);
        }
        /// <summary>
ZigbeeApp/Shared/Phone/MainPage/ListRoomViewFrom.cs
@@ -213,7 +213,7 @@
                                if (oldFloorId != room.FloorId)
                                {
                                    //楼层都切换的话,刷新整个主页
                                    UserPage.Instance.Fresh();
                                    UserPage.Instance.ReFreshControl();
                                    return;
                                }
                            }
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -105,6 +105,9 @@
            house.Save(false);
            Config.Instance.HomeId = house.Id;
            Config.Instance.Home = House.GetHouseByHouseId(house.Id);
            //预创建个人中心全部的文件夹
            UserCenterLogic.CreatAllUserCenterDirectory();
        }
        #endregion
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -1467,10 +1467,21 @@
        /// <param name="obj">需要序列化的东西</param>
        public static void SaveFileContent(string fullName, object obj)
        {
            var data = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
            var byteData = System.Text.Encoding.UTF8.GetBytes(data);
            var data = JsonConvert.SerializeObject(obj);
            var byteData = Encoding.UTF8.GetBytes(data);
            //写入内容
            Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
            System.IO.FileStream fileStream = null;
            try
            {
                fileStream = new System.IO.FileStream(fullName, System.IO.FileMode.Create, System.IO.FileAccess.Write);
                fileStream.Write(byteData, 0, byteData.Length);
                fileStream.Flush();
            }
            catch { }
            finally
            {
                fileStream?.Close();
            }
        }
        /// <summary>
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewaySearchListForm.cs
@@ -183,7 +183,7 @@
            if (UserCenterResourse.listActionFormId.Contains("UserMainForm") == false)
            {
                //刷新主页
                UserView.UserPage.Instance.Fresh();
                UserView.UserPage.Instance.ReFreshControl();
            }
            base.CloseFormBefore();
        }
ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlBackupListForm.cs
@@ -300,7 +300,7 @@
                    //关闭所有界面
                    UserCenterLogic.CloseAllOpenForm();
                    //切换到主页
                    UserView.UserPage.Instance.Fresh();
                    UserView.UserPage.Instance.ReFreshControl();
                });
                //文件恢复成功
ZigbeeApp/Shared/Phone/UserView/HomePage.cs
@@ -72,7 +72,7 @@
                        UserCenter.HdlThreadLogic.Current.RunMain(() =>
                        {
                            CommonPage.Instance.RemoveViewByTag("Login");
                            UserPage.Instance.Fresh();
                            UserPage.Instance.ReFreshControl();
                            CommonPage.Loading.Hide();
                        });
                    }
ZigbeeApp/Shared/Phone/UserView/UserPage.cs
old mode 100755 new mode 100644
@@ -2,45 +2,25 @@
using System.Collections.Generic;
using Shared.Common;
using System.Text;
using Shared.Phone.UserCenter;
namespace Shared.Phone.UserView
{
    /// <summary>
    /// User page.
    /// </summary>
    public class UserPage : FrameLayout
    {
        #region ◆ 变量_______________________
        /// <summary>
        /// The user menu page.
        /// </summary>
        static UserPage userMenuPage;
        /// <summary>
        /// 底部单独菜单的宽度-360
        /// </summary>
        private static readonly int tabBarEnum_Width = CommonPage.AppRealWidth / 3;
        /// <summary>
        /// 底部按钮图片的高度
        /// </summary>
        private static readonly int tabBarEnumIMG_Height = 98;
        /// <summary>
        /// 底部按钮图片的宽度
        /// </summary>
        private static readonly int tabBarEnumIMG_Width = 138;
        /// <summary>
        /// 底部按钮图片的Y值
        /// </summary>
        private static readonly int tabBarEnumIMG_Y = 3;
        /// <summary>
        /// 底部按钮文字的高度
        /// </summary>
        private static readonly int tabBarEnumName_Height = 40;
        /// <summary>
        /// 底部按钮文字的Y值
        /// </summary>
        private static readonly int tabBarEnumName_Y = 98;
        #endregion
    {
        #region ■ 变量声明___________________________
        /// <summary>
        /// 当前选择的菜单
        /// </summary>
        private MenuSelectEnum nowSelectMenu = MenuSelectEnum.A未选择;
        /// <summary>
        /// 用户界面
        /// </summary>
        private static UserPage userMenuPage = null;
        /// <summary>
        /// 用户界面
        /// </summary>
@@ -55,10 +35,27 @@
                }
                return userMenuPage;
            }
        }
        }
        /// <summary>
        /// 用户主体界面(中间部分)
        /// </summary>
        private FrameLayout bodyFrameView = null;
        /// <summary>
        /// 界面缓存(2020.05.07:切换时不移除界面,直接隐藏)
        /// </summary>
        private List<EditorCommonForm> listForm = new List<EditorCommonForm>() { null, null, null };
        /// <summary>
        /// 控件缓存(看不懂的话,不要动它)
        /// </summary>
        private List<ButtonBase> listButton = new List<ButtonBase>();
        #endregion
        #region ■ 初始化_____________________________
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Shared.Phone.UserView.UserPage"/> class.
        /// 初始化
        /// </summary>
        public UserPage()
        {
@@ -67,280 +64,276 @@
            {
                Login.AccountLogic.Instance.ReceiveAppLatAndLon(lon.ToString(), lat.ToString());
            };
        }
        }
        /// <summary>
        /// 初始化
        /// </summary>
        public void InitPage()
        {
            if (this.ChildrenCount > 0)
            {
                return;
            }
#if iOS
            if (Shared.Application.PhoneType >= 10)
            {
                //高版本的苹果机型,屏幕底部会有一个黑色的杠
                ControlCommonResourse.BottomFrameHeight = Application.GetRealHeight(242);
            }
#endif
            //用户主体界面(中间部分)
            this.bodyFrameView = new FrameLayout();
            bodyFrameView.Height = this.Height - UserCenter.ControlCommonResourse.BottomFrameHeight;
            bodyFrameView.BackgroundColor = Shared.Common.ZigbeeColor.Current.MainColor;
            this.AddChidren(bodyFrameView);
            //用户菜单界面(底部部分)
            var bottomMenuFrame = new FrameLayout();
            bottomMenuFrame.Gravity = Gravity.BottomCenter;
            bottomMenuFrame.Height = ControlCommonResourse.BottomFrameHeight;
            bottomMenuFrame.BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCBottomColor;
            this.AddChidren(bottomMenuFrame);
            //底部菜单的头部线
            var bottomLine = new NormalViewControl(bottomMenuFrame.Width, ControlCommonResourse.BottomLineHeight, false);
            bottomLine.BackgroundColor = 0xffc8c8c9;
            bottomMenuFrame.AddChidren(bottomLine);
            //主页容器
            var frameHomePage = new FrameLayout();
            frameHomePage.Width = bottomMenuFrame.Width / 3;
            frameHomePage.Height = bottomMenuFrame.Height;
            bottomMenuFrame.AddChidren(frameHomePage);
            //主页图标
            var btnHomeIcon = new PicViewControl(138, 98);
            btnHomeIcon.Y = Application.GetRealHeight(3);
            btnHomeIcon.UnSelectedImagePath = "Navigation/Home.png";
            btnHomeIcon.SelectedImagePath = "Navigation/HomeSelected.png";
            btnHomeIcon.Gravity = Gravity.CenterHorizontal;
            frameHomePage.AddChidren(btnHomeIcon);
            this.listButton.Add(btnHomeIcon);
            btnHomeIcon.ButtonClickEvent += (sender, e) =>
            {
                this.BottomMenuClickEvent(MenuSelectEnum.A主页, true);
            };
            //主页
            var btnHomeName = new NormalViewControl(btnHomeIcon.Width, Application.GetRealHeight(40), false);
            btnHomeName.Y = btnHomeIcon.Bottom;
            btnHomeName.TextID = R.MyInternationalizationString.HomePage;
            btnHomeName.TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor;
            btnHomeName.SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2;
            btnHomeName.TextSize = 10;
            btnHomeName.Gravity = Gravity.CenterHorizontal;
            btnHomeName.TextAlignment = TextAlignment.Center;
            frameHomePage.AddChidren(btnHomeName);
            this.listButton.Add(btnHomeName);
            btnHomeName.ButtonClickEvent += (sender, e) =>
            {
                this.BottomMenuClickEvent(MenuSelectEnum.A主页, true);
            };
            //分类容器
            var frameCategory = new FrameLayout();
            frameCategory.X = frameHomePage.Right;
            frameCategory.Width = bottomMenuFrame.Width / 3;
            frameCategory.Height = bottomMenuFrame.Height;
            bottomMenuFrame.AddChidren(frameCategory);
            //分类图标
            var btnCategoryIcon = new PicViewControl(138, 98);
            btnCategoryIcon.Y = Application.GetRealHeight(3);
            btnCategoryIcon.UnSelectedImagePath = "Navigation/Category.png";
            btnCategoryIcon.SelectedImagePath = "Navigation/CategorySelected.png";
            btnCategoryIcon.Gravity = Gravity.CenterHorizontal;
            frameCategory.AddChidren(btnCategoryIcon);
            this.listButton.Add(btnCategoryIcon);
            btnCategoryIcon.ButtonClickEvent += (sender, e) =>
            {
                this.BottomMenuClickEvent(MenuSelectEnum.A分类, true);
            };
            //分类
            var btnCategoryName = new NormalViewControl(btnCategoryIcon.Width, Application.GetRealHeight(40), false);
            btnCategoryName.Y = btnCategoryIcon.Bottom;
            btnCategoryName.TextID = R.MyInternationalizationString.Category;
            btnCategoryName.TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor;
            btnCategoryName.SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2;
            btnCategoryName.TextSize = 10;
            btnCategoryName.Gravity = Gravity.CenterHorizontal;
            btnCategoryName.TextAlignment = TextAlignment.Center;
            frameCategory.AddChidren(btnCategoryName);
            this.listButton.Add(btnCategoryName);
            btnCategoryName.ButtonClickEvent += (sender, e) =>
            {
                this.BottomMenuClickEvent(MenuSelectEnum.A分类, true);
            };
            //我的容器
            var frameSetting = new FrameLayout();
            frameSetting.X = frameCategory.Right;
            frameSetting.Width = bottomMenuFrame.Width / 3;
            frameSetting.Height = bottomMenuFrame.Height;
            bottomMenuFrame.AddChidren(frameSetting);
            //我的图标
            var btnSettingIcon = new PicViewControl(138, 98);
            btnSettingIcon.Y = Application.GetRealHeight(3);
            btnSettingIcon.UnSelectedImagePath = "Navigation/Setting.png";
            btnSettingIcon.SelectedImagePath = "Navigation/SettingSelected.png";
            btnSettingIcon.Gravity = Gravity.CenterHorizontal;
            frameSetting.AddChidren(btnSettingIcon);
            this.listButton.Add(btnSettingIcon);
            btnSettingIcon.ButtonClickEvent += (sender, e) =>
            {
                this.BottomMenuClickEvent(MenuSelectEnum.A个人中心, true);
            };
            //我的
            var btnSettingName = new NormalViewControl(btnCategoryIcon.Width, Application.GetRealHeight(40), false);
            btnSettingName.Y = btnSettingIcon.Bottom;
            btnSettingName.TextID = R.MyInternationalizationString.Me;
            btnSettingName.TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor;
            btnSettingName.SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2;
            btnSettingName.TextSize = 10;
            btnSettingName.Gravity = Gravity.CenterHorizontal;
            btnSettingName.TextAlignment = TextAlignment.Center;
            frameSetting.AddChidren(btnSettingName);
            this.listButton.Add(btnSettingName);
            btnSettingName.ButtonClickEvent += (sender, e) =>
            {
                this.BottomMenuClickEvent(MenuSelectEnum.A个人中心, true);
            };
        }
        /// <summary>
        /// 用户主体界面(中间部分)
        /// 刷新控件
        /// </summary>
        public FrameLayout BodyView = new FrameLayout
        public void ReFreshControl()
        {
            Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight),
            BackgroundColor = Shared.Common.ZigbeeColor.Current.MainColor,
        };
        /// <summary>
        /// 用户菜单界面(底部部分)
        /// </summary>
        public FrameLayout BottomMenuView = new FrameLayout
        {
            Y = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight),
            Height = Application.GetRealHeight(CommonPage.TabbarHeight),
            BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCBottomColor,
        };
            //这里做全刷新处理
            this.listForm = new List<EditorCommonForm>() { null, null, null };
            this.bodyFrameView.RemoveAll();
        #region 分割线
            this.BottomMenuClickEvent(MenuSelectEnum.A主页, false);
        }
#endregion
#region ■ 一般方法___________________________
        private Button bottomLine = new Button
        {
            Height = 1,
            BackgroundColor = ZigbeeColor.Current.GXCBottomLineColor
        };
        #endregion
        #region 底部-主页按钮
        /// <summary>
        /// 底部-主页按钮
        /// </summary>
        public FrameLayout homePageFL = new FrameLayout
        {
            Width = Application.GetRealWidth(tabBarEnum_Width),
            Height = Application.GetRealHeight(CommonPage.TabbarHeight),
        };
        /// <summary>
        /// The home page image.
        /// </summary>
        public Button homePageIMG = new Button
        {
            Y = Application.GetRealHeight(tabBarEnumIMG_Y),
            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
        };
        /// <summary>
        /// The name of the home page.
        /// </summary>
        public Button homePageName = new Button
        {
            Y = Application.GetRealHeight(tabBarEnumName_Y),
            Height = Application.GetRealHeight(tabBarEnumName_Height),
            TextID = R.MyInternationalizationString.HomePage,
            TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor,
            SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
            Gravity = Gravity.CenterHorizontal,
            TextSize = 10
        };
        #endregion
        #region 分类-底部按钮
        /// <summary>
        /// 分类-底部按钮
        /// </summary>
        public FrameLayout categoryFL = new FrameLayout
        {
            X = Application.GetRealWidth(tabBarEnum_Width),
            Width = Application.GetRealWidth(tabBarEnum_Width),
            Height = Application.GetRealHeight(CommonPage.TabbarHeight)
        };
        /// <summary>
        /// The category image.
        /// </summary>
        public Button categoryIMG = new Button
        {
            Y = Application.GetRealHeight(tabBarEnumIMG_Y),
            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
        };
        /// <summary>
        /// The name of the category.
        /// </summary>
        public Button categoryName = new Button
        {
            Y = Application.GetRealHeight(tabBarEnumName_Y),
            Height = Application.GetRealHeight(tabBarEnumName_Height),
            TextID = R.MyInternationalizationString.Category,
            TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor,
            SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
            Gravity = Gravity.CenterHorizontal,
            TextSize = 10
        };
        #endregion
        #region 个人中心-底部按钮
        /// <summary>
        /// 个人中心-底部按钮
        /// </summary>
        public FrameLayout settingFL = new FrameLayout
        {
            X = Application.GetRealWidth(tabBarEnum_Width * 2),
            Width = Application.GetRealWidth(tabBarEnum_Width),
            Height = Application.GetRealHeight(CommonPage.TabbarHeight)
        };
        /// <summary>
        /// The setting image.
        /// </summary>
        public Button settingIMG = new Button
        {
            Y = Application.GetRealHeight(tabBarEnumIMG_Y),
            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
        };
        /// <summary>
        /// 个人中心
        /// </summary>
        public Button settingName = new Button
        {
            Y = Application.GetRealHeight(tabBarEnumName_Y),
            Height = Application.GetRealHeight(tabBarEnumName_Height),
            TextID = R.MyInternationalizationString.Me,
            TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor,
            SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
            Gravity = Gravity.CenterHorizontal,
            TextSize = 10
        };
        #endregion
        #region 强制显示自动化界面
        /// <summary>
        /// 底部菜单的点击事件
        /// </summary>
        /// <param name="selectEnum">菜单选择枚举</param>
        /// <param name="handClick">是否是手动点击</param>
        private void BottomMenuClickEvent(MenuSelectEnum selectEnum, bool handClick)
        {
            if (selectEnum == this.nowSelectMenu && handClick == true)
            {
                //手动点击同一个菜单,则不做处理
                return;
            }
            this.nowSelectMenu = selectEnum;
            //主页
            if (selectEnum == MenuSelectEnum.A主页)
            {
                //左滑菜单可
                CommonPage.Instance.IsDrawerLockMode = false;
                if (listForm[0] == null)
                {
                    var form = new MainPage.HomeMainPageForm();
                    this.bodyFrameView.AddChidren(form);
                    form.ShowForm();
                    //加缓存
                    listForm[0] = form;
                }
            }
            else if (selectEnum == MenuSelectEnum.A分类)
            {
                //左滑菜单不可
                CommonPage.Instance.IsDrawerLockMode = true;
                if (listForm[1] == null)
                {
                    var form = new Category.CategoryMainForm();
                    this.bodyFrameView.AddChidren(form);
                    form.ShowForm();
                    //加缓存
                    listForm[1] = form;
                }
            }
            else if (selectEnum == MenuSelectEnum.A个人中心)
            {
                //左滑菜单不可
                CommonPage.Instance.IsDrawerLockMode = true;
                if (listForm[2] == null)
                {
                    var form = new UserCenter.UserMain.UserMainForm();
                    this.bodyFrameView.AddChidren(form);
                    form.ShowForm();
                    //加缓存
                    listForm[2] = form;
                }
            }
            //设置全部控件的各种状态状态
            this.SetAllControlStatu();
        }
        /// <summary>
        /// 设置全部控件的各种状态状态
        /// </summary>
        private void SetAllControlStatu()
        {
            int index = (int)this.nowSelectMenu - 1;
            for (int i = 0; i < listForm.Count; i++)
            {
                if (i == index)
                {
                    //当前选择的菜单的话,则全部可视
                    listForm[i].Visible = true;
                    //控件图片和颜色变更
                    this.listButton[i * 2].IsSelected = true;
                    this.listButton[i * 2 + 1].IsSelected = true;
                }
                else
                {
                    //不是当前选择的菜单的话,全部不可视
                    if (listForm[i] != null)
                    {
                        listForm[i].Visible = false;
                    }
                    //控件图片和颜色变更
                    this.listButton[i * 2].IsSelected = false;
                    this.listButton[i * 2 + 1].IsSelected = false;
                }
            }
        }
        /// <summary>
        /// 强制显示自动化列表界面
        /// </summary>
        public void ShowCategoryAutoListForm()
        {
            //关闭全部界面,直到主页为止
            UserCenter.UserCenterLogic.CloseAllOpenForm();
            UserCenterLogic.CloseAllOpenForm();
            //强制显示自动化列表界面
            UserCenter.UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 2;
            BottomEventHandler(Instance.categoryIMG, null);
        }
            UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 2;
        #endregion
            this.BottomMenuClickEvent(MenuSelectEnum.A分类, false);
        }
#endregion
#region ■ 结构体_____________________________
        EventHandler<MouseEventArgs> BottomEventHandler = (sender, e) =>
        {
            if (sender == Instance.homePageIMG || sender == Instance.homePageName)
            {
                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.settingIMG.IsSelected = false;
                var home = new MainPage.HomeMainPageForm();
                Instance.BodyView.AddChidren(home);
                home.ShowForm();
            }
            else if (sender == Instance.categoryIMG || sender == Instance.categoryName)
            {
                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.settingIMG.IsSelected = false;
                var category = new Category.CategoryMainForm { };
                Instance.BodyView.AddChidren(category);
                category.ShowForm();
            }
            else if (sender == Instance.settingIMG || sender == Instance.settingName)
            {
                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.categoryIMG.IsSelected = false;
                var form = new UserCenter.UserMain.UserMainForm();
                Instance.BodyView.AddChidren(form);
                form.ShowForm();
            }
        };
        /// <summary>
        /// Fresh this instance.
        /// <summary>
        /// 菜单选择的枚举
        /// </summary>
        public void Fresh()
        {
            BottomEventHandler(Instance.homePageIMG, null);
        private enum MenuSelectEnum
        {
            A未选择 = 0,
            A主页 = 1,
            A分类 = 2,
            A个人中心 = 3
        }
        /// <summary>
        /// Inits the page.
        /// </summary>
        public void InitPage()
        {
            if (0 < ChildrenCount)
            {
                return;
            }
            AddChidren(BodyView);
            AddChidren(BottomMenuView);
            BottomMenuView.AddChidren(Instance.bottomLine);
            Instance.homePageFL.AddChidren(Instance.homePageIMG);
            Instance.homePageFL.AddChidren(Instance.homePageName);
            BottomMenuView.AddChidren(Instance.homePageFL);
            Instance.categoryFL.AddChidren(Instance.categoryIMG);
            Instance.categoryFL.AddChidren(Instance.categoryName);
            BottomMenuView.AddChidren(Instance.categoryFL);
            Instance.settingFL.AddChidren(Instance.settingIMG);
            Instance.settingFL.AddChidren(Instance.settingName);
            BottomMenuView.AddChidren(Instance.settingFL);
            homePageIMG.MouseUpEventHandler += BottomEventHandler;
            homePageName.MouseUpEventHandler += BottomEventHandler;
            categoryIMG.MouseUpEventHandler += BottomEventHandler;
            categoryName.MouseUpEventHandler += BottomEventHandler;
            settingIMG.MouseUpEventHandler += BottomEventHandler;
            settingName.MouseUpEventHandler += BottomEventHandler;
        }
#endregion
    }
}
ZigbeeApp/Shared/R.cs
@@ -1197,7 +1197,7 @@
        /// </summary>
        public const int Cancel = 11023;
        /// <summary>
        /// 没有场景 {\r\n} 请点击右上角添加
        /// 没有场景{0}请点击右上角添加
        /// </summary>
        public const int NoScene = 11024;
        /// <summary>