Add upgrade dialog

This commit is contained in:
qianlifeng
2015-02-01 22:46:56 +08:00
parent 691cf1ce72
commit 5ef72b81ae
14 changed files with 507 additions and 266 deletions

BIN
Wox/Images/update.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -103,8 +103,14 @@
<system:String x:Key="reportWindow_wox_got_an_error">Wox got an error</system:String>
<!--update-->
<system:String x:Key="update_wox_update_ready">Wox updates available</system:String>
<system:String x:Key="update_wox_update_install">Wox updates are ready to install. {0} files will be added and replaced, this operation may restart Wox. Do you wish to install them now?</system:String>
<system:String x:Key="update_wox_update_new_version_available">Wox new version V{0} is available</system:String>
<system:String x:Key="update_wox_update_error">An error occurred while trying to install software updates</system:String>
<system:String x:Key="update_wox_update">Update</system:String>
<system:String x:Key="update_wox_update_cancel">Cancel</system:String>
<system:String x:Key="update_wox_update_restart_wox_tip">This upgrade will restart Wox</system:String>
<system:String x:Key="update_wox_update_upadte_files">Following files will be updated</system:String>
<system:String x:Key="update_wox_update_files">Update files</system:String>
<system:String x:Key="update_wox_update_upadte_description">Update description</system:String>
</ResourceDictionary>

View File

