public static void FormatTodayInfoRtf(GPGregorianTime vc, GPLocationProvider loc, StringBuilder str) { string str2, str3 = string.Empty; GPCalendarResults db = new GPCalendarResults(); GPGregorianTime vc2 = new GPGregorianTime(vc); vc2.PreviousDay(); vc2.PreviousDay(); vc2.PreviousDay(); vc2.PreviousDay(); db.CalculateCalendar(vc2, 9); int i = db.FindDate(vc); GPCalendarDay p = db.get(i); if (p == null) { return; } str.Remove(0, str.Length); AppendRtfHeader(str); str2 = string.Format("\\f2\\fs{0} {1} ", g_HeaderSize, GPAppHelper.getDateText(vc)); str.Append(str2); str.AppendFormat("\\par\\f2\\fs{0} {{\\fs{1} {2}}\\line {3} ({4}, {5}, {6}: {7})", g_TextSize, g_TextSize + 4, getSharedStringRtf(p.date.getDayOfWeek()), loc.getFullName(), loc.getLocation(0).getLatitudeString(), loc.getLocation(0).getLongitudeString(), getSharedStringRtf(12), loc.getLocation(0).getTimeZoneName()); str.AppendLine("\\par"); str.AppendLine("\\par"); str.AppendFormat(" {0}, {1}", p.getTithiName(), p.getPaksaName()); str.AppendLine("\\par"); str.AppendFormat(" {0}, {1}", p.getMasaLongName(), p.getGaurabdaYearLongString()); str.AppendLine("\\par"); str.AppendLine("\\par"); // adding mahadvadasi // adding spec festivals foreach (GPCalendarDay.Festival fest in p.CompleteFestivalList(db.get(i - 1), db.get(i + 1))) { if (GPUserDefaults.BoolForKey(fest.ShowSettingItem, true)) { if (fest.ShowSettingItem == GPDisplays.Keys.CalendarSankranti) { str.AppendLine(fest.Text.PadLeft((80 + str2.Length) / 2, '-').PadRight(80, '-')); str.AppendLine("\\par"); } else { str.Append("\\tab"); str.Append(fest.Text); str.AppendLine("\\par"); } } } str.AppendLine("\\par"); if (GPDisplays.Today.BrahmaMuhurtaVisible()) { str.AppendLine("\\par"); str.AppendFormat("{0} {1}", getSharedStringRtf(988), p.astrodata.sun.arunodaya.getShortMuhurtaRange(0)); } if (GPDisplays.Today.SunriseVisible()) { str.AppendLine("\\par"); str.AppendFormat("{0} {1} ", getSharedStringRtf(51), p.astrodata.sun.rise.getShortTimeString()); if (GPDisplays.Today.SandhyaTimesVisible()) { str.AppendFormat(" {0} {1} ", getSharedStringRtf(989), p.astrodata.sun.rise.getShortSandhyaRange()); } str.AppendFormat(" ({0})", GPAppHelper.GetDSTSignature(p.isDaylightInEffect())); str.AppendLine("\\par"); } if (GPDisplays.Today.NoonVisible()) { str2 = string.Format("{0} {1} ", getSharedStringRtf(857), p.astrodata.sun.noon.getShortTimeString()); str.Append(str2); if (GPDisplays.Today.SandhyaTimesVisible()) { str.AppendFormat(" {0} {1} ", getSharedStringRtf(989), p.astrodata.sun.noon.getShortSandhyaRange()); } str.AppendFormat(" ({0})", GPAppHelper.GetDSTSignature(p.isDaylightInEffect())); str.AppendLine("\\par"); } if (GPDisplays.Today.SunsetVisible()) { str.AppendFormat("{0} {1} ", getSharedStringRtf(52), p.astrodata.sun.set.getShortTimeString()); if (GPDisplays.Today.SandhyaTimesVisible()) { str.AppendFormat(" {0} {1} ", getSharedStringRtf(989), p.astrodata.sun.set.getShortSandhyaRange()); } str.AppendFormat(" ({0})", GPAppHelper.GetDSTSignature(p.isDaylightInEffect())); str.AppendLine("\\par"); } if (GPDisplays.Today.SunriseInfo()) { str.AppendLine("\\par"); str.Append(getSharedStringRtf(990)); str.AppendLine("\\par"); str.AppendFormat(" {1} {2}", GPNaksatra.getName(p.astrodata.nNaksatra), getSharedStringRtf(15)); if (GPDisplays.Today.NaksatraPadaVisible()) { str.AppendFormat(", {0} {1} ({2})", p.astrodata.nNaksatraElapse, getSharedStringRtf(993), getSharedStringRtf(811 + p.getNaksatraPada())); } if (GPDisplays.Today.RasiOfMoonVisible()) { str.AppendFormat(", {0}: {1}", getSharedStringRtf(991), GPSankranti.getName(p.astrodata.nMoonRasi)); } str.AppendFormat(", {0} {1}", GPYoga.getName(p.astrodata.nYoga), getSharedStringRtf(104)); str.AppendLine("\\par"); str.AppendFormat(" {0} {1}", getSharedStringRtf(992), GPSankranti.getName(p.astrodata.nSunRasi)); str.AppendLine("\\par"); } /* END GCAL 1.4.3 */ AddNoteRtf(str); }