From af4101b1d8461331bc3163b738fc75d4bf67c85c Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期二, 28 七月 2020 17:47:44 +0800 Subject: [PATCH] 2020-07-28-1 --- HDL_ON/UI/UI2/UserPage.cs | 87 +++++++++++++++++++++++++++++-------------- 1 files changed, 59 insertions(+), 28 deletions(-) diff --git a/HDL_ON/UI/UI2/UserPage.cs b/HDL_ON/UI/UI2/UserPage.cs index 1fca242..0d5291a 100644 --- a/HDL_ON/UI/UI2/UserPage.cs +++ b/HDL_ON/UI/UI2/UserPage.cs @@ -1,4 +1,5 @@ 锘縰sing System; +using HDL_ON.Entity; using Shared; namespace HDL_ON.UI @@ -94,31 +95,44 @@ 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> @@ -283,13 +297,11 @@ homePage.LoadPage(); } - /// <summary> /// 鍒囨崲鍒版敹钘忕晫闈� /// </summary> void ChooseCollection() { - CurAnimationEffect = 0; btnClassificationIcon.IsSelected = false; btnIntellectualizationIcon.IsSelected = false; btnPersonalCenterIcon.IsSelected = false; @@ -298,6 +310,7 @@ btnIntellectualizationText.IsSelected = false; btnPersonalCenterText.IsSelected = false; #region 绉诲姩鍔ㄧ敾 + //绉诲姩璺濈 var distance = navigationSelectionView.X - collectionView.X + Application.GetRealWidth(94*3); int total = 10; int sleepTime = 300; @@ -314,7 +327,13 @@ 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; @@ -360,7 +379,6 @@ /// </summary> void ChooseClassification() { - CurAnimationEffect = 1; btnCollectionIcon.IsSelected = false; btnIntellectualizationIcon.IsSelected = false; btnPersonalCenterIcon.IsSelected = false; @@ -380,6 +398,11 @@ distance /= total; new System.Threading.Thread(() => { + if (CurAnimationEffect == 1) + { + return; + } + CurAnimationEffect = 1; int index = 0; while (index < total+1) { @@ -438,7 +461,6 @@ /// </summary> void ChooseIntellectualization() { - CurAnimationEffect = 2; btnCollectionText.IsSelected = false; btnClassificationText.IsSelected = false; btnIntellectualizationText.IsSelected = false; @@ -457,6 +479,11 @@ } distance /= total; new System.Threading.Thread(() => { + if (CurAnimationEffect == 2) + { + return; + } + CurAnimationEffect = 2; int index = 0; while (index < total+1) { @@ -511,7 +538,6 @@ /// </summary> void ChoosePersonalCenter() { - CurAnimationEffect = 3; btnCollectionText.IsSelected = false; btnClassificationText.IsSelected = false; btnIntellectualizationText.IsSelected = false; @@ -535,6 +561,11 @@ } distance /= total; new System.Threading.Thread(() => { + if (CurAnimationEffect == 3) + { + return; + } + CurAnimationEffect = 3; int index = 0; while (index < total+1) { -- Gitblit v1.8.0