public string[] getPrayerTimes(double ln, double lt) { int tz = 0; if (App.timeZone == 99) tz = TimeZoneInfo.Utc.GetUtcOffset(new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Month)).Hours; else tz = App.timeZone; var calculator = new Calculator(App.cm, App.aj, App.hlm); calculator.setOffSets(App.fajrAdjustment, App.dhuhrAdjustment, App.asrAdjustment, App.maghribAdjustment, App.ishaAdjustment); var times = calculator.GetPrayerTimes(DateTime.Today, lt, ln, 0, tz, App.isDST, App.displayTimeFormat); String[] s = new String[9]; s[0] = times.Imsak; s[1] = times.Fajr; s[2] = times.Sunrise; s[3] = times.Dhuhur; s[4] = times.Asr; s[5] = times.Sunset; s[6] = times.Magrib; s[7] = times.Isha; s[8] = times.Midnight; return s ; }
public string[] getPrayerTimes(double ln, double lt, DateTime workableDate, int overRideMethod) { int tz = 0; if(App.timeZone==99) tz = TimeZoneInfo.Utc.GetUtcOffset(new DateTime(workableDate.Year, workableDate.Month, workableDate.Month)).Hours; else tz = App.timeZone; var calculator = new Calculator(App.cm, App.aj, App.hlm); calculator.setOffSets(App.fajrAdjustment, App.dhuhrAdjustment, App.asrAdjustment, App.maghribAdjustment, App.ishaAdjustment); PrayerTimeDto times; if (overRideMethod == 1) // time for tiles { if (App.displayTimeFormat == 0) { times = calculator.GetPrayerTimes(workableDate, lt, ln, 0, tz, App.isDST, App.displayTimeFormat); } else { times = calculator.GetPrayerTimes(workableDate, lt, ln, 0, tz, App.isDST, TimeFormats.Hour24); } } else times = calculator.GetPrayerTimes(workableDate, lt, ln, 0, tz, App.isDST, App.displayTimeFormat); String[] s = new String[9]; s[0] = times.Imsak; s[1] = times.Fajr; s[2] = times.Sunrise; s[3] = times.Dhuhur; s[4] = times.Asr; s[5] = times.Sunset; s[6] = times.Magrib; s[7] = times.Isha; s[8] = times.Midnight; return s; }