From aacf5b696c480c7e81a19c352545e49cfe1b27e7 Mon Sep 17 00:00:00 2001 From: PrefacedCorg <1876568293@qq.com> Date: Sun, 26 Apr 2026 17:40:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=B8=BB=E9=A1=B5):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=87=8D=E5=90=AF=E3=80=81=E9=87=8D=E7=BD=AE=E5=92=8C=E9=80=80?= =?UTF-8?q?=E5=87=BA=E5=BA=94=E7=94=A8=E7=A8=8B=E5=BA=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在主页设置页面新增操作区域,包含重启应用程序、重置为推荐设置和退出应用程序三个功能按钮。同时添加了对应的多语言资源字符串。 --- Ink Canvas/MainWindow.xaml | 101 +----------------- Ink Canvas/Properties/Strings.en-US.resx | 9 ++ Ink Canvas/Properties/Strings.resx | 9 ++ .../Windows/SettingsViews/Pages/HomePage.xaml | 24 +++++ .../SettingsViews/Pages/HomePage.xaml.cs | 18 ++++ 5 files changed, 61 insertions(+), 100 deletions(-) diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index 3d8fcf61..ed9825f5 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -1,4 +1,4 @@ - - - - - - - - - - - - - - diff --git a/Ink Canvas/Properties/Strings.en-US.resx b/Ink Canvas/Properties/Strings.en-US.resx index 0665ba02..a0c0a321 100644 --- a/Ink Canvas/Properties/Strings.en-US.resx +++ b/Ink Canvas/Properties/Strings.en-US.resx @@ -207,6 +207,15 @@ Exit + + Restart application + + + Reset to recommended settings + + + Exit application + Mode diff --git a/Ink Canvas/Properties/Strings.resx b/Ink Canvas/Properties/Strings.resx index ea3fb82c..0fb11153 100644 --- a/Ink Canvas/Properties/Strings.resx +++ b/Ink Canvas/Properties/Strings.resx @@ -222,6 +222,15 @@ 退出 + + 重启应用程序 + + + 重置为推荐设置 + + + 退出应用程序 + 模式设置 diff --git a/Ink Canvas/Windows/SettingsViews/Pages/HomePage.xaml b/Ink Canvas/Windows/SettingsViews/Pages/HomePage.xaml index 38c7f57e..edf0cc03 100644 --- a/Ink Canvas/Windows/SettingsViews/Pages/HomePage.xaml +++ b/Ink Canvas/Windows/SettingsViews/Pages/HomePage.xaml @@ -29,6 +29,30 @@ HorizontalAlignment="Stretch" Spacing="{StaticResource SettingsCardSpacing}"> + + + + + + + + + + + + + + + + + + + + diff --git a/Ink Canvas/Windows/SettingsViews/Pages/HomePage.xaml.cs b/Ink Canvas/Windows/SettingsViews/Pages/HomePage.xaml.cs index 8ba08d8f..a7d77dde 100644 --- a/Ink Canvas/Windows/SettingsViews/Pages/HomePage.xaml.cs +++ b/Ink Canvas/Windows/SettingsViews/Pages/HomePage.xaml.cs @@ -17,5 +17,23 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages settingsWindow?.NavigateToPage(pageTag); } } + + private void BtnRestart_Click(object sender, RoutedEventArgs e) + { + var mainWindow = Application.Current.MainWindow as MainWindow; + mainWindow?.BtnRestart_Click(sender, e); + } + + private void BtnResetToSuggestion_Click(object sender, RoutedEventArgs e) + { + var mainWindow = Application.Current.MainWindow as MainWindow; + mainWindow?.BtnResetToSuggestion_Click(sender, e); + } + + private void BtnExit_Click(object sender, RoutedEventArgs e) + { + var mainWindow = Application.Current.MainWindow as MainWindow; + mainWindow?.BtnExit_Click(sender, e); + } } }