Refactoring. Move system plugins to seperate DLLs.
@@ -29,7 +29,7 @@ namespace Wox
|
||||
PluginPair plugin = PluginManager.GetPlugin(pluginId);
|
||||
if (plugin == null)
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("cannotFindSpecifiedPlugin"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("cannotFindSpecifiedPlugin"));
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
@@ -52,14 +52,14 @@ namespace Wox
|
||||
{
|
||||
if (string.IsNullOrEmpty(tbAction.Text))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("newActionKeywordCannotBeEmpty"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("newActionKeywordCannotBeEmpty"));
|
||||
return;
|
||||
}
|
||||
|
||||
//check new action keyword didn't used by other plugin
|
||||
if (PluginManager.AllPlugins.Exists(o => o.Metadata.ActionKeyword == tbAction.Text.Trim()))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("newActionKeywordHasBeenAssigned"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("newActionKeywordHasBeenAssigned"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Wox
|
||||
customizedPluginConfig.Actionword = tbAction.Text.Trim();
|
||||
}
|
||||
UserSettingStorage.Instance.Save();
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("succeed"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("succeed"));
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Themes/Dark.xaml" />
|
||||
<ResourceDictionary Source="Languages/English.xaml" />
|
||||
<ResourceDictionary Source="Languages/en.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Wox
|
||||
{
|
||||
if (!ctlHotkey.CurrentHotkeyAvailable)
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("hotkeyIsNotUnavailable"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("hotkeyIsNotUnavailable"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -49,13 +49,13 @@ namespace Wox
|
||||
settingWidow.MainWindow.ChangeQuery(pluginHotkey.ActionKeyword);
|
||||
settingWidow.MainWindow.ShowApp();
|
||||
});
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("succeed"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("succeed"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (updateCustomHotkey.Hotkey != ctlHotkey.CurrentHotkey.ToString() && !ctlHotkey.CurrentHotkeyAvailable)
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("hotkeyIsNotUnavailable"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("hotkeyIsNotUnavailable"));
|
||||
return;
|
||||
}
|
||||
var oldHotkey = updateCustomHotkey.Hotkey;
|
||||
@@ -68,7 +68,7 @@ namespace Wox
|
||||
settingWidow.MainWindow.ShowApp();
|
||||
settingWidow.MainWindow.ChangeQuery(updateCustomHotkey.ActionKeyword);
|
||||
});
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("succeed"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("succeed"));
|
||||
}
|
||||
|
||||
UserSettingStorage.Instance.Save();
|
||||
@@ -81,7 +81,7 @@ namespace Wox
|
||||
updateCustomHotkey = UserSettingStorage.Instance.CustomPluginHotkeys.FirstOrDefault(o => o.ActionKeyword == item.ActionKeyword && o.Hotkey == item.Hotkey);
|
||||
if (updateCustomHotkey == null)
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("invalidPluginHotkey"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("invalidPluginHotkey"));
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ namespace Wox
|
||||
tbAction.Text = updateCustomHotkey.ActionKeyword;
|
||||
ctlHotkey.SetHotkey(updateCustomHotkey.Hotkey, false);
|
||||
update = true;
|
||||
lblAdd.Text = InternationalizationManager.Instance.GetTranslation("update");
|
||||
lblAdd.Text = InternationalizationManager.Internationalization.GetTranslation("update");
|
||||
}
|
||||
|
||||
private void BtnTestActionKeyword_OnClick(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -99,12 +99,12 @@ namespace Wox
|
||||
if (!CurrentHotkeyAvailable)
|
||||
{
|
||||
tbMsg.Foreground = new SolidColorBrush(Colors.Red);
|
||||
tbMsg.Text = InternationalizationManager.Instance.GetTranslation("hotkeyUnavailable");
|
||||
tbMsg.Text = InternationalizationManager.Internationalization.GetTranslation("hotkeyUnavailable");
|
||||
}
|
||||
else
|
||||
{
|
||||
tbMsg.Foreground = new SolidColorBrush(Colors.Green);
|
||||
tbMsg.Text = InternationalizationManager.Instance.GetTranslation("succeed");
|
||||
tbMsg.Text = InternationalizationManager.Internationalization.GetTranslation("succeed");
|
||||
}
|
||||
OnOnHotkeyChanged();
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 139 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 613 B |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
85
Wox/Languages/zh-tw.xaml
Normal file
@@ -0,0 +1,85 @@
|
||||
<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="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>
|
||||
|
||||
|
||||
<!--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>
|
||||
|
||||
<!--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>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -175,8 +175,8 @@ namespace Wox
|
||||
pnlResult.RightMouseClickEvent += pnlResult_RightMouseClickEvent;
|
||||
|
||||
ThreadPool.SetMaxThreads(30, 10);
|
||||
ThemeManager.Instance.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
InternationalizationManager.Instance.ChangeLanguage(UserSettingStorage.Instance.Language);
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
InternationalizationManager.Internationalization.ChangeLanguage(UserSettingStorage.Instance.Language);
|
||||
|
||||
SetHotkey(UserSettingStorage.Instance.Hotkey, OnHotkey);
|
||||
SetCustomPluginHotkey();
|
||||
@@ -268,7 +268,7 @@ namespace Wox
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
string errorMsg = string.Format(InternationalizationManager.Instance.GetTranslation("registerHotkeyFailed"), hotkeyStr);
|
||||
string errorMsg = string.Format(InternationalizationManager.Internationalization.GetTranslation("registerHotkeyFailed"), hotkeyStr);
|
||||
MessageBox.Show(errorMsg);
|
||||
}
|
||||
}
|
||||
@@ -686,7 +686,7 @@ namespace Wox
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string errorMsg = string.Format(InternationalizationManager.Instance.GetTranslation("couldnotStartCmd"), cmd);
|
||||
string errorMsg = string.Format(InternationalizationManager.Internationalization.GetTranslation("couldnotStartCmd"), cmd);
|
||||
ShowMsg(errorMsg, ex.Message, null);
|
||||
}
|
||||
return false;
|
||||
@@ -704,7 +704,7 @@ namespace Wox
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("invalidWoxPluginFileFormat"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("invalidWoxPluginFileFormat"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
xmlns:wox="clr-namespace:Wox"
|
||||
xmlns:UserSettings="clr-namespace:Wox.Infrastructure.Storage.UserSettings;assembly=Wox.Infrastructure" x:Class="Wox.SettingWindow"
|
||||
xmlns:woxPlugin="clr-namespace:Wox.Plugin;assembly=Wox.Plugin"
|
||||
xmlns:system="clr-namespace:Wox.Plugin.SystemPlugins;assembly=Wox.Plugin.SystemPlugins"
|
||||
xmlns:converters="clr-namespace:Wox.Converters"
|
||||
Icon="Images\app.png"
|
||||
Title="Wox Settings"
|
||||
@@ -47,24 +46,6 @@
|
||||
<TextBlock DockPanel.Dock="Top" Margin="6" HorizontalAlignment="Left" Cursor="Hand" MouseUp="tbMorePlugins_MouseUp" x:Name="tbMorePlugins" Foreground="Blue" Text="{DynamicResource browserMorePlugins}"></TextBlock>
|
||||
<ListBox x:Name="lbPlugins" Margin="0" SelectionChanged="lbPlugins_OnSelectionChanged" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Grid.IsSharedSizeScope="True" >
|
||||
<ListBox.Resources>
|
||||
<DataTemplate DataType="{x:Type system:BaseSystemPlugin}">
|
||||
<Grid Height="36" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="32"></ColumnDefinition>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Width="32" Height="32" HorizontalAlignment="Left" Source="{Binding FullIcoPath,Converter={StaticResource ImageConverter},IsAsync=True}">
|
||||
</Image>
|
||||
<Grid Margin="3 0 3 0" Grid.Column="1" HorizontalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock VerticalAlignment="Center" ToolTip="{Binding Name}" x:Name="tbTitle" Text="{Binding Name}"></TextBlock>
|
||||
<TextBlock ToolTip="{Binding Description}" Visibility="{Binding Description, Converter={converters:StringNullOrEmptyToVisibilityConverter}}" Grid.Row="1" x:Name="tbSubTitle" Text="{Binding Description}" Opacity="0.5"></TextBlock>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type woxPlugin:PluginPair}">
|
||||
<Grid Height="36" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -15,7 +15,6 @@ using Wox.Core.Plugin;
|
||||
using Wox.Infrastructure.Storage.UserSettings;
|
||||
using Wox.Plugin;
|
||||
using Wox.Helper;
|
||||
using Wox.Plugin.SystemPlugins;
|
||||
using Wox.Update;
|
||||
using Application = System.Windows.Forms.Application;
|
||||
using File = System.IO.File;
|
||||
@@ -152,7 +151,7 @@ namespace Wox
|
||||
}
|
||||
});
|
||||
|
||||
foreach (string theme in ThemeManager.Instance.LoadAvailableThemes())
|
||||
foreach (string theme in ThemeManager.Theme.LoadAvailableThemes())
|
||||
{
|
||||
string themeName = System.IO.Path.GetFileNameWithoutExtension(theme);
|
||||
themeComboBox.Items.Add(themeName);
|
||||
@@ -176,7 +175,7 @@ namespace Wox
|
||||
}
|
||||
|
||||
//PreviewPanel
|
||||
ThemeManager.Instance.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
#endregion
|
||||
|
||||
#region Plugin
|
||||
@@ -189,16 +188,7 @@ namespace Wox
|
||||
{
|
||||
new CollectionContainer
|
||||
{
|
||||
Collection =
|
||||
PluginManager.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System)
|
||||
.Select(o => o.Plugin)
|
||||
.Cast<ISystemPlugin>()
|
||||
},
|
||||
FindResource("FeatureBoxSeperator"),
|
||||
new CollectionContainer
|
||||
{
|
||||
Collection =
|
||||
PluginManager.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.User)
|
||||
Collection = PluginManager.AllPlugins
|
||||
}
|
||||
};
|
||||
lbPlugins.ItemsSource = plugins;
|
||||
@@ -246,15 +236,16 @@ namespace Wox
|
||||
|
||||
private void LoadLanguages()
|
||||
{
|
||||
cbLanguages.ItemsSource = InternationalizationManager.Instance.LoadAvailableLanguages();
|
||||
cbLanguages.ItemsSource = InternationalizationManager.Internationalization.LoadAvailableLanguages();
|
||||
cbLanguages.DisplayMemberPath = "Display";
|
||||
cbLanguages.SelectedValuePath = "LanguageCode";
|
||||
cbLanguages.SelectedValue = UserSettingStorage.Instance.Language;
|
||||
cbLanguages.SelectionChanged += cbLanguages_SelectionChanged;
|
||||
}
|
||||
|
||||
void cbLanguages_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
string language = cbLanguages.SelectedValue.ToString();
|
||||
InternationalizationManager.Instance.ChangeLanguage(language);
|
||||
InternationalizationManager.Internationalization.ChangeLanguage(cbLanguages.SelectedItem as Language);
|
||||
}
|
||||
|
||||
private void EnableProxy()
|
||||
@@ -332,12 +323,12 @@ namespace Wox
|
||||
CustomPluginHotkey item = lvCustomHotkey.SelectedItem as CustomPluginHotkey;
|
||||
if (item == null)
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("pleaseSelectAnItem"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("pleaseSelectAnItem"));
|
||||
return;
|
||||
}
|
||||
|
||||
string deleteWarning = string.Format(InternationalizationManager.Instance.GetTranslation("deleteCustomHotkeyWarning"), item.Hotkey);
|
||||
if (MessageBox.Show(deleteWarning, InternationalizationManager.Instance.GetTranslation("delete"), MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||
string deleteWarning = string.Format(InternationalizationManager.Internationalization.GetTranslation("deleteCustomHotkeyWarning"), item.Hotkey);
|
||||
if (MessageBox.Show(deleteWarning, InternationalizationManager.Internationalization.GetTranslation("delete"), MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||
{
|
||||
UserSettingStorage.Instance.CustomPluginHotkeys.Remove(item);
|
||||
lvCustomHotkey.Items.Refresh();
|
||||
@@ -357,7 +348,7 @@ namespace Wox
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("pleaseSelectAnItem"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("pleaseSelectAnItem"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,7 +368,7 @@ namespace Wox
|
||||
private void ThemeComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
string themeName = themeComboBox.SelectedItem.ToString();
|
||||
ThemeManager.Instance.ChangeTheme(themeName);
|
||||
ThemeManager.Theme.ChangeTheme(themeName);
|
||||
UserSettingStorage.Instance.Theme = themeName;
|
||||
UserSettingStorage.Instance.Save();
|
||||
}
|
||||
@@ -390,7 +381,7 @@ namespace Wox
|
||||
this.cbQueryBoxFontFaces.SelectedItem = ((FontFamily)cbQueryBoxFont.SelectedItem).ChooseRegularFamilyTypeface();
|
||||
|
||||
UserSettingStorage.Instance.Save();
|
||||
ThemeManager.Instance.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
}
|
||||
|
||||
private void CbQueryBoxFontFaces_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -410,7 +401,7 @@ namespace Wox
|
||||
UserSettingStorage.Instance.QueryBoxFontWeight = typeface.Weight.ToString();
|
||||
UserSettingStorage.Instance.QueryBoxFontStyle = typeface.Style.ToString();
|
||||
UserSettingStorage.Instance.Save();
|
||||
ThemeManager.Instance.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -422,7 +413,7 @@ namespace Wox
|
||||
this.cbResultItemFontFaces.SelectedItem = ((FontFamily)cbResultItemFont.SelectedItem).ChooseRegularFamilyTypeface();
|
||||
|
||||
UserSettingStorage.Instance.Save();
|
||||
ThemeManager.Instance.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
}
|
||||
|
||||
private void CbResultItemFontFaces_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -440,7 +431,7 @@ namespace Wox
|
||||
UserSettingStorage.Instance.ResultItemFontWeight = typeface.Weight.ToString();
|
||||
UserSettingStorage.Instance.ResultItemFontStyle = typeface.Style.ToString();
|
||||
UserSettingStorage.Instance.Save();
|
||||
ThemeManager.Instance.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,7 +444,7 @@ namespace Wox
|
||||
else
|
||||
PreviewMainPanel.Opacity = 1;
|
||||
|
||||
ThemeManager.Instance.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
Dispatcher.DelayInvoke("delaySaveUserSetting", o =>
|
||||
{
|
||||
UserSettingStorage.Instance.Save();
|
||||
@@ -500,19 +491,6 @@ namespace Wox
|
||||
{
|
||||
//system plugin
|
||||
provider = lbPlugins.SelectedItem as ISettingProvider;
|
||||
var sys = lbPlugins.SelectedItem as BaseSystemPlugin;
|
||||
if (sys != null)
|
||||
{
|
||||
pluginTitle.Text = sys.Name;
|
||||
pluginId = sys.ID;
|
||||
pluginSubTitle.Text = sys.Description;
|
||||
pluginAuthor.Visibility = Visibility.Collapsed;
|
||||
pluginActionKeyword.Visibility = Visibility.Collapsed;
|
||||
tbOpenPluginDirecoty.Visibility = Visibility.Collapsed;
|
||||
pluginActionKeywordTitle.Visibility = Visibility.Collapsed;
|
||||
pluginTitle.Cursor = Cursors.Arrow;
|
||||
pluginIcon.Source = ImageLoader.ImageLoader.Load(sys.FullIcoPath);
|
||||
}
|
||||
}
|
||||
|
||||
var customizedPluginConfig = UserSettingStorage.Instance.CustomizedPluginConfigs.FirstOrDefault(o => o.ID == pluginId);
|
||||
@@ -549,16 +527,6 @@ namespace Wox
|
||||
id = pair.Metadata.ID;
|
||||
name = pair.Metadata.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
//system plugin
|
||||
var sys = lbPlugins.SelectedItem as BaseSystemPlugin;
|
||||
if (sys != null)
|
||||
{
|
||||
id = sys.ID;
|
||||
name = sys.Name;
|
||||
}
|
||||
}
|
||||
var customizedPluginConfig = UserSettingStorage.Instance.CustomizedPluginConfigs.FirstOrDefault(o => o.ID == id);
|
||||
if (customizedPluginConfig == null)
|
||||
{
|
||||
@@ -655,17 +623,17 @@ namespace Wox
|
||||
{
|
||||
if (string.IsNullOrEmpty(tbProxyServer.Text))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("serverCantBeEmpty"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("serverCantBeEmpty"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(tbProxyPort.Text))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("portCantBeEmpty"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("portCantBeEmpty"));
|
||||
return;
|
||||
}
|
||||
if (!int.TryParse(tbProxyPort.Text, out port))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("invalidPortFormat"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("invalidPortFormat"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -676,25 +644,25 @@ namespace Wox
|
||||
UserSettingStorage.Instance.ProxyPassword = tbProxyPassword.Password;
|
||||
UserSettingStorage.Instance.Save();
|
||||
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("saveProxySuccessfully"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("saveProxySuccessfully"));
|
||||
}
|
||||
|
||||
private void btnTestProxy_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(tbProxyServer.Text))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("serverCantBeEmpty"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("serverCantBeEmpty"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(tbProxyPort.Text))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("portCantBeEmpty"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("portCantBeEmpty"));
|
||||
return;
|
||||
}
|
||||
int port;
|
||||
if (!int.TryParse(tbProxyPort.Text, out port))
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("invalidPortFormat"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("invalidPortFormat"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -715,16 +683,16 @@ namespace Wox
|
||||
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
if (response.StatusCode == HttpStatusCode.OK)
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("proxyIsCorrect"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("proxyIsCorrect"));
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("proxyConnectFailed"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("proxyConnectFailed"));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("proxyConnectFailed"));
|
||||
MessageBox.Show(InternationalizationManager.Internationalization.GetTranslation("proxyConnectFailed"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,11 @@
|
||||
<Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Converters\ConvertorBase.cs" />
|
||||
<Compile Include="Converters\ImagePathConverter.cs" />
|
||||
<Compile Include="Converters\OpacityModeConverter.cs" />
|
||||
<Compile Include="Converters\StringEmptyConverter.cs" />
|
||||
<Compile Include="Converters\StringNullOrEmptyToVisibilityConverter.cs" />
|
||||
<Compile Include="Helper\WoxLogPathConverter.cs" />
|
||||
<Compile Include="ImageLoader\ImageCacheStroage.cs" />
|
||||
<Compile Include="Storage\UserSelectedRecordStorage.cs" />
|
||||
@@ -135,7 +140,6 @@
|
||||
<Compile Include="CommandArgs\PluginDebuggerCommandArg.cs" />
|
||||
<Compile Include="CommandArgs\QueryCommandArg.cs" />
|
||||
<Compile Include="CommandArgs\ReloadPluginCommandArg.cs" />
|
||||
<Compile Include="Converters\ConvertorBase.cs" />
|
||||
<Compile Include="Helper\DataWebRequestFactory.cs" />
|
||||
<Compile Include="Helper\ErrorReporting\ErrorReporting.cs" />
|
||||
<Compile Include="Helper\ErrorReporting\WPFErrorReportingDialog.xaml.cs">
|
||||
@@ -147,7 +151,6 @@
|
||||
<Compile Include="Helper\WallpaperPathRetrieval.cs" />
|
||||
<Compile Include="Helper\WindowIntelopHelper.cs" />
|
||||
<Compile Include="Helper\WindowOpener.cs" />
|
||||
<Compile Include="Converters\OpacityModeConverter.cs" />
|
||||
<Compile Include="CustomQueryHotkeySetting.xaml.cs">
|
||||
<DependentUpon>CustomQueryHotkeySetting.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -156,7 +159,6 @@
|
||||
<Compile Include="HotkeyControl.xaml.cs">
|
||||
<DependentUpon>HotkeyControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Converters\ImagePathConverter.cs" />
|
||||
<Compile Include="Msg.xaml.cs">
|
||||
<DependentUpon>Msg.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -167,8 +169,6 @@
|
||||
<Compile Include="SettingWindow.xaml.cs">
|
||||
<DependentUpon>SettingWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Converters\StringEmptyConverter.cs" />
|
||||
<Compile Include="Converters\StringNullOrEmptyToVisibilityConverter.cs" />
|
||||
<Page Include="ActionKeyword.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -185,16 +185,21 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<None Include="Languages\中文.xaml">
|
||||
<None Include="Languages\zh-cn.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Include="Languages\English.xaml">
|
||||
<Content Include="Languages\en.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Languages\zh-tw.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -286,10 +291,6 @@
|
||||
<Project>{4fd29318-a8ab-4d8f-aa47-60bc241b8da3}</Project>
|
||||
<Name>Wox.Infrastructure</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wox.Plugin.SystemPlugins\Wox.Plugin.SystemPlugins.csproj">
|
||||
<Project>{69ce0206-cb41-453d-88af-df86092ef9b8}</Project>
|
||||
<Name>Wox.Plugin.SystemPlugins</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wox.Plugin\Wox.Plugin.csproj">
|
||||
<Project>{8451ECDD-2EA4-4966-BB0A-7BBC40138E80}</Project>
|
||||
<Name>Wox.Plugin</Name>
|
||||
@@ -317,30 +318,6 @@
|
||||
<Resource Include="Images\app.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\close.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\cmd.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\exit.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\folder.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\lock.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\logoff.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\work.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\calculator.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="IWshRuntimeLibrary">
|
||||
@@ -363,27 +340,6 @@
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\websearch\google.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\websearch\wiki.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\color2.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\url.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\ControlPanel.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\file.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
@@ -393,15 +349,6 @@
|
||||
<Resource Include="Images\open.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\program.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\restart.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Images\web_search.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\app.ico" />
|
||||
|
||||