Vollständige Implementierung des EngineeringSync-Middleware-Tools: - Windows Service (Kestrel :5050) mit FileSystemWatcher + SignalR - WPF Tray-App mit PendingChanges- und Projektverwaltungs-Fenster - Setup-Wizard (8-Schritte-Installer) - SQLite/EF Core Datenschicht (WAL-Modus) - SHA-256-basiertes Debouncing (2s Fenster) - Backup-System mit konfigurierbarer Aufbewahrung Bugfixes & Verbesserungen: - BUG-1: AppDbContext OnConfiguring invertierte Bedingung behoben - BUG-2: Event-Handler-Leak in TrayApp (Fenster-Singleton-Pattern) - BUG-3: ProjectConfigChanged SignalR-Signal in allen CRUD-Endpoints - BUG-5: Rename-Sync löscht alte Datei im Simulations-Ordner - BUG-6: Doppeltes Dispose von SignalR verhindert - BUG-7: Registry-Deinstallation nur EngineeringSync-Eintrag entfernt - S1: Path-Traversal-Schutz via SafeCombine() im SyncManager - E1: FSW Buffer 64KB + automatischer Re-Scan bei Overflow - E2: Retry-Logik (3x) für gesperrte Dateien mit exponentiellem Backoff - E4: Channel.Writer.TryComplete() beim Shutdown - C2: HubMethodNames-Konstanten statt Magic Strings - E3: Pagination in Changes-API (page/pageSize Query-Parameter) - A1: Fire-and-Forget mit try/catch + Logging Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
86 lines
4.7 KiB
XML
86 lines
4.7 KiB
XML
<local:WizardPageBase x:Class="EngineeringSync.Setup.Views.Pages.BackupOptionsPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:EngineeringSync.Setup.Views.Pages"
|
|
Background="White">
|
|
<Grid Margin="40,32,40,24">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Text="Backup-Einstellungen"
|
|
Style="{StaticResource PageTitleStyle}"/>
|
|
<TextBlock Grid.Row="1" Style="{StaticResource PageSubtitleStyle}"
|
|
Text="Legen Sie fest, ob und wie Sicherungskopien vor dem Überschreiben von Simulationsdateien erstellt werden."/>
|
|
|
|
<ScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto">
|
|
<StackPanel>
|
|
|
|
<!-- Master-Toggle -->
|
|
<local:OptionCard Icon="" Title="Backups aktivieren"
|
|
Description="Vor jeder Dateiüberschreibung wird automatisch eine .bak-Sicherungskopie erstellt"
|
|
IsChecked="{Binding BackupEnabled, Mode=TwoWay}"/>
|
|
|
|
<!-- Optionen (nur wenn Backup aktiviert) -->
|
|
<StackPanel Visibility="{Binding BackupEnabled,
|
|
Converter={StaticResource BoolToVisConverter}}">
|
|
|
|
<!-- Speicherort -->
|
|
<TextBlock Text="SPEICHERORT" Style="{StaticResource FieldLabelStyle}"
|
|
Margin="0,16,0,8"/>
|
|
|
|
<!-- Mode=OneWay: gegenseitiger Ausschluss läuft über GroupName + TwoWay am zweiten Radio -->
|
|
<RadioButton GroupName="BackupLocation"
|
|
Content="Gleicher Ordner wie die Simulationsdatei"
|
|
IsChecked="{Binding BackupUseCustomPath,
|
|
Converter={StaticResource BoolToInvVisConverter},
|
|
Mode=OneWay}"
|
|
FontFamily="Segoe UI" FontSize="13" Margin="0,0,0,8"/>
|
|
|
|
<RadioButton GroupName="BackupLocation"
|
|
Content="Eigener Backup-Ordner"
|
|
IsChecked="{Binding BackupUseCustomPath, Mode=TwoWay}"
|
|
FontFamily="Segoe UI" FontSize="13" Margin="0,0,0,8"/>
|
|
|
|
<!-- Pfad-Eingabe (nur bei eigenem Ordner) -->
|
|
<DockPanel Margin="0,0,0,16"
|
|
Visibility="{Binding BackupUseCustomPath,
|
|
Converter={StaticResource BoolToVisConverter}}">
|
|
<Button DockPanel.Dock="Right" Style="{StaticResource IconButtonStyle}"
|
|
Margin="6,0,0,0" Click="BrowseBackupPath_Click"
|
|
ToolTip="Backup-Verzeichnis wählen">
|
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets"
|
|
FontSize="14" Foreground="#0078D4"/>
|
|
</Button>
|
|
<TextBox Style="{StaticResource ModernTextBoxStyle}"
|
|
Text="{Binding BackupCustomPath, UpdateSourceTrigger=PropertyChanged}"
|
|
Height="36"/>
|
|
</DockPanel>
|
|
|
|
<!-- Aufbewahrung -->
|
|
<TextBlock Text="AUFBEWAHRUNG" Style="{StaticResource FieldLabelStyle}"
|
|
Margin="0,0,0,8"/>
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
|
|
<TextBlock Text="Maximal" FontFamily="Segoe UI" FontSize="13"
|
|
VerticalAlignment="Center" Margin="0,0,8,0"/>
|
|
<TextBox x:Name="MaxBackupsBox"
|
|
Width="60" Height="32" Padding="6,0"
|
|
FontFamily="Segoe UI" FontSize="13"
|
|
Text="{Binding MaxBackupsPerFile, UpdateSourceTrigger=PropertyChanged}"
|
|
VerticalContentAlignment="Center"/>
|
|
<TextBlock Text="Backups pro Datei" FontFamily="Segoe UI" FontSize="13"
|
|
VerticalAlignment="Center" Margin="8,0,0,0"/>
|
|
</StackPanel>
|
|
<TextBlock Text="(0 = unbegrenzt, alle Backups behalten)"
|
|
FontFamily="Segoe UI" FontSize="11" Foreground="#5F5F5F"
|
|
Margin="0,2,0,0"/>
|
|
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</local:WizardPageBase> |