Пример #1
0
 private void PopulateRows()
 {
     while (_Rows.Count < _RowData.Count)
     {
         if (_Rows.Count < _RowData.Count)
         {
             ModRow row = new ModRow(_SmashProjectManager, _IsActiveList, _ModListType);
             row.Dock           = DockStyle.Top;
             row.modsListParent = this;
             _Rows.Add(row);
             row.Parent = panelModList;
         }
     }
     for (int i = _RowData.Count - 1; i > -1; --i)
     {
         ModRow myRow = _Rows[_Rows.Count - i - 1];
         if (_ModListType == ModListType.CharacterGeneral || _ModListType == ModListType.CharacterSlots)
         {
             myRow.ChangeSelectedFighter(_CurrentFighter);
         }
         myRow.UpdateData(_RowData[i]);
         myRow.Visible = true;
     }
     if (_Rows.Count > _RowData.Count)
     {
         for (int i = 0; i < _Rows.Count - _RowData.Count; ++i)
         {
             _Rows[i].Visible = false;
         }
     }
 }
Пример #2
0
 private void PopulateRows()
 {
     /*
      * for (int i = _Rows.Count - 1; i >= 0; --i)
      * {
      *  _Rows[i].Parent = null;
      *  _Rows[i].Dispose();
      *  _Rows.RemoveAt(i);
      * }*/
     while (_Rows.Count < _RowData.Count)
     {
         if (_Rows.Count < _RowData.Count)
         {
             ModRow row = new ModRow(_SmashProjectManager, true, ModsList.ModListType.CharacterSlots);
             row.Dock = DockStyle.Top;
             _Rows.Add(row);
             row.Parent = panelModList;
         }
     }
     for (int i = _RowData.Count - 1; i > -1; --i)
     {
         ModRow myRow = _Rows[_Rows.Count - i - 1];
         myRow.ChangeSelectedFighter(_CurrentFighter);
         myRow.UpdateData(_RowData[i]);
         myRow.Visible = true;
     }
     if (_Rows.Count > _RowData.Count)
     {
         for (int i = 0; i < _Rows.Count - _RowData.Count; ++i)
         {
             _Rows[i].Visible = false;
         }
     }
 }