From 343536d04f83c518043610ea297030b9c0ce029c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 16 十二月 2020 10:44:15 +0800
Subject: [PATCH] Merge branch 'CJL' into NewFilePath

---
 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs       |   23 +++++++++++
 DLL/Shared.IOS.dll                            |    0 
 HDL-ON_iOS/Info.plist                         |    2 +
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs          |    6 +++
 HDL_ON/Common/HDLCommon.cs                    |    7 +++
 HDL-ON_iOS/AppDelegate.cs                     |    2 -
 HDL-ON_Android/Application.cs                 |    1 
 HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs |   61 ++++++++++++++++++++++++++++--
 8 files changed, 96 insertions(+), 6 deletions(-)

diff --git a/DLL/Shared.IOS.dll b/DLL/Shared.IOS.dll
index c738f20..da37a64 100644
--- a/DLL/Shared.IOS.dll
+++ b/DLL/Shared.IOS.dll
Binary files differ
diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs
index 0325145..f676103 100644
--- a/HDL-ON_Android/Application.cs
+++ b/HDL-ON_Android/Application.cs
@@ -103,6 +103,7 @@
                 //UserInfo.Current.unlockTime = DateTime.Now;
             };
 
+       
 
             HDLUtils.SetAuthoritiesName("com.hdl.onpro.fileProvider");
 
diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index 456c684..437d7e3 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -221,8 +221,6 @@
             Shared.Application.IsEditTextContentTypePassword = false;
             //榛樿浣跨敤鑻规柟瀛椾綋
             Shared.Application.IsUsePingFang = true;
-            ////榛樿绂佹闊充箰鏈嶅姟
-            //Shared.Application.IsMusicEnable = false;
             //淇濇寔灞忓箷甯镐寒鎴栬�呰嚜鍔ㄩ攣灞�
             application.IdleTimerDisabled = false;
 
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index 9c75308..e751f19 100755
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -119,5 +119,7 @@
 	</array>
 	<key>NSFaceIDUsageDescription</key>
 	<string>Need to use Face ID for unlock verification</string>
+	<key>CFBundleAllowMixedLocalizations</key>
+	<true/>
 </dict>
 </plist>
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 1a52ef4..9fecf94 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -15,6 +15,11 @@
     /// </summary>
     public class HDLCommon
     {
+        /// <summary>
+        /// 鏀跺埌鎺ㄩ�丄ction浜嬩欢
+        /// </summary>
+        public static Action GetPushMessageAction;
+
         #region 鈻� 鍙橀噺澹版槑___________________________
         /// <summary>
         /// 閫氱敤鏂规硶
@@ -256,6 +261,7 @@
                         new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show();
                         //閫�鍑虹櫥褰曟搷浣�
                         CheckLogout();
+                     
                     });
                     return;
                 }
@@ -264,6 +270,7 @@
                     Shared.Application.RunOnMainThread(() =>
                     {
                         new Alert(jpushMessageInfo.Title, jpushMessageInfo.Content, Language.StringByID(StringId.Close)).Show();
+                        //GetPushMessageAction?.Invoke();
                     });
                     return;
                 }
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 804209e..27a3b26 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -94,6 +94,12 @@
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
         }
 
+        public override void RemoveFromParent()
+        {
+            UnregisterGetPushMessageAction();
+            base.RemoveFromParent();
+        }
+
         public void LoadPage()
         {
             try
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 27e7a31..8fbad13 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -282,6 +282,7 @@
 
                 //鎴块棿鍒犻櫎浜嬩欢
                 Action backAction = () => {
+                    RegisterGetPushMessageAction();
                     GetUnreadPushMessages();
                 };
 
@@ -411,6 +412,28 @@
             }
         }
 
