feat(插件): 添加应用重启服务接口及实现

添加 IAppRestartService 接口及其实现 AppRestartService,用于插件系统调用应用重启功能
将原 StartupPage 中的重启逻辑提取到 AppRestartHelper 工具类中
在 App.xaml.cs 中注册 AppRestartService 供插件使用
This commit is contained in:
PrefacedCorg
2026-04-21 02:16:58 +08:00
parent cab703b98e
commit 259ce3dd11
5 changed files with 183 additions and 47 deletions
+21
View File
@@ -0,0 +1,21 @@
using System;
namespace Ink_Canvas.Plugins
{
public interface IAppRestartService
{
bool IsRunningAsAdmin { get; }
void RestartApp(bool asAdmin);
void RestartWithCurrentPrivileges();
void RestartAsAdmin();
void RestartAsNormal();
void SwitchToUIATopMostAndRestart();
void SwitchToNormalTopMostAndRestart();
}
}