private void OnValueChange(CustomClothesScrollController.ScrollData _data, bool _isOn) { if (_isOn) { bool flag = !this.IsNowSelectInfo(_data?.info); this.selectInfo = _data; if (!flag) { return; } for (int index = 0; index < this.view.ShownItemCount; ++index) { LoopListViewItem2 shownItemByIndex = this.view.GetShownItemByIndex(index); if (!Object.op_Equality((Object)shownItemByIndex, (Object)null)) { CustomClothesScrollViewInfo component = (CustomClothesScrollViewInfo)((Component)shownItemByIndex).GetComponent <CustomClothesScrollViewInfo>(); for (int _index = 0; _index < this.countPerRow; ++_index) { if (!this.IsNowSelectInfo(component.GetListInfo(_index))) { component.SetToggleON(_index, false); } } } } if (this.onSelect != null) { this.onSelect(this.selectInfo.info); } if (this.selectInfo == null) { return; } this.SelectName = this.selectInfo.info.name; } else { if (!this.IsNowSelectInfo(_data?.info)) { return; } this.selectInfo = (CustomClothesScrollController.ScrollData)null; if (this.onDeSelect == null) { return; } this.onDeSelect(); } }
public void SetNowSelectToggle() { for (int index = 0; index < this.view.ShownItemCount; ++index) { LoopListViewItem2 shownItemByIndex = this.view.GetShownItemByIndex(index); if (!Object.op_Equality((Object)shownItemByIndex, (Object)null)) { CustomClothesScrollViewInfo component = (CustomClothesScrollViewInfo)((Component)shownItemByIndex).GetComponent <CustomClothesScrollViewInfo>(); for (int _index = 0; _index < this.countPerRow; ++_index) { component.SetToggleON(_index, this.IsNowSelectInfo(component.GetListInfo(_index))); } } } }