Initial commit: EngineeringSync v1.0.0
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>
This commit is contained in:
47
EngineeringSync.Setup/Views/Pages/OptionCard.xaml.cs
Normal file
47
EngineeringSync.Setup/Views/Pages/OptionCard.xaml.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace EngineeringSync.Setup.Views.Pages;
|
||||
|
||||
public partial class OptionCard : UserControl
|
||||
{
|
||||
public static readonly DependencyProperty IconProperty =
|
||||
DependencyProperty.Register(nameof(Icon), typeof(string), typeof(OptionCard),
|
||||
new PropertyMetadata(string.Empty, (d, e) => ((OptionCard)d).IconText.Text = (string)e.NewValue));
|
||||
|
||||
public static readonly DependencyProperty TitleProperty =
|
||||
DependencyProperty.Register(nameof(Title), typeof(string), typeof(OptionCard),
|
||||
new PropertyMetadata(string.Empty, (d, e) => ((OptionCard)d).TitleText.Text = (string)e.NewValue));
|
||||
|
||||
public static readonly DependencyProperty DescriptionProperty =
|
||||
DependencyProperty.Register(nameof(Description), typeof(string), typeof(OptionCard),
|
||||
new PropertyMetadata(string.Empty, (d, e) => ((OptionCard)d).DescText.Text = (string)e.NewValue));
|
||||
|
||||
public static readonly DependencyProperty IsCheckedProperty =
|
||||
DependencyProperty.Register(nameof(IsChecked), typeof(bool), typeof(OptionCard),
|
||||
new FrameworkPropertyMetadata(true,
|
||||
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
|
||||
(d, e) => ((OptionCard)d).UpdateVisual((bool)e.NewValue)));
|
||||
|
||||
public string Icon { get => (string)GetValue(IconProperty); set => SetValue(IconProperty, value); }
|
||||
public string Title { get => (string)GetValue(TitleProperty); set => SetValue(TitleProperty, value); }
|
||||
public string Description { get => (string)GetValue(DescriptionProperty); set => SetValue(DescriptionProperty, value); }
|
||||
public bool IsChecked { get => (bool)GetValue(IsCheckedProperty); set => SetValue(IsCheckedProperty, value); }
|
||||
|
||||
public OptionCard() => InitializeComponent();
|
||||
|
||||
private void Card_Click(object sender, RoutedEventArgs e) => IsChecked = !IsChecked;
|
||||
|
||||
private void UpdateVisual(bool isChecked)
|
||||
{
|
||||
if (ToggleBox is null) return;
|
||||
ToggleBox.IsChecked = isChecked;
|
||||
CardBorder.BorderBrush = isChecked
|
||||
? new SolidColorBrush(Color.FromRgb(0, 120, 212))
|
||||
: new SolidColorBrush(Color.FromRgb(224, 224, 224));
|
||||
CardBorder.Background = isChecked
|
||||
? new SolidColorBrush(Color.FromArgb(15, 0, 120, 212))
|
||||
: new SolidColorBrush(Colors.White);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user