Files
community/Ink Canvas/Windows/SettingsViews/Pages/HomePage.xaml.cs
T
PrefacedCorg aacf5b696c feat(主页): 添加重启、重置和退出应用程序功能
在主页设置页面新增操作区域,包含重启应用程序、重置为推荐设置和退出应用程序三个功能按钮。同时添加了对应的多语言资源字符串。
2026-04-26 17:40:21 +08:00

40 lines
1.2 KiB
C#

using System.Windows;
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
public partial class HomePage
{
public HomePage()
{
InitializeComponent();
}
private void QuickNavCard_Click(object sender, RoutedEventArgs e)
{
if (sender is FrameworkElement element && element.Tag is string pageTag)
{
var settingsWindow = Window.GetWindow(this) as SettingsWindow;
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);
}
}
}