From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 30 八月 2022 09:37:38 +0800 Subject: [PATCH] 合并了IOS的代码 --- ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirerCardControl.cs | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 103 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirerCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirerCardControl.cs new file mode 100644 index 0000000..9a6a6c0 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceAirerCardControl.cs @@ -0,0 +1,103 @@ +using Shared.Phone.UserCenter; +using System; +using System.Collections.Generic; +using System.Text; +using ZigBee.Device; + +namespace Shared.Phone.MainPage.Controls +{ + /// <summary> + /// 鏅捐。鏋跺崱鐗囨帶浠� + /// </summary> + public class DeviceAirerCardControl : 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; + //鏅捐。鏋剁被鍨嬬殑娣卞害鍗$墖鐣岄潰 + var form = new MainPage.ControlForm.DeviceAirerDetailCardForm(); + form.RowOrCardControl = this; + form.AddForm(i_device, this.nowSelectRoom, 965, 1316); + form.FormCloseEvent += this.CardDetailInfoBackEvent; + }; + } + + #endregion + + #region 鈻� 妫�娴嬭澶囨墦寮�鐘舵�乢__________________ + + /// <summary> + /// 妫�娴嬭澶囨墦寮�鐘舵�� + /// </summary> + /// <param name="i_device"></param> + /// <returns></returns> + public override bool CheckIsOpenStatu(CommonDevice i_device) + { + bool isOpen = false; + var airer = device as Airer; + if (airer.OnOffStatus == 1 + || airer.DryOnOffStatus == 1 || + airer.WindOnOffStatus == 1 || + airer.DisinfectOnOffStatus == 1) + { + isOpen = true; + } + return isOpen; + } + + #endregion + + #region 鈻� 鍙戦�佽幏鍙栫姸鎬佸懡浠__________________ + + /// <summary> + /// 鍙戦�佽幏鍙栫姸鎬佸懡浠� + /// </summary> + public override void SendStatuComand() + { + if (Common.Config.Instance.Home.IsVirtually == true) + { + //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥 + return; + } + //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠� + if (this.CheckCanSendStatuComand() == true) + { + for (int i = 2; i < 6; i++) + { + //娉ㄦ剰锛岃。鏋朵腑鐨勭姸鎬佺敱涓嶅悓绔偣鑾峰彇 + //鍥炶矾2:璇诲彇鐓ф槑寮�鍏崇姸鎬� + //鍥炶矾3:璇诲彇椋庡共寮�鍏崇姸鎬佸拰鏃堕棿鍊� + //鍥炶矾4:璇诲彇鐑樺共寮�鍏崇姸鎬佸拰鏃堕棿鍊� + //鍥炶矾5:璇诲彇娑堟瘨寮�鍏崇姸鎬佸拰鏃堕棿鍊� + HdlDeviceAttributeLogic.Current.SendAirerComand(this.device, i); + } + } + } + + #endregion + } +} -- Gitblit v1.8.0