/// <summary> /// Set the data of our Novel's cover page. /// </summary> /// <param name="novel"></param> private void SetPrjData(Novel novel) { //set the data for title, author, and synopsis novel.SetTitle(txtNvlTitle.Text); novel.SetAuthor(txtNvlAuthor.Text); novel.SetSynopsis(txtBoxSynopsis.Text); //clear the data for the lists. novel.GetGenres().RemoveRange(0, novel.GetGenres().Count()); novel.GetGenreIndexes().RemoveRange(0, novel.GetGenreIndexes().Count()); //add the data for each list. foreach (object item in lbGenres.SelectedItems) { novel.SetGenre(item.ToString()); } foreach (object item in lbGenres.SelectedIndices) { novel.SetGenreIndex(Convert.ToInt16(item)); } }