public void CollapseEntry() { if (selection is PhuneHeaderCell) { PhuneHeaderCell header = (PhuneHeaderCell)selection; header.expanded = true; header.Populate(false); int index = allCells.IndexOf(selection); selection = allCells[index + 1]; selection.Populate(true); } else { selection.Populate(false); PhuneHeaderCell header = null; foreach (PhuneCell cell in allCells) { if (cell is PhuneHeaderCell) { header = (PhuneHeaderCell)cell; } if (cell == selection) { header.expanded = false; header.Populate(true); selection = header; break; } } } UpdateSelection(); }
private void AddSection(string headerText, List <PhuneEntryCell> entries) { PhuneHeaderCell header = Instantiate(headerPrefab); header.Populate(false, false, headerText); AddCell(header); this.entries[header] = entries; foreach (PhuneEntryCell entry in entries) { AddCell(entry); } }