From c7df85937f73fb347ee0b19e9c052d2d00a6df6c Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 18 九月 2020 13:58:19 +0800
Subject: [PATCH] 新版本

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs |   47 +++++++++++++++++++++++++++++------------------
 1 files changed, 29 insertions(+), 18 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
index 2a7151f..9ae4829 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/NormalControls/MessageManagementControl.cs
@@ -14,23 +14,28 @@
         /// </summary>
         public MessageManagementControl()
         {
-            this.Height = Application.GetMinRealAverage(69);
-            this.Width = Application.GetMinRealAverage(69);
+            this.Height = this.GetPictrueRealSize(69);
+            this.Width = this.GetPictrueRealSize(69);
             this.UnSelectedImagePath = "Item/MessageManagement.png";
             this.SelectedImagePath = "Item/MessageManagementSelected.png";
-            this.ButtonClickEvent += (sender, e) =>
-            {
-                //鐐瑰嚮鍚�,娓呯┖鐘舵��
-                this.IsSelected = false;
-                ControlCommonResourse.HadNewMessage = false;
 
-                var form = new UserMain.MessageManagementForm();
-                form.AddForm();
-            };
-            //娣诲姞缂撳瓨
-            ControlCommonResourse.listMessageManaContr.Add(this);
-            //鍒锋柊鐘舵��
-            this.RefreshStatu();
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+            if (Common.Config.Instance.Home.IsVirtually == false)
+            {
+                this.ButtonClickEvent += (sender, e) =>
+                {
+                    //鐐瑰嚮鍚�,娓呯┖鐘舵��
+                    this.IsSelected = false;
+                    ControlCommonResourse.HadNewMessage = false;
+
+                    var form = new UserMain.MessageManagementForm();
+                    form.AddForm();
+                };
+                //娣诲姞缂撳瓨
+                ControlCommonResourse.listMessageManaContr.Add(this);
+                //鍒锋柊鐘舵��
+                this.RefreshStatu();
+            }
         }
 
         /// <summary>
@@ -38,6 +43,12 @@
         /// </summary>
         public void RefreshStatu()
         {
+            //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return;
+            }
+
             if (ControlCommonResourse.HadNewMessage == true)
             {
                 //濡傛灉宸茬粡鏈夋柊娑堟伅杩囨潵浜�,灏变笉鐢ㄨ浜�
@@ -52,13 +63,13 @@
             }
             ControlCommonResourse.ReadMessageAgain = false;
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 string nowHomeId = Common.Config.Instance.Home.Id;
                 var pra = new MessageInfoPra();
                 pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
 
-                var result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", false, pra, new List<string>() { "NotSetAgain", "NotCheck" });
+                var result = UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", false, pra, new List<string>() { "NotCheck" }, false);
                 if (string.IsNullOrEmpty(result) == true)
                 {
                     //鍑洪敊锛岄渶瑕侀噸鏂拌鍙�
@@ -81,11 +92,11 @@
                             continue;
                         }
                         ControlCommonResourse.HadNewMessage = true;
-                        Application.RunOnMainThread(() =>
+                        HdlThreadLogic.Current.RunMain(() =>
                         {
                             //鏈夋柊娑堟伅
                             this.IsSelected = true;
-                        });
+                        }, ShowErrorMode.NO);
                         break;
                     }
                 }

--
Gitblit v1.8.0