private async void LoadSunInfo_Click(object sender, RoutedEventArgs e) { var sunInfo = await SunProcessor.LoadSunInfo(); sunriseText.Text = $"Sunrise is at { sunInfo.Sunrise.ToLocalTime().ToShortTimeString() }"; sunsetText.Text = $"Sunset is at { sunInfo.Sunset.ToLocalTime().ToShortTimeString() }"; }
private async void loadSunInfo_Click(object sender, RoutedEventArgs e) { var sunInformation = await SunProcessor.LoadSunInfo(36, -4); sunRiseText.Text = $"Le levé du soleil sera à {sunInformation.SunRise.ToLocalTime().ToShortTimeString()}"; sunSetText.Text = $"Le couché du soleil sera à {sunInformation.SunSet.ToLocalTime().ToShortTimeString()}"; }
private async void Window_Loaded(object sender, RoutedEventArgs e) { var sunInfo = await SunProcessor.LoadSunInfo(40.7128, -74.0060); // new york SunRiseTextBlock.Text = $"Sunrise is at {sunInfo.SunRise.ToLocalTime().ToShortTimeString()}"; SunSetTextBlock.Text = $"Sunset is as {sunInfo.SunSet.ToLocalTime().ToShortTimeString()}"; }