/// <summary> /// Triggers Events for Sunrise and Sunset /// </summary> private void InvokeDayTimeEvent() { if (_isNight && timeOfDay >= 0.25 && timeOfDay < 0.70) { _isNight = !_isNight; SunRise?.Invoke(); } if (!_isNight && timeOfDay >= 0.70) { _isNight = !_isNight; SunSet?.Invoke(); } if (!_moonShines && timeOfDay >= 0.85) { _moonShines = !_moonShines; MoonRise?.Invoke(); } if (_moonShines && TimeOfDay > 0.15 && timeOfDay < 0.85) { _moonShines = !_moonShines; MoonSet?.Invoke(); } }
protected void Page_Load(object sender, EventArgs e) { SunSetRiseService ssrs = new SunSetRiseService(); SunSet s = new SunSet(); LatLonDate ll=null; ll.Latitude = 0; ll.Longitude = 0; ll.Month = 12; ll.Year = 2013; ll.Day = 17; ll.TimeZone = 0; Label1.Text=( ssrs.GetSunSetRiseTime(ll)).ToString(); }
public override string ToString() { return(string.Format("{0}\t{1,3:N0}\t{2,3:N0}\t{3,3:N0}\t{4,3:N0}\t{5,3:N0}\t{6,6:N1}\t{7,3:N0}\t{8,3:N0}\t{9,3:N0}\t{10,3:N0}\t{11,3:N0}\t{12,3:N0} \t{13} \t{14} \t{15} \t{16}", TakenAt.ToString("ddMMMyy HH:mm"), // 0 TempAir, // 1 Humidity, // 2 DewPoint, // 3 WindKmH, // 4 WindGust, // 5 Pressure, // 6 Visibility, // 7 Humidex, // 8 TempYesterdayMin, // 9 TempYesterdayMax, // 10 TempNormMin, // 11 TempNormMax, // 12 SunRise.ToString("ddMMMyy HH:mm"), // 13 SunSet.ToString("ddMMMyy HH:mm"), // 14 Conditions, // 15 WindDir)); // 16 }