Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public KJBibleBookDef?GetBookDef(string bookName)
 {
     return(KJBibleBookDef.Find(bookName));
 }