From 18b93d511dc764b469d7c4a7e755f7274f89cdb4 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 27 四月 2020 17:55:14 +0800 Subject: [PATCH] 2020-4-27-1 --- ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs | 31 +++++++++++++++++++------------ 1 files changed, 19 insertions(+), 12 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..04dc6ed 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) @@ -141,32 +142,28 @@ var btnEditor = this.AddEditorControl(); btnEditor.ButtonClickEvent += (sender, e) => { - //鍏抽棴宸︽粦鑿滃崟 - 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 +186,9 @@ //浠庢埧闂翠腑绉婚櫎 HdlRoomLogic.Current.DeleteDevice(i_device); } - this.RemoveFromParent(); //鍥炶皟鎺т欢琚Щ闄ょ殑浜嬩欢 this.RowNeedRemoveEvent?.Invoke(); + this.RemoveFromParent(); }; }; } @@ -233,6 +230,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 +349,8 @@ //宸茬粡鍙栨秷鐨勬敹钘� if (HdlRoomLogic.Current.IsCollectInRoom(device) == false) { + //鍥炶皟鎺т欢琚Щ闄ょ殑浜嬩欢 + this.RowNeedRemoveEvent?.Invoke(); //绉婚櫎杩欎釜鎺т欢 this.RemoveFromParent(); return; @@ -357,6 +362,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