From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 17 十二月 2020 09:07:13 +0800
Subject: [PATCH] 新云端Ver1.3

---
 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs |   44 ++++++++++++++++++++++++--------------------
 1 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs
index 2742a12..e9459e7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs
@@ -55,13 +55,13 @@
             //娓呯┖bodyFrame
             this.ClearBodyFrame();
 
-            HdlThreadLogic.Current.RunThread(async () =>
+            HdlThreadLogic.Current.RunThread(() =>
             {
                 //寮�鍚繘搴︽潯
                 this.ShowProgressBar();
 
                 //鑾峰彇缃戝叧鏂扮増鏈俊鎭�
-                this.listVersionInfo = await HdlGatewayLogic.Current.GetGatewayAllNewVersion(this.zbGateway);
+                this.listVersionInfo = HdlGatewayLogic.Current.GetGatewayAllNewVersion(this.zbGateway);
                 if (listVersionInfo == null)
                 {
                     //鍏抽棴杩涘害鏉�
@@ -69,7 +69,7 @@
                     return;
                 }
                 //铏氭嫙椹卞姩鍙�
-                this.listVode = await HdlGatewayLogic.Current.GetListVDDriveCode(this.zbGateway);
+                this.listVode = HdlGatewayLogic.Current.GetListVDDriveCode(this.zbGateway);
                 //鍏抽棴杩涘害鏉�
                 this.CloseProgressBar();
 
@@ -100,7 +100,7 @@
 
             //褰撳墠鍥轰欢鐗堟湰
             var btnTitle = new NormalViewControl(700, 65, true);
-            btnTitle.X = ControlCommonResourse.XXLeft;
+            btnTitle.X = HdlControlResourse.XXLeft;
             btnTitle.Y = Application.GetRealHeight(30);
             btnTitle.TextID = R.MyInternationalizationString.uNowFirmwareVersion;
             btnTitle.TextSize = 15;
@@ -119,7 +119,7 @@
             rowLinux.ButtonClickEvent += (sender, e) =>
             {
                 var form = new GatewayLinuxInfoForm();
-                form.AddForm(HdlGatewayLogic.Current.GetGatewayId(this.zbGateway));
+                form.AddForm(this.zbGateway.GwId);
             };
 
             //鍗忚皟鍣�
@@ -130,7 +130,7 @@
             rowCoordinator.ButtonClickEvent += (sender, e) =>
             {
                 var form = new GatewayCoordinatorInfoForm();
-                form.AddForm(HdlGatewayLogic.Current.GetGatewayId(this.zbGateway));
+                form.AddForm(this.zbGateway.GwId);
             };
 
             if (this.listVode != null)
@@ -182,7 +182,7 @@
 
             //鏈�鏂板浐浠剁増鏈�
             var btnTitle = new NormalViewControl(700, 65, true);
-            btnTitle.X = ControlCommonResourse.XXLeft;
+            btnTitle.X = HdlControlResourse.XXLeft;
             btnTitle.Y = Application.GetRealHeight(30);
             btnTitle.TextID = R.MyInternationalizationString.uNewFirmwareVersion;
             btnTitle.TextSize = 15;
@@ -200,7 +200,7 @@
                 rowLinux.UseClickStatu = false;
                 listView.AddChidren(rowLinux);
                 rowLinux.AddLeftCaption("Linux", 300);
-                rowLinux.AddMostRightView(Common.LocalDevice.Current.AppendVersion(listVersionInfo[0].FirmwareVersion), 300);
+                rowLinux.AddMostRightView(HdlDeviceCommonLogic.Current.AppendVersion(listVersionInfo[0].FirmwareVersion), 300);
                 rowLinux.AddBottomLine();
             }
 
@@ -211,7 +211,7 @@
                 rowCoordinator.UseClickStatu = false;
                 listView.AddChidren(rowCoordinator);
                 rowCoordinator.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uCoordinator), 500);
