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/UserCenter/Device/DeviceListMainForm.cs | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs index a80cecc..04fb935 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs @@ -22,6 +22,10 @@ /// </summary> private VerticalListRefreshControl listView = null; /// <summary> + /// 鍓嶄竴娆℃樉绀哄嚭宸︽粦鑿滃崟鐨凴owLayout + /// </summary> + private RowLayoutControl oldShowRightMuneRow = null; + /// <summary> /// 琛屾帶浠剁殑淇℃伅(Keys锛歁ac鍦板潃) /// </summary> private Dictionary<string, DeviceObjRowInfo> dicRowInfo = new Dictionary<string, DeviceObjRowInfo>(); @@ -214,6 +218,7 @@ //鎺т欢 var rowMenu = new DeviceObjectControl(deviceMac, listView.rowSpace / 2); + rowMenu.MainKeys = deviceMac; frameTable.AddChidren(rowMenu); rowMenu.InitControl(); rowInfo.MenuRow = rowMenu; @@ -276,6 +281,16 @@ //鐣岄潰璺宠浆,璁板綍褰撳墠鐨勬鍦ㄦ搷浣滅殑璁惧鐨凪ac鍦板潃 this.nowActionDeviceMac = deviceMac; }; + //宸︽粦鑿滃崟浜嬩欢 + rowMenu.OpenMenuAction += () => + { + if (this.oldShowRightMuneRow != null && this.oldShowRightMuneRow.MainKeys != rowMenu.MainKeys) + { + //宸︽粦鑿滃崟鍙兘婊戜竴涓� + this.oldShowRightMuneRow.HideMenu(); + } + this.oldShowRightMuneRow = rowMenu; + }; } #endregion @@ -331,6 +346,7 @@ //琛屾帶浠� var rowDevice = new DeviceRoomControl(device, frame.rowSpace / 2); + rowDevice.MainKeys = LocalDevice.Current.GetDeviceMainKeys(device); frame.AddChidren(rowDevice); rowDevice.frameTable.LeftOffset = Application.GetRealWidth(173) - ControlCommonResourse.XXLeft; rowDevice.InitControl(); @@ -370,6 +386,16 @@ //鏄剧ず璁惧鍔熻兘閰嶇疆鐣岄潰 this.ShowDeviceFunctionSettionForm(device, deviceEnumInfo); }; + //宸︽粦鑿滃崟浜嬩欢 + rowDevice.OpenMenuAction += () => + { + if (this.oldShowRightMuneRow != null && this.oldShowRightMuneRow.MainKeys != rowDevice.MainKeys) + { + //宸︽粦鑿滃崟鍙兘婊戜竴涓� + this.oldShowRightMuneRow.HideMenu(); + } + this.oldShowRightMuneRow = rowDevice; + }; } /// <summary> -- Gitblit v1.8.0