/// <summary> /// Get a Bible chapter from JwStore /// </summary> /// <param name="meps">MEPS Id</param> /// <returns>ICursor Bible chapter</returns> public ICursor QueryBible(NavStruct meps) { ICursor cursor = this.Database.Query( true, Type, new[] { KeyPublicationCode, KeyPublicationName, KeyArticleTitle, KeyArticleMEPSID, KeyArticleLocation, KeyArticleContent, KeyArticleGroup }, KeyPublicationCode + "=? AND " + KeyArticleMEPSID + "=?", new string[] { "nwt", meps.ToString() }, null, null, "_id", null); if (cursor != null) { cursor.MoveToFirst(); } return(cursor); }
public void ChangeArticle(int offset) { Console.WriteLine(Enum.GetName(typeof(Library), library)); int currentIndex = Array.IndexOf(primaryArticles.Select(a => a.ArticleMEPSID).ToArray(), SelectedArticle.ToString()); int index = currentIndex + offset; int last = primaryArticles.Count - 1; if (index > last) { index = 0; } else if (index < 0) { index = last; } NavStruct nav = NavStruct.Parse(primaryArticles[index].ArticleMEPSID); SelectedArticle = nav; DisplayArticles(); }