Wetterdienst

This commit is contained in:
2026-08-23 20:51:19 +02:00
parent cc973418f3
commit 1b32166ce0
21 changed files with 1186 additions and 3 deletions
@@ -415,6 +415,45 @@
<ScrollViewer>
<StackPanel Margin="32,20,32,28" Spacing="14" MaxWidth="480">
<TextBlock Text="Schulstandort &amp; Wetter" FontSize="16" FontWeight="SemiBold"/>
<TextBlock Text="Die Adresse wird beim Speichern einmalig auf dem LehrerApp-Server geocodiert. Der Server ruft damit Wettervorhersagen und amtliche Warnungen des DWD ab."
FontSize="12" Opacity="0.6" TextWrapping="Wrap"/>
<StackPanel Spacing="4">
<TextBox Text="{Binding SchoolName}" PlaceholderText="Name der Schule"/>
<TextBlock Text="{Binding SchoolNameError}" Foreground="Red" FontSize="11"
IsVisible="{Binding SchoolNameError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<TextBox Text="{Binding SchoolStreet}" PlaceholderText="Straße und Hausnummer"/>
<TextBlock Text="{Binding SchoolStreetError}" Foreground="Red" FontSize="11"
IsVisible="{Binding SchoolStreetError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<Grid ColumnDefinitions="120,8,*">
<TextBox Grid.Column="0" Text="{Binding SchoolPostalCode}" PlaceholderText="PLZ" MaxLength="5"/>
<TextBox Grid.Column="2" Text="{Binding SchoolCity}" PlaceholderText="Ort"/>
</Grid>
<Grid ColumnDefinitions="120,8,*">
<TextBlock Grid.Column="0" Text="{Binding SchoolPostalCodeError}" Foreground="Red" FontSize="11"
TextWrapping="Wrap"
IsVisible="{Binding SchoolPostalCodeError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<TextBlock Grid.Column="2" Text="{Binding SchoolCityError}" Foreground="Red" FontSize="11"
IsVisible="{Binding SchoolCityError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
</Grid>
<Button Content="Adresse prüfen und speichern" Command="{Binding SaveSchoolLocationCommand}"
HorizontalAlignment="Left" Margin="0,4,0,0"/>
<TextBlock Text="{Binding SchoolLocationStatus}" FontSize="12" TextWrapping="Wrap"
IsVisible="{Binding SchoolLocationStatus, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<Border Background="{DynamicResource SystemControlBackgroundAltHighBrush}" CornerRadius="5" Padding="10"
IsVisible="{Binding ResolvedSchoolAddress, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
<StackPanel Spacing="3">
<TextBlock Text="Gefundener Standort" FontSize="11" FontWeight="SemiBold" Opacity="0.7"/>
<TextBlock Text="{Binding ResolvedSchoolAddress}" FontSize="12" TextWrapping="Wrap"/>
</StackPanel>
</Border>
<TextBlock Text="Geocodierung © OpenStreetMap-Mitwirkende · Wetterdaten © Deutscher Wetterdienst"
FontSize="10" Opacity="0.55" TextWrapping="Wrap"/>
</StackPanel>
<Separator Margin="0,4"/>
<StackPanel Spacing="4">
<TextBlock Text="Bundesland (für Feiertage)" FontSize="13" FontWeight="SemiBold"/>
<ComboBox ItemsSource="{Binding StateOptions}" SelectedItem="{Binding SelectedStateName}"