From 09dfbfd9b77ec887c17b10f15799a1d3f56e4e17 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 15 十二月 2020 12:04:42 +0800
Subject: [PATCH] 2020-12-15-1

---
 HDL_ON/UI/UI2/UserPage.cs |   70 +++++++++++++++++++++++++++-------
 1 files changed, 55 insertions(+), 15 deletions(-)

diff --git a/HDL_ON/UI/UI2/UserPage.cs b/HDL_ON/UI/UI2/UserPage.cs
index 2366b11..51e922d 100644
--- a/HDL_ON/UI/UI2/UserPage.cs
+++ b/HDL_ON/UI/UI2/UserPage.cs
@@ -2,6 +2,7 @@
 using HDL_ON.Entity;
 using Shared;
 using HDL_ON.UI.CSS;
+using HDL_ON.DAL.Server;
 
 namespace HDL_ON.UI
 {
@@ -102,7 +103,7 @@
                 bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
                 ContextView = new FrameLayout()
                 {
-                    Height = Application.GetRealHeight(618 + 20 +10),
+                    Height = Application.GetRealHeight(618 + 17),//瀵艰埅鏍忓簳閮ㄧ晫闄�
                     BackgroundColor = CSS_Color.BackgroundColor,
                 };
                 bodyView.AddChidren(ContextView);
@@ -128,8 +129,11 @@
                 ContextView.AddChidren(homePage);
                 homePage.LoadPage();
 
-                //鍒锋柊鍔熻兘鐘舵��
-                DB_ResidenceData.residenceData.RefreshResidenceFunctionStatus();
+                //娉ㄥ唽鎺ㄩ�両D
+                RegisteredPush();
+                //2020-12-07 澧炲姞鐗堟湰妫�娴嬫洿鏂版柟娉�
+                HDLCommon.Current.CheckIfNeedForceUpdate();
+
             }
             catch (Exception ex)
             {
@@ -147,7 +151,7 @@
                 X = Application.GetRealWidth(0 - 94 * 3),
                 Y = Application.GetMinRealAverage(4),
                 Width = Application.GetRealWidth(94 * 7),
-                Height = Application.GetMinRealAverage(38),
+                Height = Application.GetRealWidth(38),
                 BackgroundImagePath = "Navigation/UserPageNavbg.png",
             };
             navigationView.AddChidren(navigationSelectionView);
@@ -155,10 +159,10 @@
             btnNavigationSelectionIcon = new Button()
             {
                 Gravity = Gravity.CenterHorizontal,
-                Y = Application.GetMinRealAverage(6),
-                Width = Application.GetMinRealAverage(22),
-                Height = Application.GetMinRealAverage(22),
-                UnSelectedImagePath = "Navigation/CollectionIconOn.png",
+                Y = Application.GetRealWidth(6),
+                Width = Application.GetRealWidth(22),
+                Height = Application.GetRealWidth(22),
+                UnSelectedImagePath = "Navigation/HomePageIconOn.png",
             };
             navigationSelectionView.AddChidren(btnNavigationSelectionIcon);
 
@@ -180,7 +184,7 @@
                 Y = Application.GetRealHeight(5),
                 Width = Application.GetMinRealAverage(22),
                 Height = Application.GetMinRealAverage(22),
-                UnSelectedImagePath = "Navigation/CollectionIcon.png",
+                UnSelectedImagePath = "Navigation/HomePageIcon.png",
                 SelectedImagePath = "Public/transparent.png",
                 IsSelected = true,
             };
@@ -358,10 +362,11 @@
                             btnClassificationText.IsSelected = false;
                             btnIntellectualizationText.IsSelected = false;
                             btnPersonalCenterText.IsSelected = false;
+                            btnNavigationSelectionIcon.UnSelectedImagePath = "Navigation/HomePageIconOn.png";
                         }
                         if (index == (total/2))
                         {
-                            btnNavigationSelectionIcon.UnSelectedImagePath = "Navigation/CollectionIconOn.png";
+                            btnNavigationSelectionIcon.UnSelectedImagePath = "Navigation/HomePageIconOn.png";
                         }
                         //鏃嬭浆
                         btnNavigationSelectionIcon.SetRotation(-36f * index);
