merge with master

This commit is contained in:
qianlifeng
2015-07-17 15:08:39 +08:00
25 changed files with 733 additions and 698 deletions

View File

@@ -1,18 +1,18 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<system:String x:Key="wox_plugin_sys_command">命令</system:String>
<system:String x:Key="wox_plugin_sys_desc">描述</system:String>
<system:String x:Key="wox_plugin_sys_shutdown_computer">关闭电脑</system:String>
<system:String x:Key="wox_plugin_sys_log_off">注销</system:String>
<system:String x:Key="wox_plugin_sys_lock">锁定这台电脑</system:String>
<system:String x:Key="wox_plugin_sys_exit">退出Wox</system:String>
<system:String x:Key="wox_plugin_sys_restart">重启Wox</system:String>
<system:String x:Key="wox_plugin_sys_setting">设置</system:String>
<system:String x:Key="wox_plugin_sys_plugin_name">系统命令</system:String>
<system:String x:Key="wox_plugin_sys_plugin_description">系统系统相关的命令。例如,关机,锁定,设置等</system:String>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<system:String x:Key="wox_plugin_sys_command">命令</system:String>
<system:String x:Key="wox_plugin_sys_desc">描述</system:String>
<system:String x:Key="wox_plugin_sys_shutdown_computer">关闭电脑</system:String>
<system:String x:Key="wox_plugin_sys_log_off">注销</system:String>
<system:String x:Key="wox_plugin_sys_lock">锁定这台电脑</system:String>
<system:String x:Key="wox_plugin_sys_exit">退出Wox</system:String>
<system:String x:Key="wox_plugin_sys_restart">重启Wox</system:String>
<system:String x:Key="wox_plugin_sys_setting">设置</system:String>
<system:String x:Key="wox_plugin_sys_plugin_name">系统命令</system:String>
<system:String x:Key="wox_plugin_sys_plugin_description">系统系统相关的命令。例如,关机,锁定,设置等</system:String>
</ResourceDictionary>

View File

@@ -1,18 +1,18 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<system:String x:Key="wox_plugin_sys_command">命令</system:String>
<system:String x:Key="wox_plugin_sys_desc">描述</system:String>
<system:String x:Key="wox_plugin_sys_shutdown_computer">關閉電腦</system:String>
<system:String x:Key="wox_plugin_sys_log_off">註銷</system:String>
<system:String x:Key="wox_plugin_sys_lock">鎖定這臺電腦</system:String>
<system:String x:Key="wox_plugin_sys_exit">退出Wox</system:String>
<system:String x:Key="wox_plugin_sys_restart">重啟Wox</system:String>
<system:String x:Key="wox_plugin_sys_setting">設置</system:String>
<system:String x:Key="wox_plugin_sys_plugin_name">系統命令</system:String>
<system:String x:Key="wox_plugin_sys_plugin_description">系統系統相關的命令。例如,關機,鎖定,設置等</system:String>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<system:String x:Key="wox_plugin_sys_command">命令</system:String>
<system:String x:Key="wox_plugin_sys_desc">描述</system:String>
<system:String x:Key="wox_plugin_sys_shutdown_computer">關閉電腦</system:String>
<system:String x:Key="wox_plugin_sys_log_off">註銷</system:String>
<system:String x:Key="wox_plugin_sys_lock">鎖定這臺電腦</system:String>
<system:String x:Key="wox_plugin_sys_exit">退出Wox</system:String>
<system:String x:Key="wox_plugin_sys_restart">重啟Wox</system:String>
<system:String x:Key="wox_plugin_sys_setting">設置</system:String>
<system:String x:Key="wox_plugin_sys_plugin_name">系統命令</system:String>
<system:String x:Key="wox_plugin_sys_plugin_description">系統系統相關的命令。例如,關機,鎖定,設置等</system:String>
</ResourceDictionary>

View File

@@ -5,6 +5,9 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Wox.Infrastructure;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Control = System.Windows.Controls.Control;
namespace Wox.Plugin.Sys
{
@@ -28,7 +31,7 @@ namespace Wox.Plugin.Sys
#endregion
public System.Windows.Controls.Control CreateSettingPanel()
public Control CreateSettingPanel()
{
return new SysSettings(availableResults);
}
@@ -89,7 +92,15 @@ namespace Wox.Plugin.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 = context.API.GetTranslation("wox_plugin_sys_exit"),