From d6fb0646531172f23648441c224cdcccd721b894 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期一, 14 十二月 2020 09:59:01 +0800
Subject: [PATCH] 请合并代码,完成晾衣架最终功能。

---
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DevicePmSensorCardControl.cs |   72 ++++++++++++++++++++++++++++++++++++
 1 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DevicePmSensorCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DevicePmSensorCardControl.cs
new file mode 100755
index 0000000..adc2a2a
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DevicePmSensorCardControl.cs
@@ -0,0 +1,72 @@
+锘縰sing Shared.Phone.UserCenter;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using ZigBee.Device;
+
+namespace Shared.Phone.MainPage.Controls
+{
+    /// <summary>
+    /// PM2.5鍗$墖鎺т欢
+    /// </summary>
+    public class DevicePmSensorCardControl : DeviceCardCommon
+    {
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鍒濆鍖栨帶浠�
+        /// </summary>
+        /// <param name="i_device"></param>
+        public override void InitControl(CommonDevice i_device, Common.Room i_nowSelectRoom)
+        {
+            base.InitControl(i_device, i_nowSelectRoom);
+
+            //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+            this.AddDetailInfoEvent(i_device);
+        }
+
+        #endregion
+
+        #region 鈻� 娣卞害鍗$墖淇℃伅_______________________
+
+        /// <summary>
+        /// 娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+        /// </summary>
+        private void AddDetailInfoEvent(CommonDevice i_device)
+        {
+            //娣卞害鍗$墖淇℃伅
+            this.ButtonClickEvent += (sender, e) =>
+            {
+                Common.CommonPage.Instance.IsDrawerLockMode = true;
+                //PM2.5浼犳劅鍣ㄧ被鍨嬬殑娣卞害鍗$墖鐣岄潰
+                var form = new ControlForm.DevicePmSensorDetailCardForm();
+                form.RowOrCardControl = this;
+                form.AddForm(i_device, this.nowSelectRoom, 965, 1374);
+                form.FormCloseEvent += this.CardDetailInfoBackEvent;
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 鍙戦�佽幏鍙栫姸鎬佸懡浠__________________
+
+        /// <summary>
+        /// 鍙戦�佽幏鍙栫姸鎬佸懡浠�
+        /// </summary>
+        public override void SendStatuComand()
+        {
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                return;
+            }
+            //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
+            if (this.CheckCanSendStatuComand() == true)
+            {
+                HdlDeviceAttributeLogic.Current.SendPmSensorComand(this.device);
+            }
+        }
+
+        #endregion
+    }
+}

--
Gitblit v1.8.0