improve:历史版本回滚窗口

This commit is contained in:
2025-09-20 22:20:13 +08:00
parent 0f3b4b4384
commit ebf6d0d5f7
2 changed files with 334 additions and 13 deletions
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interop;
// Added for OrderByDescending
@@ -32,6 +33,15 @@ namespace Ink_Canvas
InitializeComponent();
this.channel = channel;
LoadVersions();
// 添加窗口拖动功能
this.MouseDown += (sender, e) =>
{
if (e.ChangedButton == MouseButton.Left)
{
this.DragMove();
}
};
}
private async void LoadVersions()
@@ -135,6 +145,16 @@ namespace Ink_Canvas
}
}
private void MinimizeButton_Click(object sender, RoutedEventArgs e)
{
this.WindowState = WindowState.Minimized;
}
private void CloseButton_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
protected override void OnClosing(CancelEventArgs e)
{
downloadCts?.Cancel();