public void Close() { if (this.imageCursor != null) { this.imageCursor.Close(); this.imageCursor = null; } }
void QueryImages() { if (this.imageCursor != null) { this.imageCursor.Close(); } this.imageCursor = BooruApp.BooruApplication.Database.QueryRandomImagesForVoting(this.type); }
public DatabaseCursor <ImageDetails> QueryImagesWithTags(string tagString) { DatabaseCursor <ImageDetails> result = null; BooruApp.BooruApplication.Database.Mutex.ExecuteCriticalSection(() => { result = Queries.Images.FindImages.Execute(tagString); }); return(result); }
public DatabaseCursor <ImageDetails> QueryRandomImagesForVoting(BooruImageType type) { DatabaseCursor <ImageDetails> result = null; BooruApp.BooruApplication.Database.Mutex.ExecuteCriticalSection(() => { result = Queries.Images.NextVoteImages.Execute(type); }); return(result); }