private void eventMapOverlayView1_OnClick(object o, EventmapOverlayEventArgs e) { GregorianDateTime dt = new GregorianDateTime(SelectedDate); dt.PreviousDay(); dt.PreviousDay(); GCLocation loc = new GCLocation(); TTimeZone tz = new TTimeZone(); loc.Latitude = 0; loc.Longitude = 0; loc.TimeZone = tz; TResultCalendar cal = new TResultCalendar(); cal.EkadasiOnly = true; VAISNAVADAY vd = GetCalcDay(dt, loc, cal, e.Longitude, e.Latitude); string str = string.Format("{0}, sunrise: {1}, longitude: {2}, latitude: {3}" , vd.date.ToString(), vd.astrodata.sunRise.ToLongTimeString() , e.Longitude, e.Latitude); labelStatus.Text = str; }
private void FunctionCalcBoundariesSync(Quadrant map, GregorianDateTime date) { GCLog.Write("Ekadasi Boundaries Calculation START"); RootArray = null; CalculationFinished = false; GregorianDateTime dt = new GregorianDateTime(date); dt.PreviousDay(); dt.PreviousDay(); GCLocation loc = new GCLocation(); TTimeZone tz = new TTimeZone(); loc.Latitude = 0; loc.Longitude = 0; loc.TimeZone = tz; TResultCalendar cal = new TResultCalendar(); cal.EkadasiOnly = true; List <Quadrant> quandrantList = new List <Quadrant>(); quandrantList.Add(map); QuadrantArray qa; map = null; int count = 0, maxCount = 2000; while (quandrantList.Count > 0) { map = quandrantList[0]; quandrantList.RemoveAt(0); if (stopRequested) { break; } map.Details = CalculateQuadrantArray(map, dt, loc, cal, quandrantList); if (RootArray == null) { RootArray = map.Details; } // for testing count++; if (count >= maxCount) { break; } } CalculationFinished = true; GCLog.Write("Ekadasi Boundaries Calculation END"); StopMethodDelegate stopMethod = new StopMethodDelegate(PerformeStop); this.Invoke(stopMethod); }