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:
@@ -28,15 +28,20 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<TextBlock Text="{Binding Validation}" Foreground="Red" FontSize="11"
|
||||
IsVisible="{Binding Validation, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
|
||||
<Grid ColumnDefinitions="*,8,90,8,Auto">
|
||||
<TextBox Grid.Column="0" Text="{Binding NewGrade}"
|
||||
PlaceholderText="Note (z.B. 2 oder 11)" FontSize="12"/>
|
||||
<NumericUpDown Grid.Column="2" Value="{Binding NewMinPercent}" Minimum="0" Maximum="100"
|
||||
FormatString="0.##" ShowButtonSpinner="False" FontSize="12"
|
||||
ToolTip.Tip="Mindest-Prozentgrenze"/>
|
||||
<StackPanel Grid.Column="0" Spacing="2">
|
||||
<TextBox Text="{Binding NewGrade}"
|
||||
PlaceholderText="Note (z.B. 2 oder 11)" FontSize="12"/>
|
||||
<TextBlock Text="{Binding NewGradeError}" Foreground="Red" FontSize="11"
|
||||
IsVisible="{Binding NewGradeError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Spacing="2">
|
||||
<NumericUpDown Value="{Binding NewMinPercent}" Minimum="0" Maximum="100"
|
||||
FormatString="0.##" ShowButtonSpinner="False" FontSize="12"
|
||||
ToolTip.Tip="Mindest-Prozentgrenze"/>
|
||||
<TextBlock Text="{Binding NewMinPercentError}" Foreground="Red" FontSize="11"
|
||||
IsVisible="{Binding NewMinPercentError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
</StackPanel>
|
||||
<Button Grid.Column="4" Content="+" Command="{Binding AddEntryCommand}"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
Reference in New Issue
Block a user