Add option to put computer to sleep

This commit is contained in:
kerams
2015-07-14 17:59:24 +02:00
parent 298e041b80
commit 2089406eaf
3 changed files with 17 additions and 6 deletions

View File

@@ -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",