add:备份功能

This commit is contained in:
2025-07-16 15:28:36 +08:00
parent 1e96477127
commit 285f211f50
5 changed files with 158 additions and 0 deletions
+23
View File
@@ -1877,6 +1877,29 @@
</ui:SimpleStackPanel>
<TextBlock TextWrapping="Wrap" Foreground="#a1a1aa"
Text="# 当检测到系统分辨率变化时,会尝试检测FloatingBar是否在屏幕内显示,如果不在屏幕内显示将会尝试移动到屏幕内可见区域(分辨率调小可能会触发,如果在屏幕内不会自动调整位置,请手动挡)。" />
<!-- 添加备份相关按钮 -->
<Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0" Stroke="#3f3f46"
StrokeThickness="1" Margin="0,4,0,4" />
<TextBlock Text="设置备份与还原" FontWeight="Bold" Foreground="#fafafa"
FontSize="16" Margin="0,5,0,5" />
<TextBlock TextWrapping="Wrap" Foreground="#a1a1aa"
Text="# 可手动备份当前设置或还原之前的备份,自动更新前也会自动备份" />
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="自动更新前备份" VerticalAlignment="Center"
FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent="" Name="ToggleSwitchIsAutoBackupBeforeUpdate"
IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchIsAutoBackupBeforeUpdate_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,5,0,0">
<Button x:Name="BtnManualBackup" Content="手动备份" Click="BtnManualBackup_Click"
Background="#2563eb" Foreground="White" Padding="12,6" Margin="0,0,12,0" />
<Button x:Name="BtnRestoreBackup" Content="还原备份" Click="BtnRestoreBackup_Click"
Background="#2563eb" Foreground="White" Padding="12,6" />
</ui:SimpleStackPanel>
</ui:SimpleStackPanel>
</GroupBox>
<GroupBox>