public FrontView(Verse verse) { UserInteractionEnabled = true; Data = verse; var memorizedImage = Images.HeartRedButton; var notMemorizedImage = Images.HeartGreyButton; TextArea = new UILabel { AutoresizingMask = UIViewAutoresizing.FlexibleWidth, BackgroundColor = UIColor.Clear, Font = UIFont.FromName("SourceSansPro-Bold", 22.5f), Frame = new RectangleF (0, 0, 475, 300), Text = Data.Title, TextAlignment = UITextAlignment.Center, TextColor = UIColor.DarkGray, }; ImageView = new UIImageView { Frame = new RectangleF (430, 260, 30f, 30f), UserInteractionEnabled = true }; if (UIScreen.MainScreen.Bounds.Height >= 568f) { TextArea.Frame = new RectangleF (0, 0, 568, 300); ImageView.Frame = new RectangleF (523, 260, 30f, 30f); } ImageView.Image = Data.Memorized ? UIImage.FromFile (memorizedImage) : UIImage.FromFile (notMemorizedImage); Add (TextArea); Add (ImageView); }
public void RemoveVerse(Verse v) { database.RemoveItem<Verse> (v); }
public Verse GetVerse(Verse v) { return database.GetItem<Verse> (v, v.Id); }
public void AddVerse(Verse v) { database.AddItem<Verse> (v); }
public bool VerseExists(Verse v) { return database.ItemExists<Verse> (v.Id); }
public VerseEditDialog(Verse verseToEdit) : base("Edit") { verse = verseToEdit; }
private async void SaveButtonClicked () { controller.FirstTourStepCompleted (); var nonEmptyVerseReferenceTextField = verseReference.Text.Length != 0; if (nonEmptyVerseReferenceTextField) { var verse = new Verse { Category = Category.Queue, Content = "Verse downloading...", Memorized = false, Title = verseReference.Text, Comments = verseComments.Text == "Comments" ? "" : verseComments.Text }; if (Reachability.IsHostReachable ("www.google.com")) { try { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; if (VersesTableViewController.Current.Verses.Any (item => item.Title == verse.Title)) { new UIAlertView ("Verse Already Exists", "Whoops, this verse is already in your library.", null, "Okay", null).Show(); } else { VersesTableViewController.Current.Locked = true; var translation = TranslationHelper.GetCurrentTranslationForDownload (); verse.Translation = translation; verse.Content = await BiblesDotOrg.GetVerseTextWithoutHtmlOrDigitsAsync (verseReference.Text, translation); controller.AddVerse (verse); VersesTableViewController.Current.Locked = false; LocalyticsSession.Shared.TagEvent ("Verse Saved"); } } catch (InvalidVerseException) { new UIAlertView ("Invalid Input", "Oops! That verse was not found!", null, "Okay", null).Show (); } finally { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; } } else { new UIAlertView ("Network Failure", "Oops! Please connect to the internet to download verses.", null, "Okay", null).Show (); } } else { new UIAlertView ("Invalid Input", "Oops! Don't forget to add a verse reference!", null, "Okay", null).Show (); } }
public void RemoveVerse(Verse verse) { Verses.Remove (verse); AppDelegate.Current.Database.RemoveVerse (verse); }
public VerseDetailDialog(Verse data) : base(data.Title) { verse = data; }
public Verse GetVerse(Verse v) { return(database.GetItem <Verse> (v, v.Id)); }
public bool VerseExists(Verse v) { return(database.ItemExists <Verse> (v.Id)); }
public void RemoveVerse(Verse v) { database.RemoveItem <Verse> (v); }
public void UpdateVerse(Verse v) { database.UpdateItem <Verse> (v); }
public void AddVerse(Verse v) { database.AddItem <Verse> (v); }
public void UpdateVerse(Verse v) { database.UpdateItem<Verse> (v); }
public VerseEditActionSheetDelegate(UIViewController managingController, Verse verse) { controller = managingController; data = verse; }
public void AddVerse(Verse verse) { Verses.Add (verse); AppDelegate.Current.Database.AddVerse (verse); }
public void PopulateCell(Verse verse) { VerseReference.Text = verse.Title.ToUpper (); VerseContent.Text = verse.Content; }
public void PopulateCell(Verse v) { Verse = v; TextLabel.Text = v.Title; }
public static void ShareVerse(UIViewController presentingViewController, Verse verse) { var text = string.Format ("{0} - {1} via @getversesapp", verse.Content, verse.Title); Share (presentingViewController, text); }