Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Commit

Permalink
Merge branch 'dev' into release_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jjw24 committed Mar 14, 2020
2 parents bfcf6f4 + 37149d9 commit 7877cb7
Show file tree
Hide file tree
Showing 31 changed files with 89 additions and 62 deletions.
6 changes: 3 additions & 3 deletions Plugins/HelloWorldCSharp/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
</configuration>
</configuration>
3 changes: 2 additions & 1 deletion Plugins/HelloWorldCSharp/HelloWorldCSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HelloWorldCSharp</RootNamespace>
<AssemblyName>HelloWorldCSharp</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.BrowserBookmark</RootNamespace>
<AssemblyName>Wox.Plugin.BrowserBookmark</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
Expand Down
14 changes: 7 additions & 7 deletions Plugins/Wox.Plugin.BrowserBookmark/app.config
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
<parameter value="mssqllocaldb"/>
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
</providers>
</entityFramework>

</configuration>
</configuration>
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.Calculator/Wox.Plugin.Calculator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.Caculator</RootNamespace>
<AssemblyName>Wox.Plugin.Caculator</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<TargetFrameworkProfile />
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.Color/Wox.Plugin.Color.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.Color</RootNamespace>
<AssemblyName>Wox.Plugin.Color</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.ControlPanel</RootNamespace>
<AssemblyName>Wox.Plugin.ControlPanel</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.Everything/Wox.Plugin.Everything.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.Everything</RootNamespace>
<AssemblyName>Wox.Plugin.Everything</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\Wox\</SolutionDir>
<TargetFrameworkProfile />
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.Folder/Wox.Plugin.Folder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.Folder</RootNamespace>
<AssemblyName>Wox.Plugin.Folder</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<TargetFrameworkProfile />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.PluginIndicator</RootNamespace>
<AssemblyName>Wox.Plugin.PluginIndicator</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.PluginManagement</RootNamespace>
<AssemblyName>Wox.Plugin.PluginManagement</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<TargetFrameworkProfile />
Expand Down
8 changes: 4 additions & 4 deletions Plugins/Wox.Plugin.Program/Wox.Plugin.Program.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.Program</RootNamespace>
<AssemblyName>Wox.Plugin.Program</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<TargetFrameworkProfile />
Expand Down Expand Up @@ -158,6 +158,9 @@
<PackageReference Include="JetBrains.Annotations">
<Version>10.3.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.Contracts">
<Version>10.0.18362.2005</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>9.0.1</Version>
</PackageReference>
Expand All @@ -167,9 +170,6 @@
<PackageReference Include="System.Runtime">
<Version>4.0.0</Version>
</PackageReference>
<PackageReference Include="UwpDesktop">
<Version>10.0.14393.3</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.Shell/Wox.Plugin.Shell.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.Shell</RootNamespace>
<AssemblyName>Wox.Plugin.Shell</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<TargetFrameworkProfile />
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.Sys/Wox.Plugin.Sys.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.Sys</RootNamespace>
<AssemblyName>Wox.Plugin.Sys</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<TargetFrameworkProfile />
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.Url/Wox.Plugin.Url.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.Url</RootNamespace>
<AssemblyName>Wox.Plugin.Url</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.WebSearch/Wox.Plugin.WebSearch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin.WebSearch</RootNamespace>
<AssemblyName>Wox.Plugin.WebSearch</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<TargetFrameworkProfile />
Expand Down
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,7 @@ Contribution
Build
-----

Install Visual Studio 2015/2017/2019

This project requires Windows 10 SDK:

VS 2015:
- Tick all Windows 10 sdk options

