private string MakePrayer(DateTime date, PrayerSeason.PrayerSeason prayerSeason, bool testMode) { string htmlText = ""; try { FileDetails fileDetails = new FileDetails(); fileDetails.Add(prayerSeason.LoadText(PrayerSeason.PrayerSeason.PrayerSect.AllSections)); if (testMode) { htmlText += fileDetails.Filenames() + "<p>"; } htmlText += fileDetails.PrayerText; htmlText = htmlText.Replace("<p/> <br/>", "<p/>"); htmlText = htmlText.Replace("<p/><br/>", "<p/>"); htmlText = htmlText.Replace("<p/><br>", "<p/>"); } catch (Exception ex) { Debug.WriteLine($"{_Tag}.MakePrayer: error - {ex.ToString()}"); } return(htmlText); }
public void Add(FileDetails fileDetails) { _filenames.AddRange(fileDetails._filenames); if (PrayerPageModel.DisplayFilenames) { _prayerText += fileDetails.Filenames(); } _prayerText += fileDetails.PrayerText; }
public string MakePrayerSection(DateTime date, PrayerSeason.PrayerSeason.PrayerSect prayerSect) { //Debug.WriteLine($"{_Tag}.MakeTestPrayer( date.ToString(_dateFormat) )"); Place place = _dominicanCalender.FindPlace(date); PrayerSeason.PrayerSeason prayerSeason = PrayerSeasonFactory.CreatePrayerSeason(place, true); string prayerDate = MakeHeading(place, date, prayerSeason); string dateString = date.ToString("u").Replace(":00Z", ""); string htmlText = $"<b>Date: {dateString} </b><br/>"; htmlText += prayerSeason.ToString() + "<br/>"; htmlText += prayerDate + "<p/>"; FileDetails fileDetails = new FileDetails(); fileDetails.Add(prayerSeason.LoadText(prayerSect)); htmlText += fileDetails.PrayerText; return(htmlText); }