@@ -1,108 +1,114 @@
<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="registerHotkeyFailed">注册热键:{0} 失败</system:String>
<system:String x:Key="couldnotStartCmd">启动命令 {0} 失败</system:String>
<system:String x:Key="invalidWoxPluginFileFormat">不是合法的Wox插件格式</system:String>
<!--设置,通用-->
<system:String x:Key="woxsettings">Wox设置</system:String>
<system:String x:Key="general">通用</system:String>
<system:String x:Key="startWoxOnSystemStartup">开机启动</system:String>
<system:String x:Key="hideWoxWhenLoseFocus">失去焦点时自动隐藏Wox</system:String>
<system:String x:Key="dontPromptUpdateMsg">不显示新版本提示</system:String>
<system:String x:Key="language">语言</system:String>
<!--设置,插件-->
<system:String x:Key="plugin">插件</system:String>
<system:String x:Key="browserMorePlugins">浏览更多插件</system:String>
<system:String x:Key="disable">禁用</system:String>
<system:String x:Key="actionKeyword">触发关键字</system:String>
<system:String x:Key="pluginDirectory">插件目录</system:String>
<system:String x:Key="author">作者</system:String>
<!--设置,主题-->
<system:String x:Key="theme">主题</system:String>
<system:String x:Key="browserMoreThemes">浏览更多主题</system:String>
<system:String x:Key="helloWox">你好Wox</system:String>
<system:String x:Key="queryBoxFont">查询框字体</system:String>
<system:String x:Key="resultItemFont">结果项字体</system:String>
<system:String x:Key="windowMode">窗口模式</system:String>
<system:String x:Key="opacity">透明度</system:String>
<!--设置,热键-->
<system:String x:Key="hotkey">热键</system:String>
<system:String x:Key="woxHotkey">Wox激活热键</system:String>
<system:String x:Key="customQueryHotkey">自定义查询热键</system:String>
<system:String x:Key="delete">删除</system:String>
<system:String x:Key="edit">编辑</system:String>
<system:String x:Key="add">增加</system:String>
<system:String x:Key="pleaseSelectAnItem">请选择一项</system:String>
<system:String x:Key="deleteCustomHotkeyWarning">你确定要删除插件 {0} 的热键吗?</system:String>
<!--设置,代理-->
<system:String x:Key="proxy">代理</system:String>
<system:String x:Key="enableProxy">启用代理</system:String>
<system:String x:Key="server">服务器</system:String>
<system:String x:Key="port">端口</system:String>
<system:String x:Key="userName">用户名</system:String>
<system:String x:Key="password">密码</system:String>
<system:String x:Key="testProxy">测试代理</system:String>
<system:String x:Key="save">保存</system:String>
<system:String x:Key="serverCantBeEmpty">服务器不能为空</system:String>
<system:String x:Key="portCantBeEmpty">端口不能为空</system:String>
<system:String x:Key="invalidPortFormat">非法的端口格式</system:String>
<system:String x:Key="saveProxySuccessfully">保存代理设置成功</system:String>
<system:String x:Key="proxyIsCorrect">代理设置正确</system:String>
<system:String x:Key="proxyConnectFailed">代理连接失败</system:String>
<!--设置,版本-->
<system:String x:Key="about">关于</system:String>
<system:String x:Key="website">网站</system:String>
<system:String x:Key="version">版本</system:String>
<system:String x:Key="about_activate_times">你已经激活了Wox {0} 次</system:String>
<!--Action Keyword 设置对话框-->
<system:String x:Key="oldActionKeyword">旧触发关键字</system:String>
<system:String x:Key="newActionKeyword">新触发关键字</system:String>
<system:String x:Key="cancel">取消</system:String>
<system:String x:Key="done">确定</system:String>
<system:String x:Key="cannotFindSpecifiedPlugin">找不到指定的插件</system:String>
<system:String x:Key="newActionKeywordCannotBeEmpty">新触发关键字不能为空</system:String>
<system:String x:Key="newActionKeywordHasBeenAssigned">新触发关键字已经被指派给其他插件了,请重新选择一个关键字</system:String>
<system:String x:Key="succeed">成功</system:String>
<system:String x:Key="actionkeyword_tips">如果你不想设置触发关键字,可以使用*代替</system:String>
<!--Custom Query Hotkey 对话框-->
<system:String x:Key="preview">预览</system:String>
<system:String x:Key="hotkeyIsNotUnavailable">热键不可用,请选择一个新的热键</system:String>
<system:String x:Key="invalidPluginHotkey">插件热键不合法</system:String>
<system:String x:Key="update">更新</system:String>
<!--Hotkey 控件-->
<system:String x:Key="hotkeyUnavailable">热键不可用</system:String>
<!--崩溃报告窗体-->
<system:String x:Key="reportWindow_version">版本</system:String>
<system:String x:Key="reportWindow_time">时间</system:String>
<system:String x:Key="reportWindow_reproduce">请告诉我们如何重现此问题,以便我们进行修复</system:String>
<system:String x:Key="reportWindow_send_report">发送报告</system:String>
<system:String x:Key="reportWindow_cancel">取消</system:String>
<system:String x:Key="reportWindow_general">基本信息</system:String>
<system:String x:Key="reportWindow_exceptions">异常信息</system:String>
<system:String x:Key="reportWindow_exception_type">异常类型</system:String>
<system:String x:Key="reportWindow_source">异常源</system:String>
<system:String x:Key="reportWindow_stack_trace">堆栈信息</system:String>
<system:String x:Key="reportWindow_sending">发送中</system:String>
<system:String x:Key="reportWindow_report_succeed">发送成功</system:String>
<system:String x:Key="reportWindow_report_failed">发送失败</system:String>
<system:String x:Key="reportWindow_wox_got_an_error">Wox出错啦</system:String>
<!--更新-->
<system:String x:Key="update_wox_update_ready">Wox更新</system:String>
<system:String x:Key="update_wox_update_install">Wox更新啦{0}个文件会被添加和替换并且在此过程中可能会重启Wox。你确定需要更新吗</system:String>
<system:String x:Key="update_wox_update_error">更新Wox出错</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="registerHotkeyFailed">注册热键:{0} 失败</system:String>
<system:String x:Key="couldnotStartCmd">启动命令 {0} 失败</system:String>
<system:String x:Key="invalidWoxPluginFileFormat">不是合法的Wox插件格式</system:String>
<!--设置,通用-->
<system:String x:Key="woxsettings">Wox设置</system:String>
<system:String x:Key="general">通用</system:String>
<system:String x:Key="startWoxOnSystemStartup">开机启动</system:String>
<system:String x:Key="hideWoxWhenLoseFocus">失去焦点时自动隐藏Wox</system:String>
<system:String x:Key="dontPromptUpdateMsg">不显示新版本提示</system:String>
<system:String x:Key="language">语言</system:String>
<!--设置,插件-->
<system:String x:Key="plugin">插件</system:String>
<system:String x:Key="browserMorePlugins">浏览更多插件</system:String>
<system:String x:Key="disable">禁用</system:String>
<system:String x:Key="actionKeyword">触发关键字</system:String>
<system:String x:Key="pluginDirectory">插件目录</system:String>
<system:String x:Key="author">作者</system:String>
<!--设置,主题-->
<system:String x:Key="theme">主题</system:String>
<system:String x:Key="browserMoreThemes">浏览更多主题</system:String>
<system:String x:Key="helloWox">你好Wox</system:String>
<system:String x:Key="queryBoxFont">查询框字体</system:String>
<system:String x:Key="resultItemFont">结果项字体</system:String>
<system:String x:Key="windowMode">窗口模式</system:String>
<system:String x:Key="opacity">透明度</system:String>
<!--设置,热键-->
<system:String x:Key="hotkey">热键</system:String>
<system:String x:Key="woxHotkey">Wox激活热键</system:String>
<system:String x:Key="customQueryHotkey">自定义查询热键</system:String>
<system:String x:Key="delete">删除</system:String>
<system:String x:Key="edit">编辑</system:String>
<system:String x:Key="add">增加</system:String>
<system:String x:Key="pleaseSelectAnItem">请选择一项</system:String>
<system:String x:Key="deleteCustomHotkeyWarning">你确定要删除插件 {0} 的热键吗?</system:String>
<!--设置,代理-->
<system:String x:Key="proxy">代理</system:String>
<system:String x:Key="enableProxy">启用代理</system:String>
<system:String x:Key="server">服务器</system:String>
<system:String x:Key="port">端口</system:String>
<system:String x:Key="userName">用户名</system:String>
<system:String x:Key="password">密码</system:String>
<system:String x:Key="testProxy">测试代理</system:String>
<system:String x:Key="save">保存</system:String>
<system:String x:Key="serverCantBeEmpty">服务器不能为空</system:String>
<system:String x:Key="portCantBeEmpty">端口不能为空</system:String>
<system:String x:Key="invalidPortFormat">非法的端口格式</system:String>
<system:String x:Key="saveProxySuccessfully">保存代理设置成功</system:String>
<system:String x:Key="proxyIsCorrect">代理设置正确</system:String>
<system:String x:Key="proxyConnectFailed">代理连接失败</system:String>
<!--设置,版本-->
<system:String x:Key="about">关于</system:String>
<system:String x:Key="website">网站</system:String>
<system:String x:Key="version">版本</system:String>
<system:String x:Key="about_activate_times">你已经激活了Wox {0} 次</system:String>
<!--Action Keyword 设置对话框-->
<system:String x:Key="oldActionKeyword">旧触发关键字</system:String>
<system:String x:Key="newActionKeyword">新触发关键字</system:String>
<system:String x:Key="cancel">取消</system:String>
<system:String x:Key="done">确定</system:String>
<system:String x:Key="cannotFindSpecifiedPlugin">找不到指定的插件</system:String>
<system:String x:Key="newActionKeywordCannotBeEmpty">新触发关键字不能为空</system:String>
<system:String x:Key="newActionKeywordHasBeenAssigned">新触发关键字已经被指派给其他插件了,请重新选择一个关键字</system:String>
<system:String x:Key="succeed">成功</system:String>
<system:String x:Key="actionkeyword_tips">如果你不想设置触发关键字,可以使用*代替</system:String>
<!--Custom Query Hotkey 对话框-->
<system:String x:Key="preview">预览</system:String>
<system:String x:Key="hotkeyIsNotUnavailable">热键不可用,请选择一个新的热键</system:String>
<system:String x:Key="invalidPluginHotkey">插件热键不合法</system:String>
<system:String x:Key="update">更新</system:String>
<!--Hotkey 控件-->
<system:String x:Key="hotkeyUnavailable">热键不可用</system:String>
<!--崩溃报告窗体-->
<system:String x:Key="reportWindow_version">版本</system:String>
<system:String x:Key="reportWindow_time">时间</system:String>
<system:String x:Key="reportWindow_reproduce">请告诉我们如何重现此问题,以便我们进行修复</system:String>
<system:String x:Key="reportWindow_send_report">发送报告</system:String>
<system:String x:Key="reportWindow_cancel">取消</system:String>
<system:String x:Key="reportWindow_general">基本信息</system:String>
<system:String x:Key="reportWindow_exceptions">异常信息</system:String>
<system:String x:Key="reportWindow_exception_type">异常类型</system:String>
<system:String x:Key="reportWindow_source">异常源</system:String>
<system:String x:Key="reportWindow_stack_trace">堆栈信息</system:String>
<system:String x:Key="reportWindow_sending">发送中</system:String>
<system:String x:Key="reportWindow_report_succeed">发送成功</system:String>
<system:String x:Key="reportWindow_report_failed">发送失败</system:String>
<system:String x:Key="reportWindow_wox_got_an_error">Wox出错啦</system:String>
<!--更新-->
<system:String x:Key="update_wox_update_new_version_available">发现Wox新版本 V{0}</system:String>
<system:String x:Key="update_wox_update_error">更新Wox出错</system:String>
<system:String x:Key="update_wox_update">更新</system:String>
<system:String x:Key="update_wox_update_cancel">取消</system:String>
<system:String x:Key="update_wox_update_restart_wox_tip">此更新需要重启Wox</system:String>
<system:String x:Key="update_wox_update_upadte_files">下列文件会被更新</system:String>
<system:String x:Key="update_wox_update_files">更新文件</system:String>
<system:String x:Key="update_wox_update_upadte_description">更新日志</system:String>
</ResourceDictionary>

