From 13f00edefd80139655235f5a1ffc0fecc02a3004 Mon Sep 17 00:00:00 2001 From: qianlifeng Date: Mon, 6 Jan 2014 22:21:08 +0800 Subject: [PATCH] fix shutdown didn't work issue --- WinAlfred.Plugin.System/Sys.cs | 3 ++- WinAlfred/App.xaml | 2 +- WinAlfred/App.xaml.cs | 39 ++++++++++++++++++++++++---------- WinAlfred/MainWindow.xaml.cs | 23 +++++++++++++++++++- WinAlfred/WinAlfred.csproj | 11 ++++++++++ 5 files changed, 64 insertions(+), 14 deletions(-) diff --git a/WinAlfred.Plugin.System/Sys.cs b/WinAlfred.Plugin.System/Sys.cs index 9919ca6c3..a2badb7ce 100644 --- a/WinAlfred.Plugin.System/Sys.cs +++ b/WinAlfred.Plugin.System/Sys.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices; using System.Text; @@ -44,7 +45,7 @@ namespace WinAlfred.Plugin.System SubTitle = "Shutdown Computer", Score = 100, IcoPath = "Images\\exit.png", - Action = () => ExitWindowsEx(EWX_SHUTDOWN,0) + Action = () => Process.Start("shutdown","/s /t 0") }); availableResults.Add(new Result { diff --git a/WinAlfred/App.xaml b/WinAlfred/App.xaml index 9acfef20e..1a43596b7 100644 --- a/WinAlfred/App.xaml +++ b/WinAlfred/App.xaml @@ -1,7 +1,7 @@  + >