Example #1
0
 public void SetNowSelectToggle()
 {
     for (int index1 = 0; index1 < this._view.ShownItemCount; ++index1)
     {
         LoopListViewItem2 shownItemByIndex = this._view.GetShownItemByIndex(index1);
         if (!Object.op_Equality((Object)shownItemByIndex, (Object)null))
         {
             GameCoordinateFileInfoComponent component = (GameCoordinateFileInfoComponent)((Component)shownItemByIndex).GetComponent <GameCoordinateFileInfoComponent>();
             for (int index2 = 0; index2 < this._countPerRow; ++index2)
             {
                 component.SetToggleOn(index2, this.IsNowSelectInfo(component.GetListInfo(index2)));
             }
         }
     }
 }
Example #2
0
        private LoopListViewItem2 OnUpdate(LoopListView2 view, int index)
        {
            if (index < 0)
            {
                return((LoopListViewItem2)null);
            }
            LoopListViewItem2 loopListViewItem2       = view.NewListViewItem(((Object)this._original).get_name());
            GameCoordinateFileInfoComponent component = (GameCoordinateFileInfoComponent)((Component)loopListViewItem2).GetComponent <GameCoordinateFileInfoComponent>();

            for (int index1 = 0; index1 < this._countPerRow; ++index1)
            {
                GameCoordinateFileScrollInfo.ScrollData data = this._scrollDatas.SafeGet <GameCoordinateFileScrollInfo.ScrollData>(index * this._countPerRow + index1);
                component.SetData(index1, data?.info, (Action <bool>)(isOn => this.OnValueChange(data, isOn)));
                component.SetToggleOn(index1, this.IsNowSelectInfo(data?.info));
            }
            return(loopListViewItem2);
        }
Example #3
0
 private void OnValueChange(GameCoordinateFileScrollInfo.ScrollData data, bool isOn)
 {
     if (isOn)
     {
         bool flag = !this.IsNowSelectInfo(data?.info);
         this.SelectData = data;
         if (!flag)
         {
             return;
         }
         for (int index1 = 0; index1 < this._view.ShownItemCount; ++index1)
         {
             LoopListViewItem2 shownItemByIndex = this._view.GetShownItemByIndex(index1);
             if (!Object.op_Equality((Object)shownItemByIndex, (Object)null))
             {
                 GameCoordinateFileInfoComponent component = (GameCoordinateFileInfoComponent)((Component)shownItemByIndex).GetComponent <GameCoordinateFileInfoComponent>();
                 for (int index2 = 0; index2 < this._countPerRow; ++index2)
                 {
                     if (!this.IsNowSelectInfo(component.GetListInfo(index2)))
                     {
                         component.SetToggleOn(index2, false);
                     }
                 }
             }
         }
         if (this.OnSelect == null)
         {
             return;
         }
         this.OnSelect(this.SelectData.info);
     }
     else
     {
         if (!this.IsNowSelectInfo(data?.info))
         {
             return;
         }
         this.SelectData = (GameCoordinateFileScrollInfo.ScrollData)null;
         if (this.OnDeselect == null)
         {
             return;
         }
         this.OnDeselect();
     }
 }