mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
add Advanced Boot Options restart for Sys plugin
This commit is contained in:
parent
df9cb4b1a4
commit
be516d67f4
4 changed files with 21 additions and 1 deletions
BIN
Plugins/Flow.Launcher.Plugin.Sys/Images/restart_advanced.png
Normal file
BIN
Plugins/Flow.Launcher.Plugin.Sys/Images/restart_advanced.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
<system:String x:Key="flowlauncher_plugin_sys_shutdown_computer">Shutdown Computer</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_sys_restart_computer">Restart Computer</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_sys_restart_advanced">Restart the computer with Advanced Boot Options for Safe and Debugging modes, as well as other options</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_sys_log_off">Log off</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_sys_lock">Lock this computer</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_sys_exit">Close Flow Launcher</system:String>
|
||||
|
|
@ -29,6 +30,7 @@
|
|||
<system:String x:Key="flowlauncher_plugin_sys_dlgtext_all_applicableplugins_reloaded">Reloaded all applicable plugin data</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_sys_dlgtext_shutdown_computer">Are you sure you want to shut the computer down?</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_sys_dlgtext_restart_computer">Are you sure you want to restart the computer?</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_sys_dlgtext_restart_computer_advanced">Are you sure you want to restart the computer with Advanced Boot Options?</system:String>
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_sys_plugin_name">System Commands</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_sys_plugin_description">Provides System related commands. e.g. shutdown, lock, settings etc.</system:String>
|
||||
|
|
|
|||
|
|
@ -131,6 +131,24 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
}
|
||||
},
|
||||
new Result
|
||||
{
|
||||
Title = "Restart With Advanced Boot Options",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_restart_advanced"),
|
||||
IcoPath = "Images\\restart_advanced.png",
|
||||
Action = c =>
|
||||
{
|
||||
var result = MessageBox.Show(
|
||||
context.API.GetTranslation("flowlauncher_plugin_sys_dlgtext_restart_computer_advanced"),
|
||||
context.API.GetTranslation("flowlauncher_plugin_sys_restart_computer"),
|
||||
MessageBoxButton.YesNo, MessageBoxImage.Warning);
|
||||
|
||||
if (result == MessageBoxResult.Yes)
|
||||
Process.Start("shutdown", "/r /o /t 0");
|
||||
|
||||
return true;
|
||||
}
|
||||
},
|
||||
new Result
|
||||
{
|
||||
Title = "Log Off",
|
||||
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_log_off"),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Name": "System Commands",
|
||||
"Description": "Provide System related commands. e.g. shutdown,lock, setting etc.",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "1.3.2",
|
||||
"Version": "1.4.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll",
|
||||
|
|
|
|||
Loading…
Reference in a new issue