Fehlerbehandlung, Logging und feldbezogene Validierung (Kapitel 13.2)
Zentrale Exception-Behandlung (Dispatcher.UIThread.UnhandledException, AppDomain, TaskScheduler) verhindert Abstürze und protokolliert Fehler über AppLogger in eine rotierende Log-Datei im App-Datenverzeichnis. Toast-Benachrichtigungen zeigen Erfolg/Fehler global an. Alle Dialoge mit Formularfeldern zeigen Validierungsmeldungen jetzt direkt am betroffenen Feld statt in einem Sammel-Label. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,14 +15,16 @@
|
||||
<Grid ColumnDefinitions="120,*,90" ColumnSpacing="6">
|
||||
<ComboBox Grid.Column="0" ItemsSource="{x:Static vm:GradeCategoryDisplay.Options}"
|
||||
SelectedItem="{Binding CategoryName}"/>
|
||||
<TextBox Grid.Column="1" Text="{Binding DateText}" PlaceholderText="TT.MM.JJJJ"/>
|
||||
<StackPanel Grid.Column="1" Spacing="2">
|
||||
<TextBox Text="{Binding DateText}" PlaceholderText="TT.MM.JJJJ"/>
|
||||
<TextBlock Text="{Binding DateTextError}" Foreground="Red" FontSize="11"
|
||||
IsVisible="{Binding DateTextError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
</StackPanel>
|
||||
<NumericUpDown Grid.Column="2" Value="{Binding Weight}" Minimum="0" Maximum="10"
|
||||
Increment="0.1" FormatString="0.#" ShowButtonSpinner="False"
|
||||
ToolTip.Tip="Gewichtung"/>
|
||||
</Grid>
|
||||
<TextBox Text="{Binding Note}" PlaceholderText="Notiz (z.B. Hausaufgabenkontrolle)"/>
|
||||
<TextBlock Text="{Binding ValidationMessage}" Foreground="Red" FontSize="12"
|
||||
IsVisible="{Binding ValidationMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
<TextBlock Text="Werte pro Schüler unten eintragen. Leere Felder werden nicht gespeichert."
|
||||
FontSize="11" Opacity="0.5" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
|
||||
Reference in New Issue
Block a user