View File

@@ -1,108 +1,113 @@
<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="registerHotkeyFailed">註冊熱鍵:{0} 失敗</system:String>
<system:String x:Key="couldnotStartCmd">啟動命令 {0} 失敗</system:String>
<system:String x:Key="invalidWoxPluginFileFormat">不是合法的Wox插件格式</system:String>
<!--設置,通用-->
<system:String x:Key="woxsettings">Wox設置</system:String>
<system:String x:Key="general">通用</system:String>
<system:String x:Key="startWoxOnSystemStartup">開機啟動</system:String>
<system:String x:Key="hideWoxWhenLoseFocus">失去焦點時自動隱藏Wox</system:String>
<system:String x:Key="dontPromptUpdateMsg">不顯示新版本提示</system:String>
<system:String x:Key="language">語言</system:String>
<!--設置,插件-->
<system:String x:Key="plugin">插件</system:String>
<system:String x:Key="browserMorePlugins">瀏覽更多插件</system:String>
<system:String x:Key="disable">禁用</system:String>
<system:String x:Key="actionKeyword">觸發關鍵字</system:String>
<system:String x:Key="pluginDirectory">插件目錄</system:String>
<system:String x:Key="author">作者</system:String>
<!--設置,主題-->
<system:String x:Key="theme">主題</system:String>
<system:String x:Key="browserMoreThemes">瀏覽更多主題</system:String>
<system:String x:Key="helloWox">你好Wox</system:String>
<system:String x:Key="queryBoxFont">查詢框字體</system:String>
<system:String x:Key="resultItemFont">結果項字體</system:String>
<system:String x:Key="windowMode">窗口模式</system:String>
<system:String x:Key="opacity">透明度</system:String>
<!--設置,熱鍵-->
<system:String x:Key="hotkey">熱鍵</system:String>
<system:String x:Key="woxHotkey">Wox激活熱鍵</system:String>
<system:String x:Key="customQueryHotkey">自定義查詢熱鍵</system:String>
<system:String x:Key="delete">刪除</system:String>
<system:String x:Key="edit">編輯</system:String>
<system:String x:Key="add">增加</system:String>
<system:String x:Key="pleaseSelectAnItem">請選擇一項</system:String>
<system:String x:Key="deleteCustomHotkeyWarning">你確定要刪除插件 {0} 的熱鍵嗎?</system:String>
<!--設置,代理-->
<system:String x:Key="proxy">代理</system:String>
<system:String x:Key="enableProxy">啟用代理</system:String>
<system:String x:Key="server">服務器</system:String>
<system:String x:Key="port">端口</system:String>
<system:String x:Key="userName">用戶名</system:String>
<system:String x:Key="password">密碼</system:String>
<system:String x:Key="testProxy">測試代理</system:String>
<system:String x:Key="save">保存</system:String>
<system:String x:Key="serverCantBeEmpty">服務器不能為空</system:String>
<system:String x:Key="portCantBeEmpty">端口不能為空</system:String>
<system:String x:Key="invalidPortFormat">非法的端口格式</system:String>
<system:String x:Key="saveProxySuccessfully">保存代理設置成功</system:String>
<system:String x:Key="proxyIsCorrect">代理設置正確</system:String>
<system:String x:Key="proxyConnectFailed">代理連接失敗</system:String>
<!--設置,版本-->
<system:String x:Key="about">關於</system:String>
<system:String x:Key="website">網站</system:String>
<system:String x:Key="version">版本</system:String>
<system:String x:Key="about_activate_times">你已經激活了Wox {0} 次</system:String>
<!--Action Keyword 設置對話框-->
<system:String x:Key="oldActionKeyword">舊觸發關鍵字</system:String>
<system:String x:Key="newActionKeyword">新觸發關鍵字</system:String>
<system:String x:Key="cancel">取消</system:String>
<system:String x:Key="done">確定</system:String>
<system:String x:Key="cannotFindSpecifiedPlugin">找不到指定的插件</system:String>
<system:String x:Key="newActionKeywordCannotBeEmpty">新觸發關鍵字不能為空</system:String>
<system:String x:Key="newActionKeywordHasBeenAssigned">新觸發關鍵字已經被指派給其他插件了,請重新選擇一個關鍵字</system:String>
<system:String x:Key="succeed">成功</system:String>
<system:String x:Key="actionkeyword_tips">如果你不想設置觸發關鍵字,可以使用*代替</system:String>
<!--Custom Query Hotkey 對話框-->
<system:String x:Key="preview">預覽</system:String>
<system:String x:Key="hotkeyIsNotUnavailable">熱鍵不可用,請選擇一個新的熱鍵</system:String>
<system:String x:Key="invalidPluginHotkey">插件熱鍵不合法</system:String>
<system:String x:Key="update">更新</system:String>
<!--Hotkey 控件-->
<system:String x:Key="hotkeyUnavailable">熱鍵不可用</system:String>
<!--崩潰報告窗體-->
<system:String x:Key="reportWindow_version">版本</system:String>
<system:String x:Key="reportWindow_time">時間</system:String>
<system:String x:Key="reportWindow_reproduce">請告訴我們如何重現此問題,以便我們進行修復</system:String>
<system:String x:Key="reportWindow_send_report">發送報告</system:String>
<system:String x:Key="reportWindow_cancel">取消</system:String>
<system:String x:Key="reportWindow_general">基本信息</system:String>
<system:String x:Key="reportWindow_exceptions">異常信息</system:String>
<system:String x:Key="reportWindow_exception_type">異常類型</system:String>
<system:String x:Key="reportWindow_source">異常源</system:String>
<system:String x:Key="reportWindow_stack_trace">堆棧信息</system:String>
<system:String x:Key="reportWindow_sending">發送中</system:String>
<system:String x:Key="reportWindow_report_succeed">發送成功</system:String>
<system:String x:Key="reportWindow_report_failed">發送失敗</system:String>
<system:String x:Key="reportWindow_wox_got_an_error">Wox出錯啦</system:String>
<!--更新-->
<system:String x:Key="update_wox_update_ready">Wox更新</system:String>
<system:String x:Key="update_wox_update_install">Wox更新啦{0}個文件會被添加和替換並且在此過程中可能會重啟Wox。你確定需要更新嗎</system:String>
<system:String x:Key="update_wox_update_error">更新Wox出錯</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="registerHotkeyFailed">註冊熱鍵:{0} 失敗</system:String>
<system:String x:Key="couldnotStartCmd">啟動命令 {0} 失敗</system:String>
<system:String x:Key="invalidWoxPluginFileFormat">不是合法的Wox插件格式</system:String>
<!--設置,通用-->
<system:String x:Key="woxsettings">Wox設置</system:String>
<system:String x:Key="general">通用</system:String>
<system:String x:Key="startWoxOnSystemStartup">開機啟動</system:String>
<system:String x:Key="hideWoxWhenLoseFocus">失去焦點時自動隱藏Wox</system:String>
<system:String x:Key="dontPromptUpdateMsg">不顯示新版本提示</system:String>
<system:String x:Key="language">語言</system:String>
<!--設置,插件-->
<system:String x:Key="plugin">插件</system:String>
<system:String x:Key="browserMorePlugins">瀏覽更多插件</system:String>
<system:String x:Key="disable">禁用</system:String>
<system:String x:Key="actionKeyword">觸發關鍵字</system:String>
<system:String x:Key="pluginDirectory">插件目錄</system:String>
<system:String x:Key="author">作者</system:String>
<!--設置,主題-->
<system:String x:Key="theme">主題</system:String>
<system:String x:Key="browserMoreThemes">瀏覽更多主題</system:String>
<system:String x:Key="helloWox">你好Wox</system:String>
<system:String x:Key="queryBoxFont">查詢框字體</system:String>
<system:String x:Key="resultItemFont">結果項字體</system:String>
<system:String x:Key="windowMode">窗口模式</system:String>
<system:String x:Key="opacity">透明度</system:String>
<!--設置,熱鍵-->
<system:String x:Key="hotkey">熱鍵</system:String>
<system:String x:Key="woxHotkey">Wox激活熱鍵</system:String>
<system:String x:Key="customQueryHotkey">自定義查詢熱鍵</system:String>
<system:String x:Key="delete">刪除</system:String>
<system:String x:Key="edit">編輯</system:String>
<system:String x:Key="add">增加</system:String>
<system:String x:Key="pleaseSelectAnItem">請選擇一項</system:String>
<system:String x:Key="deleteCustomHotkeyWarning">你確定要刪除插件 {0} 的熱鍵嗎?</system:String>
<!--設置,代理-->
<system:String x:Key="proxy">代理</system:String>
<system:String x:Key="enableProxy">啟用代理</system:String>
<system:String x:Key="server">服務器</system:String>
<system:String x:Key="port">端口</system:String>
<system:String x:Key="userName">用戶名</system:String>
<system:String x:Key="password">密碼</system:String>
<system:String x:Key="testProxy">測試代理</system:String>
<system:String x:Key="save">保存</system:String>
<system:String x:Key="serverCantBeEmpty">服務器不能為空</system:String>
<system:String x:Key="portCantBeEmpty">端口不能為空</system:String>
<system:String x:Key="invalidPortFormat">非法的端口格式</system:String>
<system:String x:Key="saveProxySuccessfully">保存代理設置成功</system:String>
<system:String x:Key="proxyIsCorrect">代理設置正確</system:String>
<system:String x:Key="proxyConnectFailed">代理連接失敗</system:String>
<!--設置,版本-->
<system:String x:Key="about">關於</system:String>
<system:String x:Key="website">網站</system:String>
<system:String x:Key="version">版本</system:String>
<system:String x:Key="about_activate_times">你已經激活了Wox {0} 次</system:String>
<!--Action Keyword 設置對話框-->
<system:String x:Key="oldActionKeyword">舊觸發關鍵字</system:String>
<system:String x:Key="newActionKeyword">新觸發關鍵字</system:String>
<system:String x:Key="cancel">取消</system:String>
<system:String x:Key="done">確定</system:String>
<system:String x:Key="cannotFindSpecifiedPlugin">找不到指定的插件</system:String>
<system:String x:Key="newActionKeywordCannotBeEmpty">新觸發關鍵字不能為空</system:String>
<system:String x:Key="newActionKeywordHasBeenAssigned">新觸發關鍵字已經被指派給其他插件了,請重新選擇一個關鍵字</system:String>
<system:String x:Key="succeed">成功</system:String>
<system:String x:Key="actionkeyword_tips">如果你不想設置觸發關鍵字,可以使用*代替</system:String>
<!--Custom Query Hotkey 對話框-->
<system:String x:Key="preview">預覽</system:String>
<system:String x:Key="hotkeyIsNotUnavailable">熱鍵不可用,請選擇一個新的熱鍵</system:String>
<system:String x:Key="invalidPluginHotkey">插件熱鍵不合法</system:String>
<system:String x:Key="update">更新</system:String>
<!--Hotkey 控件-->
<system:String x:Key="hotkeyUnavailable">熱鍵不可用</system:String>
<!--崩潰報告窗體-->
<system:String x:Key="reportWindow_version">版本</system:String>
<system:String x:Key="reportWindow_time">時間</system:String>
<system:String x:Key="reportWindow_reproduce">請告訴我們如何重現此問題,以便我們進行修復</system:String>
<system:String x:Key="reportWindow_send_report">發送報告</system:String>
<system:String x:Key="reportWindow_cancel">取消</system:String>
<system:String x:Key="reportWindow_general">基本信息</system:String>
<system:String x:Key="reportWindow_exceptions">異常信息</system:String>
<system:String x:Key="reportWindow_exception_type">異常類型</system:String>
<system:String x:Key="reportWindow_source">異常源</system:String>
<system:String x:Key="reportWindow_stack_trace">堆棧信息</system:String>
<system:String x:Key="reportWindow_sending">發送中</system:String>
<system:String x:Key="reportWindow_report_succeed">發送成功</system:String>
<system:String x:Key="reportWindow_report_failed">發送失敗</system:String>
<system:String x:Key="reportWindow_wox_got_an_error">Wox出錯啦</system:String>
<!--更新-->
<system:String x:Key="update_wox_update_new_version_available">發現Wox新版本 V{0}</system:String>
<system:String x:Key="update_wox_update_error">更新Wox出錯</system:String>
<system:String x:Key="update_wox_update">更新</system:String>
<system:String x:Key="update_wox_update_cancel">取消</system:String>
<system:String x:Key="update_wox_update_restart_wox_tip">此更新需要重啟Wox</system:String>
<system:String x:Key="update_wox_update_upadte_files">下列文件會被更新</system:String>
<system:String x:Key="update_wox_update_files">更新文件</system:String>
<system:String x:Key="update_wox_update_upadte_description">更新日誌</system:String>
</ResourceDictionary>

