public static string NextStartupTip() { bool startupTips = GPUserDefaults.BoolForKey("app.startup.tips", true); if (startupTips) { //GPStrings gstr = GPStrings.getSharedStrings(); int startupTipsCounter = GPUserDefaults.IntForKey("app.startup.tips.counter", 0); int count; for (count = 1200; count <= 1228; count++) { if (GPStrings.getString(count).Length == 0) { break; } } count -= 1200; if (count > 0) { startupTipsCounter = startupTipsCounter % count; string ret = GPStrings.getString(1200 + startupTipsCounter); startupTipsCounter = (startupTipsCounter + 1) % count; GPUserDefaults.SetIntForKey("app.startup.tips.counter", startupTipsCounter); return(ret); } } return(null); }
public static int FormatCalendarDayRtf(GPCalendarDay pvd, StringBuilder dayText, GPCalendarDay prevd, GPCalendarDay nextd) { string str; dayText.Remove(0, dayText.Length); str = GetTextRtf(pvd); if (pvd.astrodata.sun.eclipticalLongitude < 0.0) { dayText.Append("\\par\\tab "); dayText.Append(GPStrings.getString(974)); return(1); } dayText.Append(str); foreach (GPCalendarDay.Festival fest in pvd.CompleteFestivalList(prevd, nextd)) { if (GPUserDefaults.BoolForKey(fest.ShowSettingItem, true)) { if (fest.ShowSettingItem == GPDisplays.Keys.CalendarSankranti) { dayText.Append("\\par "); dayText.Append(fest.Text.PadLeft((80 + str.Length) / 2, '-').PadRight(80, '-')); } else { AddListRtf(dayText, fest.Text); } } } return(0); }
public static int AvcGetOldCalendarDayText(GPCalendarDay pvd, StringBuilder dayText, GPCalendarDay prevd, GPCalendarDay nextd) { String str = string.Empty, str2, str3; dayText.Remove(0, dayText.Length); str = GetTextA(pvd); str2 = str.Substring(16); str3 = str.Substring(0, 16); str = str3; if (pvd.astrodata.sun.eclipticalLongitude < 0.0) { AddListText(dayText, str, getSharedStringPlain(974)); return(1); } AddListText(dayText, str, str2); foreach (GPCalendarDay.Festival fest in pvd.CompleteFestivalList(prevd, nextd)) { if (GPUserDefaults.BoolForKey(fest.ShowSettingItem, true)) { if (fest.ShowSettingItem == GPDisplays.Keys.CalendarSankranti) { dayText.AppendLine(GPAppHelper.CenterString(fest.Text, 80, '-')); } else { AddListText(dayText, fest.Text); } } } return(0); }
public int getFastType() { if (nFastType == 0) { return(nFastType); } if (GPUserDefaults.BoolForKey("gen.oldstyle.fasting", false)) { return(nFastType); } if (nClass > 0) { return(GPConstants.FAST_NULL); } if (nSpec == GPConstants.SPEC_RADHASTAMI) { return(GPConstants.FAST_NULL); } return(GPConstants.FAST_DAY); }
// 30 public static bool NoonVisible() { return(GPUserDefaults.BoolForKey("today.noon", true)); }
public static bool DefaultEventsEditable() { return(GPUserDefaults.BoolForKey("gen.defevents.editable", false)); }
public static bool EkadasiParanaDetails() { return(GPUserDefaults.BoolForKey("cal.ekadasi.parana.details", true)); }
public static bool PaksaInfoVisible() { return(GPUserDefaults.BoolForKey("cal.sunrise.paksa", true)); }
public static bool YogaVisible() { return(GPUserDefaults.BoolForKey("cal.sunrise.yoga", true)); }
public static bool AyanamsaValueVisible() { return(GPUserDefaults.BoolForKey("cal.sunrise.ayanamsa", false)); }
public static bool MoonLongitudeVisible() { return(GPUserDefaults.BoolForKey("cal.sunrise.moon.longitude", false)); }
public static bool VriddhiTithiInfoVisible() { return(GPUserDefaults.BoolForKey(Keys.CalendarVriddhi, false)); }
//48 public static bool childNameSuggestions() { return(GPUserDefaults.BoolForKey("appday.childn", true)); }
public static bool KsayaTithiInfoVisible() { return(GPUserDefaults.BoolForKey(Keys.CalendarKsaya, false)); }
public static bool FestivalsVisible() { return(GPUserDefaults.BoolForKey("cal.festivals", true)); }
public static bool DSTNotice() { return(GPUserDefaults.BoolForKey("cal.dst.info", true)); }
public static bool NaksatraVisible() { return(GPUserDefaults.BoolForKey("cal.sunrise.naksatra", true)); }
public static bool JulianDayVisible() { return(GPUserDefaults.BoolForKey("cal.sunrise.julianday", false)); }
public static bool FastingFlagVisible() { return(GPUserDefaults.BoolForKey("cal.sunrise.fastingflag", true)); }
public static bool SankrantiInfoVisible() { return(GPUserDefaults.BoolForKey(Keys.CalendarSankranti, true)); }
public static bool RasiVisible() { return(GPUserDefaults.BoolForKey("cal.sunrise.moon.rasi", true)); }
public static bool EkadasiInfoVisible() { return(GPUserDefaults.BoolForKey("cal.fastingekadasi.info", true)); }
public static bool MasaVisible(int masa) { return(GPUserDefaults.BoolForKey("masa.visible." + masa.ToString(), true)); }
public static bool HideEmptyDays() { return(GPUserDefaults.BoolForKey("cal.hide.empty", true)); }
public static bool HighlightEvenLines() { return(GPUserDefaults.BoolForKey("gen.highlight.oddlines", true)); }
public static bool StartMasaVisible() { return(GPUserDefaults.BoolForKey("cal.masastart.info", true)); }
// 31 public static bool SunsetVisible() { return(GPUserDefaults.BoolForKey("today.sunset", true)); }
public static bool FestivalClass6() { return(GPUserDefaults.BoolForKey("cal.festivals.6", true)); }
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); }
public static bool NoonTime() { return(GPUserDefaults.BoolForKey("cal.noon.time", false)); }