2026-04-19 14:42:11 +08:00
|
|
|
<ui:Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.UpdatePage"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
|
|
|
|
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
|
|
|
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
|
|
|
|
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
|
|
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
|
|
|
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
|
|
|
|
|
xmlns:c="clr-namespace:Ink_Canvas.Converter"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
|
|
|
|
|
Title="更新">
|
|
|
|
|
|
|
|
|
|
<ScrollViewer PanningMode="VerticalFirst">
|
|
|
|
|
<Grid Margin="59,0,59,0">
|
|
|
|
|
<FrameworkElement.Resources>
|
|
|
|
|
<sys:Double x:Key="SettingsCardSpacing">4</sys:Double>
|
|
|
|
|
<c:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
|
|
|
|
<Style x:Key="SettingsSectionHeaderTextBlockStyle"
|
|
|
|
|
BasedOn="{StaticResource BodyStrongTextBlockStyle}"
|
|
|
|
|
TargetType="TextBlock">
|
|
|
|
|
<Style.Setters>
|
|
|
|
|
<Setter Property="Margin" Value="1,30,0,6" />
|
|
|
|
|
</Style.Setters>
|
|
|
|
|
</Style>
|
|
|
|
|
</FrameworkElement.Resources>
|
|
|
|
|
<Grid>
|
|
|
|
|
<ikw:SimpleStackPanel MaxWidth="1000"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
Spacing="{StaticResource SettingsCardSpacing}">
|
|
|
|
|
|
|
|
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
|
|
|
Text="自动更新" />
|
|
|
|
|
|
|
|
|
|
<controls:LabeledSettingsCard x:Name="CardAutoUpdate"
|
|
|
|
|
Header="{i18n:I18n Key=Header_AutoUpdate}"
|
|
|
|
|
Description="{i18n:I18n Key=Startup_AutoUpdateHint}"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.Sync}"
|
|
|
|
|
SwitchName="ToggleSwitchIsAutoUpdate"
|
|
|
|
|
Toggled="ToggleSwitchIsAutoUpdate_Toggled" />
|
|
|
|
|
|
|
|
|
|
<controls:LabeledSettingsCard x:Name="CardSilentUpdate"
|
|
|
|
|
Header="{i18n:I18n Key=Header_SilentUpdate}"
|
|
|
|
|
Description="{i18n:I18n Key=Startup_SilentUpdateHint}"
|
|
|
|
|
Icon="{x:Static ui:SegoeFluentIcons.QuietHours}"
|
|
|
|
|
SwitchName="ToggleSwitchIsAutoUpdateWithSilence"
|
|
|
|
|
ShowWhen="{Binding IsOn, ElementName=CardAutoUpdate}"
|
2026-04-24 07:39:31 +08:00
|
|
|
d:Visibility="Visible"
|
2026-04-19 14:42:11 +08:00
|
|
|
Toggled="ToggleSwitchIsAutoUpdateWithSilence_Toggled" />
|
|
|
|
|
|
|
|
|
|
<ui:SettingsExpander x:Name="ExpanderSilentUpdateTime"
|
|
|
|
|
Header="{i18n:I18n Key=Startup_SilentUpdateTimePeriod}"
|
2026-04-24 07:39:31 +08:00
|
|
|
Visibility="{Binding IsOn, ElementName=CardSilentUpdate, Converter={StaticResource BooleanToVisibilityConverter}}"
|
|
|
|
|
d:Visibility="Visible"
|
|
|
|
|
d:IsExpanded="True">
|
2026-04-19 14:42:11 +08:00
|
|
|
<ui:SettingsExpander.HeaderIcon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Settings}" />
|
|
|
|
|
</ui:SettingsExpander.HeaderIcon>
|
|
|
|
|
<ui:SettingsExpander.Items>
|
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Startup_SilentUpdateFullHint}">
|
|
|
|
|
<ui:SettingsCard.Content>
|
|
|
|
|
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="12">
|
|
|
|
|
<ikw:SimpleStackPanel Orientation="Horizontal">
|
|
|
|
|
<TextBlock Margin="0,0,10,0" VerticalAlignment="Center"
|
|
|
|
|
Text="{i18n:I18n Key=Startup_StartTime}" FontSize="14" />
|
2026-04-24 07:13:27 +08:00
|
|
|
<ComboBox x:Name="AutoUpdateWithSilenceStartTimeComboBox"
|
2026-04-19 14:42:11 +08:00
|
|
|
SelectionChanged="AutoUpdateWithSilenceStartTimeComboBox_SelectionChanged" />
|
|
|
|
|
</ikw:SimpleStackPanel>
|
|
|
|
|
<ikw:SimpleStackPanel Orientation="Horizontal">
|
|
|
|
|
<TextBlock Margin="0,0,10,0" VerticalAlignment="Center"
|
|
|
|
|
Text="{i18n:I18n Key=Startup_EndTime}" FontSize="14" />
|
2026-04-24 07:13:27 +08:00
|
|
|
<ComboBox x:Name="AutoUpdateWithSilenceEndTimeComboBox"
|
2026-04-19 14:42:11 +08:00
|
|
|
SelectionChanged="AutoUpdateWithSilenceEndTimeComboBox_SelectionChanged" />
|
|
|
|
|
</ikw:SimpleStackPanel>
|
|
|
|
|
</ikw:SimpleStackPanel>
|
|
|
|
|
</ui:SettingsCard.Content>
|
|
|
|
|
</ui:SettingsCard>
|
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Startup_TimePeriodHint}" />
|
|
|
|
|
</ui:SettingsExpander.Items>
|
|
|
|
|
</ui:SettingsExpander>
|
|
|
|
|
|
|
|
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
|
|
|
Text="更新通道" />
|
|
|
|
|
|
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Startup_UpdateChannel}"
|
|
|
|
|
Description="{i18n:I18n Key=Startup_UpdateChannelHint}">
|
|
|
|
|
<ui:SettingsCard.HeaderIcon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.SyncFolder}" />
|
|
|
|
|
</ui:SettingsCard.HeaderIcon>
|
2026-04-24 07:13:27 +08:00
|
|
|
<ComboBox x:Name="UpdateChannelSelector"
|
2026-04-19 14:42:11 +08:00
|
|
|
SelectionChanged="UpdateChannelSelector_SelectionChanged">
|
|
|
|
|
<ComboBoxItem Content="{i18n:I18n Key=Update_Release}" Tag="Release" />
|
|
|
|
|
<ComboBoxItem Content="{i18n:I18n Key=Update_Preview}" Tag="Preview" />
|
|
|
|
|
<ComboBoxItem Content="{i18n:I18n Key=Update_Beta}" Tag="Beta" />
|
|
|
|
|
</ComboBox>
|
|
|
|
|
</ui:SettingsCard>
|
|
|
|
|
|
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Startup_UpdatePackageArchitecture}"
|
|
|
|
|
Description="{i18n:I18n Key=Startup_UpdatePackageArchitectureHint}">
|
|
|
|
|
<ui:SettingsCard.HeaderIcon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.DeveloperTools}" />
|
|
|
|
|
</ui:SettingsCard.HeaderIcon>
|
2026-04-24 07:13:27 +08:00
|
|
|
<ComboBox x:Name="UpdatePackageArchitectureSelector"
|
2026-04-19 14:42:11 +08:00
|
|
|
SelectionChanged="UpdatePackageArchitectureSelector_SelectionChanged">
|
|
|
|
|
<ComboBoxItem Content="{i18n:I18n Key=Update_PackageArch_X86}" Tag="X86" />
|
|
|
|
|
<ComboBoxItem Content="{i18n:I18n Key=Update_PackageArch_X64}" Tag="X64" />
|
|
|
|
|
</ComboBox>
|
|
|
|
|
</ui:SettingsCard>
|
|
|
|
|
|
|
|
|
|
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
|
|
|
|
|
Text="手动操作" />
|
|
|
|
|
|
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Btn_ManualUpdate}"
|
|
|
|
|
Description="{i18n:I18n Key=Startup_ManualUpdateHint}">
|
|
|
|
|
<ui:SettingsCard.HeaderIcon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Search}" />
|
|
|
|
|
</ui:SettingsCard.HeaderIcon>
|
|
|
|
|
<Button x:Name="ManualUpdateButton" Content="{i18n:I18n Key=Btn_ManualUpdate}"
|
|
|
|
|
Click="ManualUpdateButton_Click" />
|
|
|
|
|
</ui:SettingsCard>
|
|
|
|
|
|
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Btn_FixVersion}"
|
|
|
|
|
Description="{i18n:I18n Key=Startup_FixVersionHint}">
|
|
|
|
|
<ui:SettingsCard.HeaderIcon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Repair}" />
|
|
|
|
|
</ui:SettingsCard.HeaderIcon>
|
|
|
|
|
<Button x:Name="FixVersionButton" Content="{i18n:I18n Key=Btn_FixVersion}"
|
|
|
|
|
Click="FixVersionButton_Click" />
|
|
|
|
|
</ui:SettingsCard>
|
|
|
|
|
|
|
|
|
|
<ui:SettingsCard Header="{i18n:I18n Key=Btn_HistoryRollback}"
|
|
|
|
|
Description="{i18n:I18n Key=Startup_HistoryRollbackHint}">
|
|
|
|
|
<ui:SettingsCard.HeaderIcon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.History}" />
|
|
|
|
|
</ui:SettingsCard.HeaderIcon>
|
|
|
|
|
<Button Content="{i18n:I18n Key=Btn_HistoryRollback}"
|
|
|
|
|
Click="HistoryRollbackButton_Click" />
|
|
|
|
|
</ui:SettingsCard>
|
|
|
|
|
|
|
|
|
|
<Rectangle Height="48" />
|
|
|
|
|
|
|
|
|
|
</ikw:SimpleStackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</ui:Page>
|