-                rowCoordinator.AddMostRightView(Common.LocalDevice.Current.AppendVersion(listVersionInfo[1].FirmwareVersion), 300);
+                rowCoordinator.AddMostRightView(HdlDeviceCommonLogic.Current.AppendVersion(listVersionInfo[1].FirmwareVersion), 300);
                 rowCoordinator.AddBottomLine();
             }
 
@@ -222,7 +222,7 @@
                 rowVirtual.UseClickStatu = false;
                 listView.AddChidren(rowVirtual);
                 rowVirtual.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uVirtualDrive), 500);
-                rowVirtual.AddMostRightView(Common.LocalDevice.Current.AppendVersion(listVersionInfo[2].FirmwareVersion), 300);
+                rowVirtual.AddMostRightView(HdlDeviceCommonLogic.Current.AppendVersion(listVersionInfo[2].FirmwareVersion), 300);
                 rowVirtual.AddBottomLine();
             }
 
@@ -254,13 +254,17 @@
 
         #endregion
 
-        #region 鈻� 鍙充笂瑙掕彍鍗昣________________________
+        #region 鈻� 鍙充笂瑙掕彍鍗昣________________________
 
         /// <summary>
         /// 鍒濆鍖栧彸涓婅鑿滃崟
-        /// </summary>
+        /// </summary>
         private void InitTopRightMenu()
         {
+            if (HdlUserCenterResourse.HideOption.DeviceHistory != 1)
+            {
+                return;
+            }
             var btnIcon = new MostRightIconControl(69, 69);
             btnIcon.UnSelectedImagePath = "Item/More.png";
             topFrameLayout.AddChidren(btnIcon);
@@ -274,7 +278,7 @@
 
         /// <summary>
         /// 鏄剧ず鍙充笂瑙掕彍鍗曠晫闈�
-        /// </summary>
+        /// </summary>
         private void ShowTopRightMenu()
         {
             var frame = new TopRightMenuControl(1, 2);
@@ -309,7 +313,7 @@
         /// <summary>
         /// 娣诲姞鍥轰欢浠嬬粛琛�
         /// </summary>
-        /// <param name="listContent">鍒楄〃鎺т欢</param>
+        /// <param name="listContent">鍒楄〃鎺т欢</param>
         private void AddUpdateContent(VerticalListControl listContent)
         {
             //淇敼鍐呭
@@ -317,7 +321,7 @@
             frameContent.Height = Application.GetRealHeight(87);
             listContent.AddChidren(frameContent);
             var btnContent = new NormalViewControl(500, 87, true);
-            btnContent.X = ControlCommonResourse.XXLeft;
+            btnContent.X = HdlControlResourse.XXLeft;
             btnContent.Y = Application.GetRealHeight(28);
             btnContent.TextID = R.MyInternationalizationString.uEditorContent;
             btnContent.TextSize = 12;
@@ -401,13 +405,13 @@
             ProgressFormBar.Current.CloseEvent += () =>
             {
                 //鍗囩骇瀵硅薄
-                string gwId = HdlGatewayLogic.Current.GetGatewayId(realway);
-                if (FirmwareUpdateResourse.dicUpdateList.ContainsKey(gwId) == true
-                    && FirmwareUpdateResourse.dicUpdateList[gwId].IsFinishUpdate == true)
+                string gwId = realway.GwId;
+                if (HdlFirmwareUpdateResourse.dicUpdateList.ContainsKey(gwId) == true
+                    && HdlFirmwareUpdateResourse.dicUpdateList[gwId].IsFinishUpdate == true)
                 {
                     //濡傛灉缃戝叧宸茬粡鍗囩骇瀹屾垚锛岀晫闈㈠叧闂椂锛屽垯绉婚櫎鍐呭瓨
-                    FirmwareUpdateResourse.dicUpdateList[gwId].Dispose();
-                    FirmwareUpdateResourse.dicUpdateList.Remove(gwId);
+                    HdlFirmwareUpdateResourse.dicUpdateList[gwId].Dispose();
+                    HdlFirmwareUpdateResourse.dicUpdateList.Remove(gwId);
                 }
             };
         }

--
Gitblit v1.8.0