+        /// <summary>
+        /// 娉ㄥ唽鏀跺埌鎺ㄩ�佺洃鍚�
+        /// </summary>
+        void RegisterGetPushMessageAction()
+        {
+            //HDLCommon.GetPushMessageAction = () => {
+            //    if (bodyView != null)
+            //    {
+            //        Utlis.WriteLine("GetPushMessageAction H鏀跺埌鎺ㄩ��");
+            //        GetUnreadPushMessages();
+            //    }
+            //};
+        }
+
+        /// <summary>
+        /// 鍙栨秷鏀跺埌鎺ㄩ�佺洃鍚�
+        /// </summary>
+        void UnregisterGetPushMessageAction()
+        {
+            //HDLCommon.GetPushMessageAction = null;
+        }
+
         #endregion
 
     }
diff --git a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
index d398b7e..4f8def7 100644
--- a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
@@ -4,7 +4,9 @@
 using System.Collections.Generic;
 using System.Threading;
 using HDL_ON.DAL.Server;
-
+#if DEBUG
+using Xamarin.Essentials;
+#endif
 namespace HDL_ON.UI
 {
     /// <summary>
@@ -43,6 +45,12 @@
         List<PushMessageInfo> PushMessageInfoList = new List<PushMessageInfo>();
 
 
+        public override void RemoveFromParent()
+        {
+            UnregisterGetPushMessageAction();
+            base.RemoveFromParent();
+        }
+
         /// <summary>
         /// 
         /// </summary>
@@ -63,7 +71,7 @@
             AddTopMenuView();
             AddMessageView();
             MenuButtonSelect(showMesType);
-
+            RegisterGetPushMessageAction();
             //娴嬭瘯浠g爜
             //AddEmptyTipView();
             //TestLoad();
@@ -99,6 +107,14 @@
                 MenuButtonSelect(0);
             };
             allMenuButton.SelectAction = allAction;
+
+#if DEBUG
+            //娴嬭瘯鎻愬墠褰撳墠鎺ㄩ�両D
+            allMenuButton.ImageButton.MouseLongEventHandler = (sender, e) =>
+            {
+                CopyToClipboard("鎺ㄩ�両D锛�" + OnAppConfig.Instance.PushId);
+            };
+#endif
             #endregion
 
             #region 鍒嗕韩涓庡姛鑳�
@@ -426,7 +442,8 @@
             bodyScrolView.RemoveAll();
             PushMessageInfoList.Clear();
             YearMark = "";//鏍囪娓呯┖
-            if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) {
+            if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId))
+            {
                 AddEmptyTipView();
                 return;
             }
@@ -590,7 +607,8 @@
         /// <summary>
         /// 鏍囪鎵�鏈夋帹閫佹秷鎭凡璇�
         /// </summary>
-        void PushSerivceMarkAllMessageRead() {
+        void PushSerivceMarkAllMessageRead()
+        {
             new Thread(() =>
             {
                 var result = new HttpServerRequest().PushSerivceMarkAllMessageRead();
@@ -608,6 +626,41 @@
             { IsBackground = true }.Start();
         }
 
+        /// <summary>
+        /// 娉ㄥ唽鏀跺埌鎺ㄩ�佺洃鍚�
+        /// </summary>
+        void RegisterGetPushMessageAction()
+        {
+            //HDLCommon.GetPushMessageAction = () =>
+            //{
+            //    if (bodyView != null)
+            //    {
+            //        Utlis.WriteLine("GetPushMessageAction M鏀跺埌鎺ㄩ��");
+            //        GetPushMessageList(showMesType);
+            //    }
+            //};
+        }
+
+        /// <summary>
+        /// 鍙栨秷鏀跺埌鎺ㄩ�佺洃鍚�
+        /// </summary>
+        void UnregisterGetPushMessageAction()
+        {
+            //HDLCommon.GetPushMessageAction = null;
+        }
+
+#if DEBUG
+
+        /// <summary>
+        /// 澶嶅埗鍒板壀鍒囨澘
+        /// </summary>
+        /// <param name="text"></param>
+        void CopyToClipboard(string text)
+        {
+            Clipboard.SetTextAsync(text);
+            Utlis.ShowTip(text + "\n" + Language.StringByID(StringId.CopySuccess));
+        }
+#endif
 
     }
 

--
Gitblit v1.8.0