View File

@@ -238,9 +238,30 @@ namespace Wox
InitProgressbarAnimation();
WindowIntelopHelper.DisableControlBox(this);
CheckUpdate();
}
private void CheckUpdate()
{
UpdaterManager.Instance.PrepareUpdateReady+=OnPrepareUpdateReady;
UpdaterManager.Instance.UpdateError += OnUpdateError;
UpdaterManager.Instance.CheckUpdate();
}
void OnUpdateError(object sender, EventArgs e)
{
string updateError = InternationalizationManager.Instance.GetTranslation("update_wox_update_error");
MessageBox.Show(updateError);
}
private void OnPrepareUpdateReady(object sender, EventArgs e)
{
Dispatcher.Invoke(new Action(() =>
{
new WoxUpdate().ShowDialog();
}));
}
public void SetHotkey(string hotkeyStr, EventHandler<HotkeyEventArgs> action)
{
var hotkey = new HotkeyModel(hotkeyStr);

View File

@@ -66,6 +66,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="MarkdownSharp">
<HintPath>..\packages\MarkdownSharp.1.13.0.0\lib\35\MarkdownSharp.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
@@ -113,6 +116,9 @@
<Compile Include="Converters\StringNullOrEmptyToVisibilityConverter.cs" />
<Compile Include="ImageLoader\ImageCacheStroage.cs" />
<Compile Include="Storage\UserSelectedRecordStorage.cs" />
<Compile Include="WoxUpdate.xaml.cs">
<DependentUpon>WoxUpdate.xaml</DependentUpon>
</Compile>
<Page Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -170,6 +176,9 @@
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Resource Include="Images\update.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Content Include="Languages\en.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -230,6 +239,10 @@
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Page Include="WoxUpdate.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">

45
Wox/WoxUpdate.xaml Normal file
View File

@@ -0,0 +1,45 @@
<Window x:Class="Wox.WoxUpdate"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Icon="Images/app.png"
Topmost="True"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
Title="{DynamicResource update_wox_update}" Height="400" Width="600">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition ></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="Images/update.png" Width="64"></Image>
<TextBlock x:Name="tbNewVersionAvailable" Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" FontSize="20" Text="{DynamicResource update_wox_update_new_version_available}"></TextBlock>
<TabControl Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2">
<TabItem Header="{DynamicResource update_wox_update_upadte_description}">
<WebBrowser x:Name="wbDetails" Grid.Row="1"></WebBrowser>
</TabItem>
<TabItem Header="{DynamicResource update_wox_update_files}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Padding="8" Text="{DynamicResource update_wox_update_upadte_files}"></TextBlock>
<ListBox x:Name="lbUpdatedFiles" Grid.Row="1">
</ListBox>
</Grid>
</TabItem>
</TabControl>
<StackPanel Grid.Column="1" Grid.Row="4" HorizontalAlignment="Right" Orientation="Horizontal">
<TextBlock Foreground="Gray" TextAlignment="Center" Margin="0 0 10 0" VerticalAlignment="Center" Text="{DynamicResource update_wox_update_restart_wox_tip}"></TextBlock>
<Button x:Name="btnUpdate" Padding="8 3" Margin="8" Click="btnUpdate_Click" Content="{DynamicResource update_wox_update}">
</Button>
<Button x:Name="btnCancel" Padding="8 3" Margin="8" Click="btnCancel_Click" Content="{DynamicResource update_wox_update_cancel}">
</Button>
</StackPanel>
</Grid>
</Window>

34
Wox/WoxUpdate.xaml.cs Normal file
View File

@@ -0,0 +1,34 @@
using System.Windows;
using MarkdownSharp;
using Wox.Core.i18n;
using Wox.Core.Updater;
namespace Wox
{
public partial class WoxUpdate : Window
{
public WoxUpdate()
{
InitializeComponent();
string newVersionAvailable = string.Format(
InternationalizationManager.Instance.GetTranslation("update_wox_update_new_version_available"),
UpdaterManager.Instance.NewRelease);
tbNewVersionAvailable.Text = newVersionAvailable;
Markdown markdown = new Markdown();
wbDetails.NavigateToString(markdown.Transform(UpdaterManager.Instance.NewRelease.description));
lbUpdatedFiles.ItemsSource = UpdaterManager.Instance.GetAvailableUpdateFiles();
}
private void btnUpdate_Click(object sender, RoutedEventArgs e)
{
UpdaterManager.Instance.ApplyUpdates();
}
private void btnCancel_Click(object sender, RoutedEventArgs e)
{
UpdaterManager.Instance.CleanUp();
Close();
}
}
}

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="InputSimulator" version="1.0.4.0" targetFramework="net35" />
<package id="MarkdownSharp" version="1.13.0.0" targetFramework="net35" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net35" />
<package id="NHotkey" version="1.2.1" targetFramework="net35" />
<package id="NHotkey.Wpf" version="1.2.1" targetFramework="net35" />