Exemple #1
0
        /// <summary>
        /// Return a string giving all Ids of selected books,
        /// e.g "MAT, MRK, REV"
        /// </summary>
        /// <returns>list of books</returns>
        public string AllIds()
        {
            var result = new StringBuilder();

            for (int j = 0; j < selected.Length; ++j)
            {
                if (selected[j])
                {
                    string name = Canon.BookNumberToId(j + 1);
                    result.Append(name).Append(", ");
                }
            }

            if (result.Length != 0)
            {
                result.Remove(result.Length - 2, 2);
            }

            return(result.ToString());
        }
Exemple #2
0
 /// <summary>
 /// Remove a single book from BookSet.
 /// </summary>
 /// <param name="bookId">BookId (e.g. "GEN") to remove</param>
 public void Remove(string bookId)
 {
     selected[Canon.BookIdToNumber(bookId) - 1] = false;
 }