add:新设置

This commit is contained in:
2026-02-07 14:53:37 +08:00
parent 840eca88c8
commit 3c908feb95
3 changed files with 10 additions and 9 deletions
@@ -268,9 +268,6 @@ namespace Ink_Canvas.Windows.SettingsViews
}
}
/// <summary>
/// 处理选项变化 - 子类需要实现
/// </summary>
protected abstract void HandleOptionChange(string group, string value);
}
}
@@ -362,12 +362,12 @@ namespace Ink_Canvas.Windows.SettingsViews
HistoryLogViewer.Markdown = markdown.ToString();
foreach (var (version, downloadUrl, releaseNotes) in _historyVersions)
foreach (var versionInfo in _historyVersions)
{
var item = new ComboBoxItem
{
Content = version,
Tag = (version, downloadUrl, releaseNotes)
Content = versionInfo.version,
Tag = versionInfo
};
RollbackVersionComboBox.Items.Add(item);
}
@@ -386,8 +386,12 @@ namespace Ink_Canvas.Windows.SettingsViews
private void RollbackVersionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (RollbackVersionComboBox.SelectedItem is ComboBoxItem selectedItem && selectedItem.Tag is (string version, string downloadUrl, string releaseNotes))
if (RollbackVersionComboBox.SelectedItem is ComboBoxItem selectedItem && selectedItem.Tag is ValueTuple<string, string, string> versionInfo)
{
var version = versionInfo.Item1;
var downloadUrl = versionInfo.Item2;
var releaseNotes = versionInfo.Item3;
if (!string.IsNullOrEmpty(releaseNotes))
{
HistoryLogViewer.Markdown = $"# {version}\n\n{releaseNotes}";