feat(插件): 添加应用重启服务接口及实现
添加 IAppRestartService 接口及其实现 AppRestartService,用于插件系统调用应用重启功能 将原 StartupPage 中的重启逻辑提取到 AppRestartHelper 工具类中 在 App.xaml.cs 中注册 AppRestartService 供插件使用
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user