From 1a4b95a7ebef71838bd3eda2c22056bbf0db65ec Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 10 一月 2020 16:39:54 +0800
Subject: [PATCH] 2019阶段备份

---
 HDL_ON/UI/UI2/UserPage.cs |  156 +++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 123 insertions(+), 33 deletions(-)

diff --git a/HDL_ON/UI/UI2/UserPage.cs b/HDL_ON/UI/UI2/UserPage.cs
index c15a939..0d09bf7 100644
--- a/HDL_ON/UI/UI2/UserPage.cs
+++ b/HDL_ON/UI/UI2/UserPage.cs
@@ -3,14 +3,14 @@
 
 namespace HDL_ON.UI
 {
-    public partial class UserPage : PageLayout
+    public partial class UserPage : FrameLayout
     {
 
         #region 鎺т欢鍒楄〃
         /// <summary>
         /// 褰撳墠鍖哄煙
         /// </summary>
-        static PageLayout bodyView;
+        FrameLayout bodyView;
         /// <summary>
         /// 鍐呭鍖哄煙
         /// </summary>
@@ -83,12 +83,21 @@
         #endregion
         #endregion
 
+        /// <summary>
+        /// 褰撳墠鍔ㄧ敾鏁堟灉
+        /// 0:鏀惰棌
+        /// 1:鍒嗙被
+        /// 2:鏅鸿兘
+        /// 3:涓汉
+        /// </summary>
+        int CurAnimationEffect = 0;
+
         public void LoadPage()
         {
             bodyView = this;
             ContextView = new FrameLayout()
             {
-                Height = Application.GetRealHeight(618),
+                Height = Application.GetRealHeight(618+25),
                 BackgroundColor = CSS.CSS_Color.BackgroundColor
             };
             bodyView.AddChidren(ContextView);
@@ -109,14 +118,36 @@
         /// 鍒濆鍖栧簳閮ㄥ尯鍩�
         /// </summary>
         void InitBottomView()
-        { 
+        {
+            navigationSelectionView = new FrameLayout()
+            {
+                X = Application.GetRealWidth(0 - 94 * 3),
+                Y = Application.GetRealHeight(4),
+                Width = Application.GetRealWidth(94 * 7),
+                Height = Application.GetRealHeight(38),
+                BackgroundImagePath = "Navigation/UserPageNavbg.png",
+            };
+            navigationView.AddChidren(navigationSelectionView);
+
+            btnNavigationSelectionIcon = new Button()
+            {
+                Gravity = Gravity.CenterHorizontal,
+                Y = Application.GetRealHeight(6),
+                Width = Application.GetMinRealAverage(22),
+                Height = Application.GetMinRealAverage(22),
+                UnSelectedImagePath = "Navigation/CollectionIconOn.png",
+            };
+            navigationSelectionView.AddChidren(btnNavigationSelectionIcon);
+
+
             NavigationSubView = new FrameLayout()
             {
                 Y = Application.GetRealHeight(11),
                 Height = Application.GetRealHeight(49),
-                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
+                //BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
             };
             navigationView.AddChidren(NavigationSubView);
+
 
             #region 鏀惰棌鍖哄煙
             collectionView = new FrameLayout() {
@@ -129,6 +160,8 @@
                 Width = Application.GetMinRealAverage(22),
                 Height = Application.GetMinRealAverage(22),
                 UnSelectedImagePath = "Navigation/CollectionIcon.png",
+                SelectedImagePath = "0Common/transparent.png",
+                IsSelected = true,
             };
             collectionView.AddChidren(btnCollectionIcon);
             btnCollectionText = new Button()
@@ -159,6 +192,7 @@
                 Width = Application.GetMinRealAverage(22),
                 Height = Application.GetMinRealAverage(22),
                 UnSelectedImagePath = "Navigation/ClassificationIcon.png",
+                SelectedImagePath = "0Common/transparent.png",
             };
             classificationView.AddChidren(btnClassificationIcon);
             btnClassificationText = new Button()
@@ -189,6 +223,7 @@
                 Width = Application.GetMinRealAverage(22),
                 Height = Application.GetMinRealAverage(22),
                 UnSelectedImagePath = "Navigation/IntellectualizationIcon.png",
+                SelectedImagePath = "0Common/transparent.png",
             };
             intellectualizationView.AddChidren(btnIntellectualizationIcon);
             btnIntellectualizationText = new Button()
@@ -220,7 +255,7 @@
                 Width = Application.GetMinRealAverage(22),
                 Height = Application.GetMinRealAverage(22),
                 UnSelectedImagePath = "Navigation/PersonalCenterIcon.png",
-                SelectedImagePath = "Navigation/PersonalCenterIconOn.png",
+                SelectedImagePath = "0Common/transparent.png",
             };
             personalCenterView.AddChidren(btnPersonalCenterIcon);
 
@@ -239,24 +274,10 @@
             #endregion
 
 
-            navigationSelectionView = new FrameLayout()
-            {
-                X = Application.GetRealWidth(0),
-                Width = Application.GetRealWidth(94),
-                Height = Application.GetRealHeight(40),
-                BackgroundImagePath = "Navigation/UserPageNavbg.png",
-            };
-            navigationView.AddChidren(navigationSelectionView);
 
-            btnNavigationSelectionIcon = new Button()
-            {
-                Gravity = Gravity.CenterHorizontal,
-                Y = Application.GetRealHeight(6),
-                Width = Application.GetMinRealAverage(22),
-                Height = Application.GetMinRealAverage(22),
-                UnSelectedImagePath = "Navigation/CollectionIconOn.png",
-            };
-            navigationSelectionView.AddChidren(btnNavigationSelectionIcon);
+            var homePage = new HomePage();
+            ContextView.AddChidren(homePage);
+            homePage.LoadPage();
         }
 
 
@@ -265,12 +286,16 @@
         /// </summary>
         void ChooseCollection()
         {
+            CurAnimationEffect = 0;
+            btnClassificationIcon.IsSelected = false;
+            btnIntellectualizationIcon.IsSelected = false;
+            btnPersonalCenterIcon.IsSelected = false;
             btnCollectionText.IsSelected = false;
             btnClassificationText.IsSelected = false;
             btnIntellectualizationText.IsSelected = false;
             btnPersonalCenterText.IsSelected = false;
             #region 绉诲姩鍔ㄧ敾
-            var distance = navigationSelectionView.X - collectionView.X;
+            var distance = navigationSelectionView.X - collectionView.X + Application.GetRealWidth(94*3);
             int total = 10;
             int sleepTime = 300;
             if (distance > 200)
@@ -287,6 +312,10 @@
             new System.Threading.Thread(() => {
                 int index = 0;
                 while (index < total+1) {
+                    if (CurAnimationEffect != 0)
+                    {
+                        break;
+                    }
                     Application.RunOnMainThread(() =>
                     {
                         //绉诲姩
@@ -296,8 +325,15 @@
                         }
                         else
                         {
-                            navigationSelectionView.X = collectionView.X;
+                            navigationSelectionView.X = collectionView.X - Application.GetRealWidth(94 * 3);
                             btnCollectionText.IsSelected = true;
+                            btnCollectionIcon.IsSelected = true;
+                            btnClassificationIcon.IsSelected = false;
+                            btnIntellectualizationIcon.IsSelected = false;
+                            btnPersonalCenterIcon.IsSelected = false;
+                            btnClassificationText.IsSelected = false;
+                            btnIntellectualizationText.IsSelected = false;
+                            btnPersonalCenterText.IsSelected = false;
                         }
                         if (index == (total/2))
                         {
@@ -311,18 +347,26 @@
                 }
             }) { IsBackground = true }.Start();
             #endregion
+            ContextView.RemoveAll();
+            var homePage = new HomePage();
+            ContextView.AddChidren(homePage);
+            homePage.LoadPage();
         }
         /// <summary>
         /// 鍒囨崲鍒板垎绫荤晫闈�
         /// </summary>
         void ChooseClassification()
         {
+            CurAnimationEffect = 1;
+            btnCollectionIcon.IsSelected = false;
+            btnIntellectualizationIcon.IsSelected = false;
+            btnPersonalCenterIcon.IsSelected = false;
             btnCollectionText.IsSelected = false;
             btnClassificationText.IsSelected = false;
             btnIntellectualizationText.IsSelected = false;
             btnPersonalCenterText.IsSelected = false;
             #region 绉诲姩鍔ㄧ敾
-            var distance = navigationSelectionView.X - classificationView.X;
+            var distance = navigationSelectionView.X - classificationView.X + Application.GetRealWidth(94 * 3);
             int total = 10;
             int sleepTime = 300;
             if (distance > 100 || distance < -100)
@@ -336,6 +380,10 @@
                 int index = 0;
                 while (index < total+1)
                 {
+                    if (CurAnimationEffect != 1)
+                    {
+                        break;
+                    }
                     Application.RunOnMainThread(() =>
                     {
                         //绉诲姩
@@ -345,8 +393,15 @@
                         }
                         else
                         {
-                            navigationSelectionView.X = classificationView.X;
+                            navigationSelectionView.X = classificationView.X - Application.GetRealWidth(94 * 3);
                             btnClassificationText.IsSelected = true;
+                            btnClassificationIcon.IsSelected = true;
+                            btnCollectionIcon.IsSelected = false;
+                            btnIntellectualizationIcon.IsSelected = false;
+                            btnPersonalCenterIcon.IsSelected = false;
+                            btnCollectionText.IsSelected = false;
+                            btnIntellectualizationText.IsSelected = false;
+                            btnPersonalCenterText.IsSelected = false;
                         }
                         if (index == (total / 2 ))
                         {
@@ -368,7 +423,10 @@
             })
             { IsBackground = true }.Start();
             #endregion
-
+            ContextView.RemoveAll();
+            var classificaitionView = new UI.ClassificationPage();
+            ContextView.AddChidren(classificaitionView);
+            classificaitionView.LoadPage();
 
 
         }
@@ -377,12 +435,16 @@
         /// </summary>
         void ChooseIntellectualization()
         {
+            CurAnimationEffect = 2;
             btnCollectionText.IsSelected = false;
             btnClassificationText.IsSelected = false;
             btnIntellectualizationText.IsSelected = false;
             btnPersonalCenterText.IsSelected = false;
+            btnCollectionIcon.IsSelected = false;
+            btnClassificationIcon.IsSelected = false;
+            btnPersonalCenterIcon.IsSelected = false;
             #region 绉诲姩鍔ㄧ敾
-            var distance = navigationSelectionView.X - intellectualizationView.X;
+            var distance = navigationSelectionView.X - intellectualizationView.X + Application.GetRealWidth(94 * 3);
             int total = 10;
             int sleepTime = 300;
             if (distance > 100 || distance < -100)
@@ -395,6 +457,10 @@
                 int index = 0;
                 while (index < total+1)
                 {
+                    if(CurAnimationEffect!=2)
+                    {
+                        break;
+                    }
                     Application.RunOnMainThread(() =>
                     {
                         //绉诲姩
@@ -404,8 +470,15 @@
                         }
                         else
                         {
-                            navigationSelectionView.X = intellectualizationView.X;
+                            navigationSelectionView.X = intellectualizationView.X - Application.GetRealWidth(94 * 3);
                             btnIntellectualizationText.IsSelected = true;
+                            btnIntellectualizationIcon.IsSelected = true;
+                            btnCollectionText.IsSelected = false;
+                            btnClassificationText.IsSelected = false;
+                            btnPersonalCenterText.IsSelected = false;
+                            btnCollectionIcon.IsSelected = false;
+                            btnClassificationIcon.IsSelected = false;
+                            btnPersonalCenterIcon.IsSelected = false;
                         }
                         if (index == (total / 2 ))
                         {
@@ -427,6 +500,7 @@
             })
             { IsBackground = true }.Start();
             #endregion
+            ContextView.RemoveAll();
         }
 
         /// <summary>
@@ -434,12 +508,16 @@
         /// </summary>
         void ChoosePersonalCenter()
         {
+            CurAnimationEffect = 3;
             btnCollectionText.IsSelected = false;
             btnClassificationText.IsSelected = false;
             btnIntellectualizationText.IsSelected = false;
             btnPersonalCenterText.IsSelected = false;
+            btnCollectionIcon.IsSelected = false;
+            btnClassificationIcon.IsSelected = false;
+            btnIntellectualizationIcon.IsSelected = false;
             #region 绉诲姩鍔ㄧ敾
-            var distance = navigationSelectionView.X - personalCenterView.X;
+            var distance = navigationSelectionView.X - personalCenterView.X + Application.GetRealWidth(94 * 3);
             int total = 10;
             int sleepTime = 300;
             if (distance < -200)
@@ -457,6 +535,10 @@
                 int index = 0;
                 while (index < total+1)
                 {
+                    if (CurAnimationEffect != 3)
+                    {
+                        break;
+                    }
                     Application.RunOnMainThread(() =>
                     {
                         //绉诲姩
@@ -466,8 +548,15 @@
                         }
                         else
                         {
-                            navigationSelectionView.X = personalCenterView.X;
+                            navigationSelectionView.X = personalCenterView.X - Application.GetRealWidth(94 * 3);
                             btnPersonalCenterText.IsSelected = true;
+                            btnPersonalCenterIcon.IsSelected = true;
+                            btnCollectionText.IsSelected = false;
+                            btnClassificationText.IsSelected = false;
+                            btnIntellectualizationText.IsSelected = false;
+                            btnCollectionIcon.IsSelected = false;
+                            btnClassificationIcon.IsSelected = false;
+                            btnIntellectualizationIcon.IsSelected = false;
                         }
                         if (index == (total / 2 ))
                         {
@@ -484,7 +573,8 @@
             #endregion
 
 
-            var personalCenterPage = new UI2.PersonalCenterPage();
+            ContextView.RemoveAll();
+            var personalCenterPage = new UI.PersonalCenterPage();
             ContextView.AddChidren(personalCenterPage);
             personalCenterPage.LoadView();
         }

--
Gitblit v1.8.0