LD-Uninstaller/src-csharp/LDUninstaller.UI/Dialogs/BackupRestoreWindow.xaml

149 lines
9.8 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<Window x:Class="LDUninstaller.UI.Dialogs.BackupRestoreWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Yedekleme ve Koruma Merkezi - LD Uninstaller"
Height="560" Width="850"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="False"
Background="{StaticResource BrushBgDark}"
Foreground="{StaticResource BrushTextPrimary}"
FontFamily="Segoe UI"
Icon="pack://application:,,,/LDUninstaller.UI;component/Resources/app.ico"
BorderBrush="{StaticResource BrushBorder}"
BorderThickness="1">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="50" ResizeBorderThickness="6" CornerRadius="8" GlassFrameThickness="0" UseAeroCaptionButtons="False" />
</WindowChrome.WindowChrome>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
<RowDefinition Height="60" />
</Grid.RowDefinitions>
<!-- Custom Title Bar -->
<Border Grid.Row="0" Background="{StaticResource BrushBgSidebar}" MouseDown="TitleBar_MouseDown" Padding="20,0">
<Grid>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Border Background="{StaticResource BrushGlassSapphire}" CornerRadius="6" Width="28" Height="28" Margin="0,0,12,0">
<TextBlock Text="🛡️" FontSize="14" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<TextBlock Text="Yedekleme, Geri Yükleme ve Koruma Merkezi" FontSize="14.5" FontWeight="SemiBold" Foreground="{StaticResource BrushTextPrimary}" VerticalAlignment="Center" />
</StackPanel>
<Button Content="✕" Width="30" Height="30" HorizontalAlignment="Right" Background="Transparent" Foreground="{StaticResource BrushTextMuted}" BorderThickness="0" FontSize="14" Cursor="Hand" Click="BtnClose_Click" WindowChrome.IsHitTestVisibleInChrome="True" />
</Grid>
</Border>
<!-- Tab Control -->
<TabControl Grid.Row="1" Background="Transparent" BorderThickness="0" Margin="20,10,20,10">
<TabControl.Resources>
<Style TargetType="TabItem">
<Setter Property="Background" Value="#171A22" />
<Setter Property="Foreground" Value="{StaticResource BrushTextSecondary}" />
<Setter Property="FontSize" Value="13" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="Padding" Value="16,8" />
<Setter Property="Margin" Value="0,0,4,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border x:Name="bd" Background="{TemplateBinding Background}" CornerRadius="6,6,0,0" Padding="{TemplateBinding Padding}" Margin="{TemplateBinding Margin}">
<ContentPresenter ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="bd" Property="Background" Value="#1E293B" />
<Setter Property="Foreground" Value="{StaticResource BrushTextPrimary}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</TabControl.Resources>
<!-- TAB 1: BACKUPS -->
<TabItem Header="💾 Kayıt Defteri Yedekleri (.reg)">
<Grid Margin="0,15,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<DataGrid x:Name="dgBackups" Grid.Row="0" Background="Transparent" RowBackground="#13161D" AlternatingRowBackground="#171A22"
BorderThickness="1" BorderBrush="{StaticResource BrushBorder}" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True"
HeadersVisibility="Column" GridLinesVisibility="None" Foreground="{StaticResource BrushTextPrimary}" FontSize="12.5"
SelectionMode="Single">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#1B1F28" />
<Setter Property="Foreground" Value="{StaticResource BrushTextSecondary}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Padding" Value="10,8" />
<Setter Property="BorderThickness" Value="0,0,0,1" />
<Setter Property="BorderBrush" Value="{StaticResource BrushBorder}" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.Columns>
<DataGridTextColumn Header="Yedek Dosyası" Binding="{Binding Name}" Width="320" />
<DataGridTextColumn Header="Oluşturulma Tarihi" Binding="{Binding LastWriteTime, StringFormat='yyyy-MM-dd HH:mm:ss'}" Width="160" />
<DataGridTextColumn Header="Boyut" Binding="{Binding SizeDisplay}" Width="110" />
<DataGridTextColumn Header="Tam Yol" Binding="{Binding FullPath}" Width="*" />
</DataGrid.Columns>
</DataGrid>
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,12,0,0">
<Button x:Name="btnRestore" Content="🔄 Seçili Yedeği Geri Yükle" Style="{StaticResource ModernBtnPrimary}" Margin="0,0,10,0" Click="BtnRestore_Click" />
<Button x:Name="btnOpenFolder" Content="📂 Yedek Klasörünü Aç" Style="{StaticResource ModernBtnSecondary}" Margin="0,0,10,0" Click="BtnOpenFolder_Click" />
<Button x:Name="btnDeleteBackup" Content="🗑️ Yedeği Sil" Style="{StaticResource ModernBtnSecondary}" Click="BtnDeleteBackup_Click" />
</StackPanel>
</Grid>
</TabItem>
<!-- TAB 2: EXCLUSION LIST -->
<TabItem Header="⛔ Koruma Listesi (Exclusions)">
<Grid Margin="0,15,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<DataGrid x:Name="dgExclusions" Grid.Row="0" Background="Transparent" RowBackground="#13161D" AlternatingRowBackground="#171A22"
BorderThickness="1" BorderBrush="{StaticResource BrushBorder}" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True"
HeadersVisibility="Column" GridLinesVisibility="None" Foreground="{StaticResource BrushTextPrimary}" FontSize="12.5"
SelectionMode="Single">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#1B1F28" />
<Setter Property="Foreground" Value="{StaticResource BrushTextSecondary}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Padding" Value="10,8" />
<Setter Property="BorderThickness" Value="0,0,0,1" />
<Setter Property="BorderBrush" Value="{StaticResource BrushBorder}" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.Columns>
<DataGridTextColumn Header="Korunan Yol veya Desen" Binding="{Binding Path}" Width="350" />
<DataGridTextColumn Header="Açıklama" Binding="{Binding Reason}" Width="250" />
<DataGridTextColumn Header="Eklenme Tarihi" Binding="{Binding AddedAt, StringFormat='yyyy-MM-dd HH:mm'}" Width="*" />
</DataGrid.Columns>
</DataGrid>
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,12,0,0">
<Button x:Name="btnRemoveExclusion" Content="❌ Korumayı Kaldır" Style="{StaticResource ModernBtnSecondary}" Margin="0,0,10,0" Click="BtnRemoveExclusion_Click" />
<Button x:Name="btnAddExclusion" Content="➕ Manuel Koruma Kuralı Ekle" Style="{StaticResource ModernBtnPrimary}" Click="BtnAddExclusion_Click" />
</StackPanel>
</Grid>
</TabItem>
</TabControl>
<!-- Footer -->
<Border Grid.Row="2" Background="{StaticResource BrushBgSidebar}" Padding="20,12" BorderThickness="0,1,0,0" BorderBrush="{StaticResource BrushBorder}">
<Button Content="Kapat" Style="{StaticResource ModernBtnSecondary}" HorizontalAlignment="Right" Click="BtnClose_Click" />
</Border>
</Grid>
</Window>