KJBibleItem CreateBibleItem(KeyValuePair <string, string> data) { KJBibleItem item = new KJBibleItem(); var split = data.Key.Split('|'); item.Book = KJBibleBookDef.Find(split[0]).Value; item.Chapter = int.Parse(split[1]); item.Verse = int.Parse(split[2]); item.Scripture = data.Value; return(item); }
public static Dictionary <string, KJBibleBookDef> GenerateBookDefs(string bookName, int chapterNum, int verseFromNum, int verseToNum) { var defs = new Dictionary <string, KJBibleBookDef>(); int count = CalTotalBibleNums(chapterNum, verseFromNum, verseToNum); KJBibleBookDef?def = KJBibleBookDef.Find(bookName); for (int i = 0; i < count; i++) { if (def.HasValue) { var key = string.Format("{0}|{1}|{2}", def.Value.Abbreviation2, chapterNum, verseFromNum + i); defs.Add(key, def.Value); } } return(defs); }
public KJBibleBookDef?GetBookDef(string bookName) { return(KJBibleBookDef.Find(bookName)); }