黄学彪
2020-04-02 9904031f5291daaf56985146bb671f25e18ebbdf
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -22,6 +22,10 @@
        /// </summary>
        private VerticalListRefreshControl listView = null;
        /// <summary>
        /// 前一次显示出左滑菜单的RowLayout
        /// </summary>
        private RowLayoutControl oldShowRightMuneRow = null;
        /// <summary>
        /// 行控件的信息(Keys:Mac地址)
        /// </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 @@
                //界面跳转,记录当前的正在操作的设备的Mac地址
                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>