@@ -369,7 +374,12 @@
                     System.Threading.Thread.Sleep(sleepTime / total);
                     index++;
                 }
-            }) { IsBackground = true }.Start();
+
+                Application.RunOnMainThread(() =>
+                {
+                    btnNavigationSelectionIcon.SetRotation(0f);
+                });
+            }) { IsBackground = true ,Priority = System.Threading.ThreadPriority.Highest}.Start();
             #endregion
             ContextView.RemoveAll();
             var homePage = new HomePage();
@@ -433,6 +443,7 @@
                             btnCollectionText.IsSelected = false;
                             btnIntellectualizationText.IsSelected = false;
                             btnPersonalCenterText.IsSelected = false;
+                            btnNavigationSelectionIcon.UnSelectedImagePath = "Navigation/ClassificationIconOn.png";
                         }
                         if (index == (total / 2 ))
                         {
@@ -451,8 +462,13 @@
                     System.Threading.Thread.Sleep(sleepTime / total);
                     index++;
                 }
+
+                Application.RunOnMainThread(() =>
+                {
+                    btnNavigationSelectionIcon.SetRotation(0f);
+                });
             })
-            { IsBackground = true }.Start();
+            { IsBackground = true, Priority = System.Threading.ThreadPriority.Highest }.Start();
             #endregion
             ContextView.RemoveAll();
             var classificaitionView = new ClassificationPage();
@@ -517,6 +533,7 @@
                             btnCollectionIcon.IsSelected = false;
                             btnClassificationIcon.IsSelected = false;
                             btnPersonalCenterIcon.IsSelected = false;
+                            btnNavigationSelectionIcon.UnSelectedImagePath = "Navigation/IntellectualizationIconOn.png";
                         }
                         if (index == (total / 2 ))
                         {
@@ -535,10 +552,20 @@
                     System.Threading.Thread.Sleep(sleepTime / total);
                     index++;
                 }
+
+                Application.RunOnMainThread(() =>
+                {
+                    btnNavigationSelectionIcon.SetRotation(0f);
+                });
             })
-            { IsBackground = true }.Start();
+            { IsBackground = true, Priority = System.Threading.ThreadPriority.Highest }.Start();
             #endregion
             ContextView.RemoveAll();
+            var intelligenceView = new IntelligencePage();
+            ContextView.AddChidren(intelligenceView);
+            intelligenceView.LoadPage();
+
+            
         }
 
         /// <summary>
@@ -547,7 +574,7 @@
         void ChoosePersonalCenter()
         {
 #if DEBUG
-            if(MainPage.LocalMode)
+            if(MainPage.NoLoginMode)
             {
                 return;
             }
@@ -604,6 +631,7 @@
                             btnCollectionIcon.IsSelected = false;
                             btnClassificationIcon.IsSelected = false;
                             btnIntellectualizationIcon.IsSelected = false;
+                            btnNavigationSelectionIcon.UnSelectedImagePath = "Navigation/PersonalCenterIconOn.png";
                         }
                         if (index == (total / 2 ))
                         {
@@ -615,8 +643,12 @@
                     System.Threading.Thread.Sleep(sleepTime / total);
                     index++;
                 }
+                Application.RunOnMainThread(() =>
+                {
+                    btnNavigationSelectionIcon.SetRotation(0f);
+                });
             })
-            { IsBackground = true }.Start();
+            { IsBackground = true, Priority = System.Threading.ThreadPriority.Highest }.Start();
             #endregion
 
             ContextView.RemoveAll();
@@ -624,5 +656,13 @@
             ContextView.AddChidren(personalCenterPage);
             personalCenterPage.LoadView();
         }
+
+        /// <summary>
+        /// 娉ㄥ唽鎺ㄩ��
+        /// </summary>
+        void RegisteredPush()
+        {
+            new HttpServerRequest().RegisteredPush();
+        }
     }
 }

--
Gitblit v1.8.0