private void ProcessNotes(CellClass cell, Int32 index) { switch (cell.CellState) // What is the cell state? { case CellStateEnum.Notes: // Already showing notes? cell.Notes[index].State = !cell.Notes[index].State; // Yes, then toggle the state of the specified note break; case CellStateEnum.Blank: // Blank? cell.ClearNotes(); // Clear all notes cell.CellState = CellStateEnum.Notes; // Set the state to notes cell.Notes[index].State = !cell.Notes[index].State; // Toggle the state of the specified note break; } }