diff --git a/Wox.Plugin.SystemPlugins/Sys/Sys.cs b/Wox.Plugin.SystemPlugins/Sys/Sys.cs index 50a2a6e859..15826859a8 100644 --- a/Wox.Plugin.SystemPlugins/Sys/Sys.cs +++ b/Wox.Plugin.SystemPlugins/Sys/Sys.cs @@ -1,10 +1,8 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Runtime.InteropServices; -using System.Text; using System.Windows.Forms; +using Control = System.Windows.Controls.Control; namespace Wox.Plugin.SystemPlugins.Sys { @@ -51,7 +49,7 @@ namespace Wox.Plugin.SystemPlugins.Sys #endregion - public System.Windows.Controls.Control CreateSettingPanel() + public Control CreateSettingPanel() { return new SysSettings(availableResults); } @@ -109,7 +107,15 @@ namespace Wox.Plugin.SystemPlugins.Sys return true; } }, - new Result + new Result + { + Title = "Sleep", + SubTitle = "Put computer to sleep", + Score = 100, + IcoPath = "Images\\sleep.png", + Action = (c) => Application.SetSuspendState(PowerState.Suspend, false, false) + }, + new Result { Title = "Exit", SubTitle = "Close this app", diff --git a/Wox/Images/sleep.png b/Wox/Images/sleep.png new file mode 100644 index 0000000000..c7668e7f29 Binary files /dev/null and b/Wox/Images/sleep.png differ diff --git a/Wox/Wox.csproj b/Wox/Wox.csproj index cca06f9642..d7c6373baa 100644 --- a/Wox/Wox.csproj +++ b/Wox/Wox.csproj @@ -396,6 +396,11 @@ + + + PreserveNewest + +