| | |
| | | using ZigBee.Device; |
| | | using Shared.Phone.Device.AC; |
| | | using System.Text; |
| | | using Shared.Phone.Device.Account;
|
| | |
|
| | | namespace Shared.Phone.UserView |
| | | { |
| | | /// <summary> |
| | | /// User page. |
| | | /// </summary> |
| | | public class UserPage : FrameLayout,ZigBee.Common.IStatus |
| | | public class UserPage : FrameLayout, ZigBee.Common.IStatus |
| | | { |
| | | #region ◆ 变量_______________________ |
| | | /// <summary> |
| | |
| | | ZbGateway.StatusList.Add(this); |
| | | Shared.Application.LocationAction += (lon, lat) => |
| | | { |
| | | AccountLogic.Instance.ReceiveAppLatAndLon(lon.ToString(), lat.ToString()); |
| | | Login.AccountLogic.Instance.ReceiveAppLatAndLon(lon.ToString(), lat.ToString()); |
| | | }; |
| | | } |
| | | |
| | |
| | | Width = Application.GetMinRealAverage(tabBarEnumIMG_Width), |
| | | UnSelectedImagePath = "Navigation/Home.png", |
| | | SelectedImagePath = "Navigation/HomeSelected.png", |
| | | IsSelected = true, |
| | | Gravity = Gravity.CenterHorizontal |
| | | }; |
| | | /// <summary> |
| | |
| | | TextID = R.MyInternationalizationString.HomePage, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor, |
| | | SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2, |
| | | IsSelected = true, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextSize = 10 |
| | | }; |
| | |
| | | /// </summary> |
| | | public FrameLayout categoryFL = new FrameLayout |
| | | { |
| | | X=Application.GetRealWidth(tabBarEnum_Width), |
| | | X = Application.GetRealWidth(tabBarEnum_Width), |
| | | Width = Application.GetRealWidth(tabBarEnum_Width), |
| | | Height = Application.GetRealHeight(CommonPage.TabbarHeight) |
| | | }; |
| | |
| | | TextID = R.MyInternationalizationString.Category, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor, |
| | | SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2, |
| | | IsSelected = false, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextSize=10 |
| | | TextSize = 10 |
| | | }; |
| | | #endregion |
| | | |
| | |
| | | /// </summary> |
| | | public FrameLayout settingFL = new FrameLayout |
| | | { |
| | | X = Application.GetRealWidth(tabBarEnum_Width*2), |
| | | X = Application.GetRealWidth(tabBarEnum_Width * 2), |
| | | Width = Application.GetRealWidth(tabBarEnum_Width), |
| | | Height = Application.GetRealHeight(CommonPage.TabbarHeight) |
| | | }; |
| | |
| | | TextID = R.MyInternationalizationString.Me, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor, |
| | | SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2, |
| | | IsSelected = false, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextSize = 10 |
| | | }; |
| | |
| | | |
| | | EventHandler<MouseEventArgs> BottomEventHandler = (sender, e) => |
| | | { |
| | | Instance.homePageName.IsSelected = false; |
| | | Instance.homePageIMG.IsSelected = false; |
| | | |
| | | Instance.categoryName.IsSelected = false; |
| | | Instance.categoryIMG.IsSelected = false; |
| | | |
| | | Instance.settingName.IsSelected = false; |
| | | Instance.settingIMG.IsSelected = false; |
| | | |
| | | Instance.BodyView.RemoveAll(); |
| | | 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; |
| | | var home = new UserHomeView { }; |
| | | Instance.homePageIMG.IsSelected = true;
|
| | |
|
| | | Instance.categoryName.IsSelected = false;
|
| | | Instance.categoryIMG.IsSelected = false;
|
| | |
|
| | | Instance.settingName.IsSelected = false;
|
| | | Instance.settingIMG.IsSelected = false; |
| | | |
| | | var home = new MainPage.UserHomeView2(); |
| | | Instance.BodyView.AddChidren(home); |
| | | home.ShowForm(); |
| | | |
| | | } |
| | | else if (sender == Instance.categoryIMG || sender==Instance.categoryName) |
| | | { |
| | | 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.categoryIMG.IsSelected = true;
|
| | |
|
| | | Instance.homePageName.IsSelected = false;
|
| | | Instance.homePageIMG.IsSelected = false;
|
| | |
|
| | | Instance.settingName.IsSelected = false;
|
| | | Instance.settingIMG.IsSelected = false; |
| | | |
| | | var category = new Phone.Device.Category.Category { }; |
| | | Instance.BodyView.AddChidren(category); |
| | | category.Show(); |
| | | } |
| | | else if (sender == Instance.settingIMG || sender==Instance.settingName) |
| | | { |
| | | 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.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(); |