VS 2017/2019 and later:
- Last Windows 10 SDK which [supported](https://github.com/Wox-launcher/Wox/pull/1827#commitcomment-26475392) UwpDesktop is version 10.0.14393.795. It is needed to compile "Programs" Plugin (UWP.cs), you will see the "References" of Plugin.Programs as broken if you use a later SDK version.
- This SDK cannot be installed via VS 2019 installer.
- Download and install [Windows 10 SDK version 10.0.14393.795](https://go.microsoft.com/fwlink/p/?LinkId=838916).
Install Visual Studio 2017/2019

Documentation
-------------
Expand Down
16 changes: 16 additions & 0 deletions Wox.Core/Resource/Internationalization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,22 @@ public void ChangeLanguage(Language language)

}

public bool PromptShouldUsePinyin(string languageCodeToSet)
{
var languageToSet = GetLanguageByLanguageCode(languageCodeToSet);

if (Settings.ShouldUsePinyin)
return false;

if (languageToSet != AvailableLanguages.Chinese && languageToSet != AvailableLanguages.Chinese_TW)
return false;

if (MessageBox.Show("Do you want to turn on search with Pinyin?", string.Empty, MessageBoxButton.YesNo) == MessageBoxResult.No)
return false;

return true;
}

private void RemoveOldLanguageFiles()
{
var dicts = Application.Current.Resources.MergedDictionaries;
Expand Down
2 changes: 1 addition & 1 deletion Wox.Core/Wox.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Core</RootNamespace>
<AssemblyName>Wox.Core</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<TargetFrameworkProfile />
Expand Down
2 changes: 1 addition & 1 deletion Wox.Infrastructure/Alphabet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public bool ContainsChinese(string word)

if (word.Length > 40)
{
Log.Debug($"|Wox.Infrastructure.StringMatcher.ScoreForPinyin|skip too long string: {word}");
//Skip strings that are too long string for Pinyin conversion.
return false;
}

Expand Down
3 changes: 1 addition & 2 deletions Wox.Infrastructure/UserSettings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ public class Settings : BaseModel
/// <summary>
/// when false Alphabet static service will always return empty results
/// </summary>
public bool ShouldUsePinyin { get; set; } = true;

public bool ShouldUsePinyin { get; set; } = false;

internal StringMatcher.SearchPrecisionScore QuerySearchPrecision { get; private set; } = StringMatcher.SearchPrecisionScore.Regular;

Expand Down
2 changes: 1 addition & 1 deletion Wox.Infrastructure/Wox.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Infrastructure</RootNamespace>
<AssemblyName>Wox.Infrastructure</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<TargetFrameworkProfile />
Expand Down
2 changes: 1 addition & 1 deletion Wox.Plugin/Wox.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Plugin</RootNamespace>
<AssemblyName>Wox.Plugin</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
Expand Down
2 changes: 1 addition & 1 deletion Wox.Test/Wox.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Wox.Test</RootNamespace>
<AssemblyName>Wox.Test</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<TargetFrameworkProfile />
Expand Down
8 changes: 4 additions & 4 deletions Wox/App.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<configuration>
<!--https://msdn.microsoft.com/en-us/library/dd409252(v=vs.110).aspx-->
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Wox.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="Wox.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>
<runtime>
Expand All @@ -16,4 +16,4 @@
</setting>
</Wox.Properties.Settings>
</applicationSettings>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
2 changes: 1 addition & 1 deletion Wox/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Wox/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Wox/SettingWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<CheckBox Margin="10" IsChecked="{Binding Settings.AutoUpdates}">
<TextBlock Text="{DynamicResource autoUpdates}" />
</CheckBox>
<CheckBox Margin="10" IsChecked="{Binding Settings.ShouldUsePinyin}">
<CheckBox Margin="10" IsChecked="{Binding ShouldUsePinyin}">
<TextBlock Text="{DynamicResource ShouldUsePinyin}" />
</CheckBox>
<StackPanel Margin="10" Orientation="Horizontal">
Expand All @@ -72,8 +72,8 @@
</StackPanel>
<StackPanel Margin="10" Orientation="Horizontal">
<TextBlock Text="{DynamicResource language}" />
<ComboBox Margin="10 0 0 0" Width="120" SelectionChanged="OnLanguageChanged"
ItemsSource="{Binding Languages}" SelectedValue="{Binding Settings.Language}"
<ComboBox Margin="10 0 0 0" Width="120"
ItemsSource="{Binding Languages}" SelectedValue="{Binding Language}"
DisplayMemberPath="Display" SelectedValuePath="LanguageCode" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10">
Expand Down
6 changes: 0 additions & 6 deletions Wox/SettingWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ public SettingWindow(IPublicAPI api, SettingWindowViewModel viewModel)

#region General

void OnLanguageChanged(object sender, SelectionChangedEventArgs e)
{
var language = (Language)e.AddedItems[0];
InternationalizationManager.Instance.ChangeLanguage(language);
}

private void OnAutoStartupChecked(object sender, RoutedEventArgs e)
{
SetStartup();
Expand Down
29 changes: 28 additions & 1 deletion Wox/ViewModel/SettingWindowViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -77,6 +77,33 @@ public List<LastQueryMode> LastQueryModes
}
}

public string Language
{
get
{
return Settings.Language;
}
set
{
InternationalizationManager.Instance.ChangeLanguage(value);

if (InternationalizationManager.Instance.PromptShouldUsePinyin(value))
ShouldUsePinyin = true;
}
}

public bool ShouldUsePinyin
{
get
{
return Settings.ShouldUsePinyin;
}
set
{
Settings.ShouldUsePinyin = value;
}
}

public List<string> QuerySearchPrecisionStrings
{
get
Expand Down
Loading

0 comments on commit 7877cb7

Please sign in to comment.