From da3634e011bbda29cf4e1c168997b780fe795b20 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期三, 13 五月 2020 09:05:23 +0800 Subject: [PATCH] 优化新风模块和新风面板的测试功能,请合并代码 --- ZigbeeApp/Shared/Phone/UserView/UserPage.cs | 598 ++++++++++++++++++++++++++++++----------------------------- 1 files changed, 303 insertions(+), 295 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs index f391d26..55f5d7d 100755 --- a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs +++ b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs @@ -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> - /// 搴曢儴鎸夐挳鍥剧墖鐨刌鍊� - /// </summary> - private static readonly int tabBarEnumIMG_Y = 3; - /// <summary> - /// 搴曢儴鎸夐挳鏂囧瓧鐨勯珮搴� - /// </summary> - private static readonly int tabBarEnumName_Height = 40; - /// <summary> - /// 搴曢儴鎸夐挳鏂囧瓧鐨刌鍊� - /// </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,31 @@ } 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>(); + /// <summary> + /// 濡傛灉璁剧疆姝ゅ彉閲忎负true,鍒欏湪鍗曞嚮搴曢儴鑿滃崟鏃�,寮哄埗鏃犳潯浠跺叏閮ㄥ埛鏂� + /// </summary> + public bool RefreshForm = false; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + /// <summary> - /// Initializes a new instance of the <see cref="T:Shared.Phone.UserView.UserPage"/> class. + /// 鍒濆鍖� /// </summary> public UserPage() { @@ -67,280 +68,287 @@ { 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 鍒嗗壊绾� - - 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 寮哄埗鏄剧ず鑷姩鍖栫晫闈� - + this.BottomMenuClickEvent(MenuSelectEnum.A涓婚〉, false); + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 搴曢儴鑿滃崟鐨勭偣鍑讳簨浠� + /// </summary> + /// <param name="selectEnum">鑿滃崟閫夋嫨鏋氫妇</param> + /// <param name="handClick">鏄惁鏄墜鍔ㄧ偣鍑�</param> + private void BottomMenuClickEvent(MenuSelectEnum selectEnum, bool handClick) + { + if (this.RefreshForm == false && selectEnum == this.nowSelectMenu && handClick == true) + { + //鎵嬪姩鐐瑰嚮鍚屼竴涓彍鍗�,鍒欎笉鍋氬鐞� + return; + } + + //濡傛灉寮哄埗鎸囧畾鍒锋柊鐣岄潰鐨勮瘽 + if (this.RefreshForm == true) + { + //鍏ㄩ儴鍒锋柊 + this.listForm = new List<EditorCommonForm>() { null, null, null }; + this.bodyFrameView.RemoveAll(); + + this.RefreshForm = false; + } + + 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; + this.BottomMenuClickEvent(MenuSelectEnum.A鍒嗙被, false); + } + #endregion - - 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. + + #region 鈻� 缁撴瀯浣揰____________________________ + + /// <summary> + /// 鑿滃崟閫夋嫨鐨勬灇涓� /// </summary> - public void Fresh() - { - BottomEventHandler(Instance.homePageIMG, null); - } - - /// <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; - } + private enum MenuSelectEnum + { + A鏈�夋嫨 = 0, + A涓婚〉 = 1, + A鍒嗙被 = 2, + A涓汉涓績 = 3 + } + + #endregion } } -- Gitblit v1.8.0