Пример #1
0
        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);
        }
Пример #2
0
 public void Add(FileDetails fileDetails)
 {
     _filenames.AddRange(fileDetails._filenames);
     if (PrayerPageModel.DisplayFilenames)
     {
         _prayerText += fileDetails.Filenames();
     }
     _prayerText += fileDetails.PrayerText;
 }
Пример #3
0
        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);
        }