public static ListViewItem ToListViewItem(PreguntaIdioma preguntaIdioma) { ListViewItem item = new ListViewItem(); item.SubItems.Add(preguntaIdioma.Pregunta); item.SubItems.Add(preguntaIdioma.RespuestaCorrecta); item.SubItems.Add(preguntaIdioma.RespuestaIncorrecta1); item.SubItems.Add(preguntaIdioma.RespuestaIncorrecta2); item.SubItems.Add(preguntaIdioma.RespuestaIncorrecta3); item.Tag = preguntaIdioma; if (preguntaIdioma == null || preguntaIdioma.isEmpty()) { item.BackColor = ColorTranslator.FromHtml("#ffb2ae"); } else { item.BackColor = ColorTranslator.FromHtml("#aeffb2"); } item.Text = numero.ToString(); numero++; return(item); }