From ecba45c93391066bc30c7bd602c3a7683fbb99a7 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 31 七月 2020 10:56:12 +0800
Subject: [PATCH] 临时备份

---
 ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs b/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
index 8bec1a6..bb903da 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
@@ -17,13 +17,13 @@
         /// <summary>
         /// 鐣岄潰鍏抽棴浜嬩欢(璇ヤ簨浠剁洰鍓嶇粰鍒嗙被鐣岄潰鐨勮嚜瀹氫箟琛屾帶浠朵娇鐢�)
         /// </summary>
-        public Action<CommonDevice, Room> FormCloseEvent = null;
+        public Action FormCloseEvent = null;
         /// <summary>
         /// 璁惧瀵硅薄
         /// </summary>
         private CommonDevice device;
         /// <summary>
-        /// 鎴块棿瀵硅薄(杩欎釜鎴块棿鏈夊彲鑳芥槸鍠滅埍)
+        /// 鎴块棿瀵硅薄(杩欎釜鎴块棿鏈夊彲鑳芥槸鍠滅埍,鏈夊彲鑳芥槸null)
         /// </summary>
         private Room room = null;
         /// <summary>
@@ -104,7 +104,7 @@
             var btnBelongType = new NormalViewControl(700, 62, true);
             btnBelongType.Y = btnPic.Bottom + Application.GetRealHeight(35);
             btnBelongType.Gravity = Gravity.CenterHorizontal;
-            btnBelongType.TextID = infoType.BeloneTextId;
+            btnBelongType.Text = infoType.BeloneText;
             btnBelongType.TextSize = 15;
             btnBelongType.TextAlignment = TextAlignment.Center;
             listBackControl.frameTable.AddChidren(btnBelongType);
@@ -132,7 +132,7 @@
             };
 
             //鍠滅埍鎴块棿涓嶅厑璁稿彉鏇村尯鍩�
-            if (this.room.IsLove == false)
+            if (this.room == null || this.room.IsLove == false)
             {
                 //鎵�灞炲尯鍩�
                 var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
@@ -216,7 +216,7 @@
             var btnBelongType = new NormalViewControl(700, 62, true);
             btnBelongType.Y = btnPic.Bottom + Application.GetRealHeight(35);
             btnBelongType.Gravity = Gravity.CenterHorizontal;
-            btnBelongType.TextID = infoType.BeloneTextId;
+            btnBelongType.Text = infoType.BeloneText;
             btnBelongType.TextSize = 15;
             btnBelongType.TextAlignment = TextAlignment.Center;
             listBackControl.frameTable.AddChidren(btnBelongType);
@@ -232,7 +232,7 @@
             btnNote.AddBottomLine();
 
             //鍠滅埍鎴块棿涓嶅厑璁稿嚭鐜板尯鍩�
-            if (this.room.IsLove == false)
+            if (this.room == null || this.room.IsLove == false)
             {
                 //鎵�灞炲尯鍩�
                 caption = Language.StringByID(R.MyInternationalizationString.uBelongArea);
@@ -314,11 +314,11 @@
         /// 璁惧閲嶅懡鍚�
         /// </summary>
         /// <param name="i_deviceName">deviceName.</param>
-        private async void DeviceReName(string i_deviceName, bool closeForm)
+        private void DeviceReName(string i_deviceName, bool closeForm)
         {
             //淇敼MAC鍚�
             string deviceName = i_deviceName.Trim();
-            var result = await LocalDevice.Current.ReName(this.device, deviceName);
+            var result = LocalDevice.Current.ReName(this.device, deviceName);
             if (result == false)
             {
                 return;
@@ -345,7 +345,7 @@
         /// </summary>
         public override void CloseFormBefore()
         {
-            this.FormCloseEvent?.Invoke(this.device, this.room);
+            this.FormCloseEvent?.Invoke();
             this.FormCloseEvent = null;
 
             base.CloseFormBefore();

--
Gitblit v1.8.0