From 9904031f5291daaf56985146bb671f25e18ebbdf Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 02 四月 2020 19:51:31 +0800
Subject: [PATCH] 最新代码
---
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
index 89f1059..4dc0ec2 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
@@ -109,6 +109,7 @@
{
//娌℃湁鐘舵�佸姛鑳�,鍒欐妸璁惧鍚嶅瓧鎺т欢涓�
this.btnDeviceName.Gravity = Gravity.CenterVertical;
+ btnDeviceName.Y += this.chidrenYaxis;
}
//鎷ユ湁鐘舵�佸姛鑳�
if (this.hadStatuFunction == true)
@@ -143,30 +144,28 @@
{
//鍏抽棴宸︽粦鑿滃崟
this.HideMenu();
- var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
- UserView.HomePage.Instance.AddChidren(detailInfo);
- UserView.HomePage.Instance.PageIndex += 1;
- detailInfo.Show(i_device, HdlRoomLogic.Current.CurrentRoom);
- detailInfo.EditAction += (curDevice, curRoom) =>
+ var detailInfo = new MainPage.DeviceDetailInfoForm();
+ detailInfo.AddForm(i_device, HdlRoomLogic.Current.CurrentRoom);
+ detailInfo.FormCloseEvent += (curDevice, curRoom) =>
{
if (HdlRoomLogic.Current.CurrentRoom.IsLove == true)
{
//褰撳墠鏄枩鐖辨埧闂存椂
if (HdlRoomLogic.Current.IsCollectInRoom(this.device) == false)
{
- //鎴块棿鏀瑰彉浜�
- this.RemoveFromParent();
//鍥炶皟鎺т欢琚Щ闄ょ殑浜嬩欢
this.RowNeedRemoveEvent?.Invoke();
+ //鎴块棿鏀瑰彉浜�
+ this.RemoveFromParent();
return;
}
}
else if (HdlRoomLogic.Current.CurrentRoom.Id != curRoom.Id)
{
- //鎴块棿鏀瑰彉浜�
- this.RemoveFromParent();
//鍥炶皟鎺т欢琚Щ闄ょ殑浜嬩欢
this.RowNeedRemoveEvent?.Invoke();
+ //鎴块棿鏀瑰彉浜�
+ this.RemoveFromParent();
return;
}
//鍒锋柊鎺т欢鐘舵��
@@ -189,9 +188,9 @@
//浠庢埧闂翠腑绉婚櫎
HdlRoomLogic.Current.DeleteDevice(i_device);
}
- this.RemoveFromParent();
//鍥炶皟鎺т欢琚Щ闄ょ殑浜嬩欢
this.RowNeedRemoveEvent?.Invoke();
+ this.RemoveFromParent();
};
};
}
@@ -233,6 +232,12 @@
this.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
//妫�娴嬭澶囨槸鍚︽槸鎵撳紑鐘舵��
bool isOpen = this.CheckIsOpenStatu(i_device);
+ if (this.isHadOpenSwitch == true && i_device.HadReadDeviceStatu == false)
+ {
+ //濡傛灉杩欎釜鍗$墖鏈夊紑鍏冲姛鑳�,骞朵笖缃戝叧杩樻病鏈夊洖澶嶄箣鍓�,榛樿鏄叧闂姸鎬�
+ //绛夊緟缃戝叧鍥炲鍚庝細閲嶆柊鍒锋柊,涓嶇劧涓�鐩存槸鍏抽棴鐘舵��
+ isOpen = false;
+ }
this.SetRowOpenStatu(isOpen);
}
@@ -346,6 +351,8 @@
//宸茬粡鍙栨秷鐨勬敹钘�
if (HdlRoomLogic.Current.IsCollectInRoom(device) == false)
{
+ //鍥炶皟鎺т欢琚Щ闄ょ殑浜嬩欢
+ this.RowNeedRemoveEvent?.Invoke();
//绉婚櫎杩欎釜鎺т欢
this.RemoveFromParent();
return;
@@ -357,6 +364,8 @@
var nowRoom = HdlRoomLogic.Current.GetRoomByDevice(device);
if (nowRoom == null || nowRoom.Id != HdlRoomLogic.Current.CurrentRoom.Id)
{
+ //鍥炶皟鎺т欢琚Щ闄ょ殑浜嬩欢
+ this.RowNeedRemoveEvent?.Invoke();
//绉婚櫎杩欎釜鎺т欢
this.RemoveFromParent();
return;
--
Gitblit v1.8.0