| | |
| | | using System; |
| | | using HDL_ON.Entity; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | |
| | | |
| | | public void LoadPage() |
| | | { |
| | | bodyView = this; |
| | | bodyView.BackgroundColor = CSS.CSS_Color.MainBackgroundColor; |
| | | ContextView = new FrameLayout() |
| | | try |
| | | { |
| | | Height = Application.GetRealHeight(618+20), |
| | | BackgroundColor = CSS.CSS_Color.BackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(ContextView); |
| | | bodyView = this; |
| | | bodyView.BackgroundColor = CSS.CSS_Color.MainBackgroundColor; |
| | | ContextView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(618 + 20), |
| | | BackgroundColor = CSS.CSS_Color.BackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(ContextView); |
| | | |
| | | navigationView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(607), |
| | | Height = Application.GetMinRealAverage(60), |
| | | }; |
| | | bodyView.AddChidren(navigationView); |
| | | if (MainPage.Increase) |
| | | { |
| | | //ContextView.Height = Application.GetRealHeight(618 + 20); |
| | | navigationView.Y = Application.GetRealHeight(597+5); |
| | | navigationView.Height = Application.GetRealHeight(70-5); |
| | | navigationView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(607), |
| | | Height = Application.GetMinRealAverage(60), |
| | | }; |
| | | bodyView.AddChidren(navigationView); |
| | | if (MainPage.Increase) |
| | | { |
| | | //ContextView.Height = Application.GetRealHeight(618 + 20); |
| | | navigationView.Y = Application.GetRealHeight(597 + 5); |
| | | navigationView.Height = Application.GetRealHeight(70 - 5); |
| | | } |
| | | InitBottomView(); |
| | | |
| | | LoadEventList(); |
| | | |
| | | var homePage = new HomePage(); |
| | | ContextView.AddChidren(homePage); |
| | | homePage.LoadPage(); |
| | | |
| | | //刷新功能状态 |
| | | DB_ResidenceData.residenceData.RefreshResidenceFunctionStatus(); |
| | | } |
| | | |
| | | InitBottomView(); |
| | | |
| | | LoadEventList(); |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"UserPage error {ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | homePage.LoadPage(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 切换到收藏界面 |
| | | /// </summary> |
| | | void ChooseCollection() |
| | | { |
| | | CurAnimationEffect = 0; |
| | | btnClassificationIcon.IsSelected = false; |
| | | btnIntellectualizationIcon.IsSelected = false; |
| | | btnPersonalCenterIcon.IsSelected = false; |
| | |
| | | btnIntellectualizationText.IsSelected = false; |
| | | btnPersonalCenterText.IsSelected = false; |
| | | #region 移动动画 |
| | | //移动距离 |
| | | var distance = navigationSelectionView.X - collectionView.X + Application.GetRealWidth(94*3); |
| | | int total = 10; |
| | | int sleepTime = 300; |
| | |
| | | distance /= total; |
| | | new System.Threading.Thread(() => { |
| | | int index = 0; |
| | | while (index < total+1) { |
| | | if(CurAnimationEffect == 0) |
| | | { |
| | | return; |
| | | } |
| | | CurAnimationEffect = 0; |
| | | while (index < total+1) |
| | | { |
| | | if (CurAnimationEffect != 0) |
| | | { |
| | | break; |
| | |
| | | /// </summary> |
| | | void ChooseClassification() |
| | | { |
| | | CurAnimationEffect = 1; |
| | | btnCollectionIcon.IsSelected = false; |
| | | btnIntellectualizationIcon.IsSelected = false; |
| | | btnPersonalCenterIcon.IsSelected = false; |
| | |
| | | distance /= total; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | if (CurAnimationEffect == 1) |
| | | { |
| | | return; |
| | | } |
| | | CurAnimationEffect = 1; |
| | | int index = 0; |
| | | while (index < total+1) |
| | | { |
| | |
| | | /// </summary> |
| | | void ChooseIntellectualization() |
| | | { |
| | | CurAnimationEffect = 2; |
| | | btnCollectionText.IsSelected = false; |
| | | btnClassificationText.IsSelected = false; |
| | | btnIntellectualizationText.IsSelected = false; |
| | |
| | | } |
| | | distance /= total; |
| | | new System.Threading.Thread(() => { |
| | | if (CurAnimationEffect == 2) |
| | | { |
| | | return; |
| | | } |
| | | CurAnimationEffect = 2; |
| | | int index = 0; |
| | | while (index < total+1) |
| | | { |
| | |
| | | /// </summary> |
| | | void ChoosePersonalCenter() |
| | | { |
| | | CurAnimationEffect = 3; |
| | | btnCollectionText.IsSelected = false; |
| | | btnClassificationText.IsSelected = false; |
| | | btnIntellectualizationText.IsSelected = false; |
| | |
| | | } |
| | | distance /= total; |
| | | new System.Threading.Thread(() => { |
| | | if (CurAnimationEffect == 3) |
| | | { |
| | | return; |
| | | } |
| | | CurAnimationEffect = 3; |
| | | int index = 0; |
| | | while (index < total+1) |
| | | { |