mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Merge branch 'master' into dev
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -61,3 +61,5 @@
|
|||||||
#*.PDF diff=astextplain
|
#*.PDF diff=astextplain
|
||||||
#*.rtf diff=astextplain
|
#*.rtf diff=astextplain
|
||||||
#*.RTF diff=astextplain
|
#*.RTF diff=astextplain
|
||||||
|
|
||||||
|
PythonHome/* linguist-vendored
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -121,3 +121,4 @@ Wox/Wox.csproj
|
|||||||
|
|
||||||
*.sublime-*
|
*.sublime-*
|
||||||
*.dgml
|
*.dgml
|
||||||
|
migrateToAutomaticPackageRestore.ps1
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<solution>
|
|
||||||
<add key="disableSourceControlIntegration" value="true" />
|
|
||||||
</solution>
|
|
||||||
</configuration>
|
|
||||||
BIN
.nuget/NuGet.exe
BIN
.nuget/NuGet.exe
Binary file not shown.
@@ -1,136 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
|
|
||||||
|
|
||||||
<!-- Enable the restore command to run before builds -->
|
|
||||||
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
|
|
||||||
|
|
||||||
<!-- Property that enables building a package from a project -->
|
|
||||||
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
|
|
||||||
|
|
||||||
<!-- Determines if package restore consent is required to restore packages -->
|
|
||||||
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
|
|
||||||
|
|
||||||
<!-- Download NuGet.exe if it does not already exist -->
|
|
||||||
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(PackageSources)' == '' ">
|
|
||||||
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
|
|
||||||
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
|
|
||||||
<!--
|
|
||||||
<PackageSource Include="https://www.nuget.org/api/v2/" />
|
|
||||||
<PackageSource Include="https://my-nuget-source/nuget/" />
|
|
||||||
-->
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
|
|
||||||
<!-- Windows specific commands -->
|
|
||||||
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
|
|
||||||
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
|
|
||||||
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
|
|
||||||
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
|
|
||||||
<PackagesConfig>packages.config</PackagesConfig>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<!-- NuGet command -->
|
|
||||||
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
|
|
||||||
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
|
|
||||||
|
|
||||||
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
|
|
||||||
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
|
|
||||||
|
|
||||||
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
|
|
||||||
|
|
||||||
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
|
|
||||||
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
|
|
||||||
|
|
||||||
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
|
|
||||||
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
|
|
||||||
|
|
||||||
<!-- Commands -->
|
|
||||||
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
|
|
||||||
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
|
|
||||||
|
|
||||||
<!-- We need to ensure packages are restored prior to assembly resolve -->
|
|
||||||
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
|
|
||||||
RestorePackages;
|
|
||||||
$(BuildDependsOn);
|
|
||||||
</BuildDependsOn>
|
|
||||||
|
|
||||||
<!-- Make the build depend on restore packages -->
|
|
||||||
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
|
|
||||||
$(BuildDependsOn);
|
|
||||||
BuildPackage;
|
|
||||||
</BuildDependsOn>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Target Name="CheckPrerequisites">
|
|
||||||
<!-- Raise an error if we're unable to locate nuget.exe -->
|
|
||||||
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
|
|
||||||
<!--
|
|
||||||
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
|
|
||||||
This effectively acts as a lock that makes sure that the download operation will only happen once and all
|
|
||||||
parallel builds will have to wait for it to complete.
|
|
||||||
-->
|
|
||||||
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="_DownloadNuGet">
|
|
||||||
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
|
|
||||||
<Exec Command="$(RestoreCommand)"
|
|
||||||
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
|
|
||||||
|
|
||||||
<Exec Command="$(RestoreCommand)"
|
|
||||||
LogStandardErrorAsError="true"
|
|
||||||
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
|
|
||||||
<Exec Command="$(BuildCommand)"
|
|
||||||
Condition=" '$(OS)' != 'Windows_NT' " />
|
|
||||||
|
|
||||||
<Exec Command="$(BuildCommand)"
|
|
||||||
LogStandardErrorAsError="true"
|
|
||||||
Condition=" '$(OS)' == 'Windows_NT' " />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
|
|
||||||
<ParameterGroup>
|
|
||||||
<OutputFilename ParameterType="System.String" Required="true" />
|
|
||||||
</ParameterGroup>
|
|
||||||
<Task>
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Using Namespace="System" />
|
|
||||||
<Using Namespace="System.IO" />
|
|
||||||
<Using Namespace="System.Net" />
|
|
||||||
<Using Namespace="Microsoft.Build.Framework" />
|
|
||||||
<Using Namespace="Microsoft.Build.Utilities" />
|
|
||||||
<Code Type="Fragment" Language="cs">
|
|
||||||
<![CDATA[
|
|
||||||
try {
|
|
||||||
OutputFilename = Path.GetFullPath(OutputFilename);
|
|
||||||
|
|
||||||
Log.LogMessage("Downloading latest version of NuGet.exe...");
|
|
||||||
WebClient webClient = new WebClient();
|
|
||||||
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (Exception ex) {
|
|
||||||
Log.LogErrorFromException(ex);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
]]>
|
|
||||||
</Code>
|
|
||||||
</Task>
|
|
||||||
</UsingTask>
|
|
||||||
</Project>
|
|
||||||
@@ -1,13 +1,7 @@
|
|||||||
$root = (split-path -parent $MyInvocation.MyCommand.Definition) + '\..\..'
|
$path = $env:APPVEYOR_BUILD_FOLDER + "\Deploy\Nuget\wox.plugin.nuspec"
|
||||||
Write-Host $root
|
|
||||||
$version = [System.Reflection.Assembly]::LoadFile("$root\Output\Release\Wox.Plugin.dll").GetName().Version
|
|
||||||
$versionStr = "{0}.{1}.{2}.{3}" -f ($version.Major, $version.Minor, $version.Build, $version.Revision)
|
|
||||||
|
|
||||||
Write-Host "Setting .nuspec version tag to $versionStr"
|
$current_path = Convert-Path .
|
||||||
|
Write-Host "Current path: " + $current_path
|
||||||
|
Write-Host "Target path: " + $path
|
||||||
|
|
||||||
$content = (Get-Content $root\Deploy\NuGet\wox.plugin.nuspec)
|
& nuget pack $path -Version $env:APPVEYOR_BUILD_VERSION
|
||||||
$content = $content -replace '\$version\$',$versionStr
|
|
||||||
|
|
||||||
$content | Out-File $root\deploy\nuget\wox.plugin.nuspec
|
|
||||||
|
|
||||||
& $root\.nuget\NuGet.exe pack $root\deploy\nuget\wox.plugin.nuspec
|
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
cd /d %~dp0
|
|
||||||
%~dp0Wox.UpdateFeedGenerator.exe
|
|
||||||
9
Deploy/UpdateGenerator/build.ps1
Normal file
9
Deploy/UpdateGenerator/build.ps1
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
$path = $env:APPVEYOR_BUILD_FOLDER + "\Deploy\UpdateGenerator"
|
||||||
|
|
||||||
|
$current_path = Convert-Path .
|
||||||
|
Write-Host "Current path: " + $current_path
|
||||||
|
Write-Host "Target path: " + $path
|
||||||
|
|
||||||
|
Set-Location $path
|
||||||
|
& ".\Wox.UpdateFeedGenerator.exe"
|
||||||
|
Set-Location $current_path
|
||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2013 qianlifeng
|
Copyright (c) 2015 Wox
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using WindowsInput;
|
using WindowsInput;
|
||||||
using WindowsInput.Native;
|
using WindowsInput.Native;
|
||||||
using Wox.Infrastructure;
|
|
||||||
using Wox.Infrastructure.Hotkey;
|
using Wox.Infrastructure.Hotkey;
|
||||||
using Wox.Plugin.Features;
|
using Wox.Infrastructure.Logger;
|
||||||
using Control = System.Windows.Controls.Control;
|
using Control = System.Windows.Controls.Control;
|
||||||
|
|
||||||
namespace Wox.Plugin.CMD
|
namespace Wox.Plugin.CMD
|
||||||
@@ -24,14 +22,13 @@ namespace Wox.Plugin.CMD
|
|||||||
{
|
{
|
||||||
List<Result> results = new List<Result>();
|
List<Result> results = new List<Result>();
|
||||||
List<Result> pushedResults = new List<Result>();
|
List<Result> pushedResults = new List<Result>();
|
||||||
if (query.Search == ">")
|
string cmd = query.Search;
|
||||||
|
if (string.IsNullOrEmpty(cmd))
|
||||||
{
|
{
|
||||||
return GetAllHistoryCmds();
|
return GetAllHistoryCmds();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (query.Search.StartsWith(">") && query.Search.Length > 1)
|
|
||||||
{
|
{
|
||||||
string cmd = query.Search.Substring(1);
|
|
||||||
var queryCmd = GetCurrentCmd(cmd);
|
var queryCmd = GetCurrentCmd(cmd);
|
||||||
context.API.PushResults(query, context.CurrentPluginMetadata, new List<Result>() { queryCmd });
|
context.API.PushResults(query, context.CurrentPluginMetadata, new List<Result>() { queryCmd });
|
||||||
pushedResults.Add(queryCmd);
|
pushedResults.Add(queryCmd);
|
||||||
@@ -51,7 +48,7 @@ namespace Wox.Plugin.CMD
|
|||||||
basedir = excmd;
|
basedir = excmd;
|
||||||
dir = cmd;
|
dir = cmd;
|
||||||
}
|
}
|
||||||
else if (Directory.Exists(Path.GetDirectoryName(excmd)))
|
else if (Directory.Exists(Path.GetDirectoryName(excmd) ?? string.Empty))
|
||||||
{
|
{
|
||||||
basedir = Path.GetDirectoryName(excmd);
|
basedir = Path.GetDirectoryName(excmd);
|
||||||
var dirn = Path.GetDirectoryName(cmd);
|
var dirn = Path.GetDirectoryName(cmd);
|
||||||
@@ -74,10 +71,12 @@ namespace Wox.Plugin.CMD
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Log.Error(e);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
}
|
}
|
||||||
return results;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Result> GetHistoryCmds(string cmd, Result result)
|
private List<Result> GetHistoryCmds(string cmd, Result result)
|
||||||
@@ -201,11 +200,7 @@ namespace Wox.Plugin.CMD
|
|||||||
return context.API.GetTranslation("wox_plugin_cmd_plugin_description");
|
return context.API.GetTranslation("wox_plugin_cmd_plugin_description");
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsInstantQuery(string query)
|
public bool IsInstantQuery(string query) => false;
|
||||||
{
|
|
||||||
if (query.StartsWith(">")) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsExclusiveQuery(Query query)
|
public bool IsExclusiveQuery(Query query)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Wox.Infrastructure.Storage;
|
using Wox.Infrastructure.Storage;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace Wox.Plugin.CMD
|
namespace Wox.Plugin.CMD
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
@@ -44,7 +43,6 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@@ -105,13 +103,6 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
@@ -119,4 +110,5 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"ID":"D409510CD0D2481F853690A07E6DC426",
|
"ID":"D409510CD0D2481F853690A07E6DC426",
|
||||||
"ActionKeyword":"*",
|
"ActionKeyword":">",
|
||||||
"Name":"Shell",
|
"Name":"Shell",
|
||||||
"Description":"Provide executing commands from Wox. Commands should start with >",
|
"Description":"Provide executing commands from Wox. Commands should start with >",
|
||||||
"Author":"qianlifeng",
|
"Author":"qianlifeng",
|
||||||
|
|||||||
@@ -1,116 +1,100 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProjectGuid>{59BD9891-3837-438A-958D-ADC7F91F6F7E}</ProjectGuid>
|
<ProjectGuid>{59BD9891-3837-438A-958D-ADC7F91F6F7E}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Wox.Plugin.Caculator</RootNamespace>
|
<RootNamespace>Wox.Plugin.Caculator</RootNamespace>
|
||||||
<AssemblyName>Wox.Plugin.Caculator</AssemblyName>
|
<AssemblyName>Wox.Plugin.Caculator</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
<TargetFrameworkProfile />
|
||||||
<TargetFrameworkProfile />
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugType>full</DebugType>
|
||||||
<DebugType>full</DebugType>
|
<Optimize>false</Optimize>
|
||||||
<Optimize>false</Optimize>
|
<OutputPath>..\..\Output\Debug\Plugins\Wox.Plugin.Caculator\</OutputPath>
|
||||||
<OutputPath>..\..\Output\Debug\Plugins\Wox.Plugin.Caculator\</OutputPath>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<WarningLevel>4</WarningLevel>
|
||||||
<WarningLevel>4</WarningLevel>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<DebugType>pdbonly</DebugType>
|
||||||
<DebugType>pdbonly</DebugType>
|
<Optimize>true</Optimize>
|
||||||
<Optimize>true</Optimize>
|
<OutputPath>..\..\Output\Release\Plugins\Wox.Plugin.Caculator\</OutputPath>
|
||||||
<OutputPath>..\..\Output\Release\Plugins\Wox.Plugin.Caculator\</OutputPath>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<WarningLevel>4</WarningLevel>
|
||||||
<WarningLevel>4</WarningLevel>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
<ItemGroup>
|
||||||
<ItemGroup>
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationFramework" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="YAMP, Version=1.4.0.22422, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<Reference Include="System.Xml.Linq" />
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<HintPath>..\..\packages\YAMP.1.4.0\lib\net35\YAMP.dll</HintPath>
|
||||||
<Reference Include="System.Data" />
|
</Reference>
|
||||||
<Reference Include="System.Xml" />
|
</ItemGroup>
|
||||||
<Reference Include="YAMP, Version=1.4.0.22422, Culture=neutral, processorArchitecture=MSIL">
|
<ItemGroup>
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<Compile Include="Calculator.cs" />
|
||||||
<HintPath>..\..\packages\YAMP.1.4.0\lib\net35\YAMP.dll</HintPath>
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</Reference>
|
</ItemGroup>
|
||||||
</ItemGroup>
|
<ItemGroup>
|
||||||
<ItemGroup>
|
<None Include="packages.config" />
|
||||||
<Compile Include="Calculator.cs" />
|
<None Include="plugin.json">
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</ItemGroup>
|
</None>
|
||||||
<ItemGroup>
|
</ItemGroup>
|
||||||
<None Include="packages.config" />
|
<ItemGroup>
|
||||||
<None Include="plugin.json">
|
<ProjectReference Include="..\..\Wox.Plugin\Wox.Plugin.csproj">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<Project>{8451ecdd-2ea4-4966-bb0a-7bbc40138e80}</Project>
|
||||||
</None>
|
<Name>Wox.Plugin</Name>
|
||||||
</ItemGroup>
|
</ProjectReference>
|
||||||
<ItemGroup>
|
</ItemGroup>
|
||||||
<ProjectReference Include="..\..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
<ItemGroup>
|
||||||
<Project>{4fd29318-a8ab-4d8f-aa47-60bc241b8da3}</Project>
|
<None Include="Images\calculator.png">
|
||||||
<Name>Wox.Infrastructure</Name>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</ProjectReference>
|
</None>
|
||||||
<ProjectReference Include="..\..\Wox.Plugin\Wox.Plugin.csproj">
|
</ItemGroup>
|
||||||
<Project>{8451ecdd-2ea4-4966-bb0a-7bbc40138e80}</Project>
|
<ItemGroup>
|
||||||
<Name>Wox.Plugin</Name>
|
<Content Include="Languages\en.xaml">
|
||||||
</ProjectReference>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</ItemGroup>
|
<SubType>Designer</SubType>
|
||||||
<ItemGroup>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<None Include="Images\calculator.png">
|
</Content>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
</ItemGroup>
|
||||||
</None>
|
<ItemGroup>
|
||||||
</ItemGroup>
|
<None Include="Languages\zh-cn.xaml">
|
||||||
<ItemGroup>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<Content Include="Languages\en.xaml">
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<SubType>Designer</SubType>
|
</None>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
</ItemGroup>
|
||||||
</Content>
|
<ItemGroup>
|
||||||
</ItemGroup>
|
<None Include="Languages\zh-tw.xaml">
|
||||||
<ItemGroup>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<None Include="Languages\zh-cn.xaml">
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<SubType>Designer</SubType>
|
</None>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
</ItemGroup>
|
||||||
</None>
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</ItemGroup>
|
<PropertyGroup>
|
||||||
<ItemGroup>
|
<PostBuildEvent>
|
||||||
<None Include="Languages\zh-tw.xaml">
|
</PostBuildEvent>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
</PropertyGroup>
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<PropertyGroup>
|
|
||||||
<PostBuildEvent>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
@@ -34,14 +34,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Color.cs" />
|
<Compile Include="Color.cs" />
|
||||||
|
|||||||
@@ -33,14 +33,9 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ControlPanel.cs" />
|
<Compile Include="ControlPanel.cs" />
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Wox.Infrastructure.Storage;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Wox.Infrastructure.Storage;
|
||||||
|
|
||||||
namespace Wox.Plugin.Everything
|
namespace Wox.Plugin.Everything
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using Wox.Infrastructure;
|
using Wox.Infrastructure;
|
||||||
using System.Reflection;
|
|
||||||
using Wox.Plugin.Everything.Everything;
|
using Wox.Plugin.Everything.Everything;
|
||||||
using Wox.Plugin.Features;
|
|
||||||
|
|
||||||
namespace Wox.Plugin.Everything
|
namespace Wox.Plugin.Everything
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\Wox\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\Wox\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@@ -41,14 +40,9 @@
|
|||||||
<HintPath>..\..\packages\Newtonsoft.Json.6.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\packages\Newtonsoft.Json.6.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.ServiceProcess" />
|
<Reference Include="System.ServiceProcess" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Everything\Exceptions\CreateThreadException.cs" />
|
<Compile Include="Everything\Exceptions\CreateThreadException.cs" />
|
||||||
@@ -136,13 +130,6 @@
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
@@ -150,4 +137,5 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 2013
|
|
||||||
VisualStudioVersion = 12.0.21005.1
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.Everything", "Wox.Plugin.Everything.csproj", "{230AE83F-E92E-4E69-8355-426B305DA9C0}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{9BEA8C30-8CC3-48FE-87FD-8D7E65898C1A}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
.nuget\NuGet.Config = .nuget\NuGet.Config
|
|
||||||
.nuget\NuGet.exe = .nuget\NuGet.exe
|
|
||||||
.nuget\NuGet.targets = .nuget\NuGet.targets
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{230AE83F-E92E-4E69-8355-426B305DA9C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{230AE83F-E92E-4E69-8355-426B305DA9C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{230AE83F-E92E-4E69-8355-426B305DA9C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{230AE83F-E92E-4E69-8355-426B305DA9C0}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -5,7 +5,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using Control = System.Windows.Controls.Control;
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace Wox.Plugin.Folder
|
namespace Wox.Plugin.Folder
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Wox.Infrastructure.Storage;
|
using Wox.Infrastructure.Storage;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace Wox.Plugin.Folder
|
namespace Wox.Plugin.Folder
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
@@ -44,7 +43,6 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@@ -106,13 +104,6 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
@@ -120,4 +111,5 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Wox.Plugin.PluginIndicator
|
|||||||
List<Result> results = new List<Result>();
|
List<Result> results = new List<Result>();
|
||||||
if (allPlugins.Count == 0)
|
if (allPlugins.Count == 0)
|
||||||
{
|
{
|
||||||
allPlugins = context.API.GetAllPlugins().Where(o => !PluginManager.IsGenericPlugin(o.Metadata)).ToList();
|
allPlugins = context.API.GetAllPlugins().Where(o => !PluginManager.IsSystemPlugin(o.Metadata)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (PluginMetadata metadata in allPlugins.Select(o => o.Metadata))
|
foreach (PluginMetadata metadata in allPlugins.Select(o => o.Metadata))
|
||||||
|
|||||||
@@ -33,13 +33,7 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
|
|
||||||
namespace Wox.Plugin.PluginManagement
|
namespace Wox.Plugin.PluginManagement
|
||||||
{
|
{
|
||||||
public class HttpRequest
|
public class HttpRequest
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
@@ -39,14 +38,9 @@
|
|||||||
<HintPath>..\..\packages\Newtonsoft.Json.6.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\packages\Newtonsoft.Json.6.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="HttpRequest.cs" />
|
<Compile Include="HttpRequest.cs" />
|
||||||
@@ -97,13 +91,6 @@
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
@@ -111,4 +98,5 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,4 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace Wox.Plugin.Program
|
namespace Wox.Plugin.Program
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Wox.Infrastructure;
|
|
||||||
|
|
||||||
namespace Wox.Plugin.Program
|
namespace Wox.Plugin.Program
|
||||||
{
|
{
|
||||||
@@ -16,7 +15,7 @@ namespace Wox.Plugin.Program
|
|||||||
if (watchedPath.Contains(path)) return;
|
if (watchedPath.Contains(path)) return;
|
||||||
if (!Directory.Exists(path))
|
if (!Directory.Exists(path))
|
||||||
{
|
{
|
||||||
DebugHelper.WriteLine(string.Format("FileChangeWatcher: {0} doesn't exist", path));
|
Debug.WriteLine(string.Format("FileChangeWatcher: {0} doesn't exist", path));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
<system:String x:Key="wox_plugin_program_suffixes">索引文件后缀</system:String>
|
<system:String x:Key="wox_plugin_program_suffixes">索引文件后缀</system:String>
|
||||||
<system:String x:Key="wox_plugin_program_reindex">重新索引</system:String>
|
<system:String x:Key="wox_plugin_program_reindex">重新索引</system:String>
|
||||||
<system:String x:Key="wox_plugin_program_indexing">索引中</system:String>
|
<system:String x:Key="wox_plugin_program_indexing">索引中</system:String>
|
||||||
<system:String x:Key="wox_plugin_program_index_start">指数开始菜单</system:String>
|
<system:String x:Key="wox_plugin_program_index_start">索引开始菜单</system:String>
|
||||||
<system:String x:Key="wox_plugin_program_index_registry">指数注册</system:String>
|
<system:String x:Key="wox_plugin_program_index_registry">索引注册表</system:String>
|
||||||
<system:String x:Key="wox_plugin_program_suffixes_header">后缀</system:String>
|
<system:String x:Key="wox_plugin_program_suffixes_header">后缀</system:String>
|
||||||
<system:String x:Key="wox_plugin_program_max_depth_header">最大深度</system:String>
|
<system:String x:Key="wox_plugin_program_max_depth_header">最大深度</system:String>
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Wox.Infrastructure.Logger;
|
||||||
|
|
||||||
namespace Wox.Plugin.Program.ProgramSources
|
namespace Wox.Plugin.Program.ProgramSources
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
[global::System.ComponentModel.Browsable(false)]
|
[System.ComponentModel.Browsable(false)]
|
||||||
public class AppPathsProgramSource: AbstractProgramSource
|
public class AppPathsProgramSource : AbstractProgramSource
|
||||||
{
|
{
|
||||||
public AppPathsProgramSource()
|
public AppPathsProgramSource()
|
||||||
{
|
{
|
||||||
this.BonusPoints = -10;
|
BonusPoints = -10;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AppPathsProgramSource(ProgramSource source)
|
public AppPathsProgramSource(ProgramSource source) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
this.BonusPoints = source.BonusPoints;
|
BonusPoints = source.BonusPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<Program> LoadPrograms()
|
public override List<Program> LoadPrograms()
|
||||||
@@ -33,17 +33,31 @@ namespace Wox.Plugin.Program.ProgramSources
|
|||||||
if (root == null) return;
|
if (root == null) return;
|
||||||
foreach (var item in root.GetSubKeyNames())
|
foreach (var item in root.GetSubKeyNames())
|
||||||
{
|
{
|
||||||
using (var key = root.OpenSubKey(item))
|
try
|
||||||
{
|
{
|
||||||
object path = key.GetValue("");
|
using (var key = root.OpenSubKey(item))
|
||||||
if (path is string && global::System.IO.File.Exists((string)path))
|
|
||||||
{
|
{
|
||||||
var entry = CreateEntry((string)path);
|
string path = key.GetValue("") as string;
|
||||||
|
if (path == null) continue;
|
||||||
|
|
||||||
|
// fix path like this ""\"C:\\folder\\executable.exe\"""
|
||||||
|
const int begin = 0;
|
||||||
|
int end = path.Length - 1;
|
||||||
|
const char quotationMark = '"';
|
||||||
|
if (path[begin] == quotationMark && path[end] == quotationMark)
|
||||||
|
{
|
||||||
|
path = path.Substring(begin + 1, path.Length - 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!System.IO.File.Exists(path)) continue;
|
||||||
|
var entry = CreateEntry(path);
|
||||||
entry.ExecuteName = item;
|
entry.ExecuteName = item;
|
||||||
list.Add(entry);
|
list.Add(entry);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
key.Close();
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Log.Error(e.StackTrace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Log = Wox.Infrastructure.Logger.Log;
|
using Wox.Infrastructure.Logger;
|
||||||
|
|
||||||
namespace Wox.Plugin.Program.ProgramSources
|
namespace Wox.Plugin.Program.ProgramSources
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
using System.ComponentModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Wox.Infrastructure.Storage;
|
using Wox.Infrastructure.Storage;
|
||||||
using System.ComponentModel;
|
|
||||||
|
|
||||||
namespace Wox.Plugin.Program
|
namespace Wox.Plugin.Program
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,12 +4,10 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using IWshRuntimeLibrary;
|
||||||
using Wox.Infrastructure;
|
using Wox.Infrastructure;
|
||||||
using Wox.Plugin.Program.ProgramSources;
|
using Wox.Plugin.Program.ProgramSources;
|
||||||
using IWshRuntimeLibrary;
|
|
||||||
using Wox.Plugin.Features;
|
|
||||||
|
|
||||||
namespace Wox.Plugin.Program
|
namespace Wox.Plugin.Program
|
||||||
{
|
{
|
||||||
@@ -76,7 +74,7 @@ namespace Wox.Plugin.Program
|
|||||||
{
|
{
|
||||||
programs = ProgramCacheStorage.Instance.Programs;
|
programs = ProgramCacheStorage.Instance.Programs;
|
||||||
}
|
}
|
||||||
DebugHelper.WriteLine(string.Format("Preload {0} programs from cache", programs.Count));
|
Debug.WriteLine(string.Format("Preload {0} programs from cache", programs.Count));
|
||||||
using (new Timeit("Program Index"))
|
using (new Timeit("Program Index"))
|
||||||
{
|
{
|
||||||
IndexPrograms();
|
IndexPrograms();
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
@@ -139,13 +138,6 @@
|
|||||||
</COMReference>
|
</COMReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
@@ -153,4 +145,5 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@@ -75,13 +74,6 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
@@ -89,4 +81,5 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|||||||
BIN
Plugins/Wox.Plugin.Sys/Images/sleep.png
Normal file
BIN
Plugins/Wox.Plugin.Sys/Images/sleep.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -11,6 +11,7 @@
|
|||||||
<system:String x:Key="wox_plugin_sys_exit">Close Wox</system:String>
|
<system:String x:Key="wox_plugin_sys_exit">Close Wox</system:String>
|
||||||
<system:String x:Key="wox_plugin_sys_restart">Restart Wox</system:String>
|
<system:String x:Key="wox_plugin_sys_restart">Restart Wox</system:String>
|
||||||
<system:String x:Key="wox_plugin_sys_setting">Tweak this app</system:String>
|
<system:String x:Key="wox_plugin_sys_setting">Tweak this app</system:String>
|
||||||
|
<system:String x:Key="wox_plugin_sys_sleep">Put computer to sleep</system:String>
|
||||||
|
|
||||||
<system:String x:Key="wox_plugin_sys_plugin_name">System Commands</system:String>
|
<system:String x:Key="wox_plugin_sys_plugin_name">System Commands</system:String>
|
||||||
<system:String x:Key="wox_plugin_sys_plugin_description">Provide System related commands. e.g. shutdown,lock,setting etc.</system:String>
|
<system:String x:Key="wox_plugin_sys_plugin_description">Provide System related commands. e.g. shutdown,lock,setting etc.</system:String>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<system:String x:Key="wox_plugin_sys_exit">退出Wox</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_restart">重启Wox</system:String>
|
||||||
<system:String x:Key="wox_plugin_sys_setting">设置</system:String>
|
<system:String x:Key="wox_plugin_sys_setting">设置</system:String>
|
||||||
|
<system:String x:Key="wox_plugin_sys_sleep">休眠这台电脑</system:String>
|
||||||
|
|
||||||
<system:String x:Key="wox_plugin_sys_plugin_name">系统命令</system:String>
|
<system:String x:Key="wox_plugin_sys_plugin_name">系统命令</system:String>
|
||||||
<system:String x:Key="wox_plugin_sys_plugin_description">系统系统相关的命令。例如,关机,锁定,设置等</system:String>
|
<system:String x:Key="wox_plugin_sys_plugin_description">系统系统相关的命令。例如,关机,锁定,设置等</system:String>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<system:String x:Key="wox_plugin_sys_exit">退出Wox</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_restart">重啟Wox</system:String>
|
||||||
<system:String x:Key="wox_plugin_sys_setting">設置</system:String>
|
<system:String x:Key="wox_plugin_sys_setting">設置</system:String>
|
||||||
|
<system:String x:Key="wox_plugin_sys_sleep">休眠这台电脑</system:String>
|
||||||
|
|
||||||
<system:String x:Key="wox_plugin_sys_plugin_name">系統命令</system:String>
|
<system:String x:Key="wox_plugin_sys_plugin_name">系統命令</system:String>
|
||||||
<system:String x:Key="wox_plugin_sys_plugin_description">系統系統相關的命令。例如,關機,鎖定,設置等</system:String>
|
<system:String x:Key="wox_plugin_sys_plugin_description">系統系統相關的命令。例如,關機,鎖定,設置等</system:String>
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ using System.Reflection;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Wox.Infrastructure;
|
using Wox.Infrastructure;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Control = System.Windows.Controls.Control;
|
using Control = System.Windows.Controls.Control;
|
||||||
|
|
||||||
namespace Wox.Plugin.Sys
|
namespace Wox.Plugin.Sys
|
||||||
@@ -95,7 +93,7 @@ namespace Wox.Plugin.Sys
|
|||||||
new Result
|
new Result
|
||||||
{
|
{
|
||||||
Title = "Sleep",
|
Title = "Sleep",
|
||||||
SubTitle = "Put computer to sleep",
|
SubTitle = context.API.GetTranslation("wox_plugin_sys_sleep"),
|
||||||
Score = 100,
|
Score = 100,
|
||||||
IcoPath = "Images\\sleep.png",
|
IcoPath = "Images\\sleep.png",
|
||||||
Action = (c) => Application.SetSuspendState(PowerState.Suspend, false, false)
|
Action = (c) => Application.SetSuspendState(PowerState.Suspend, false, false)
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
@@ -40,7 +39,6 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@@ -65,6 +63,9 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Content Include="Images\sleep.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="Languages\en.xaml">
|
<Content Include="Languages\en.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -121,13 +122,6 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
@@ -135,4 +129,5 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace Wox.Plugin.Url
|
namespace Wox.Plugin.Url
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,16 +33,8 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="PresentationCore" />
|
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="WindowsBase" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Plugin.WebSearch
|
namespace Wox.Plugin.WebSearch
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,9 +4,6 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Timers;
|
|
||||||
using System.Windows.Threading;
|
|
||||||
using Wox.Plugin.Features;
|
|
||||||
using Wox.Plugin.WebSearch.SuggestionSources;
|
using Wox.Plugin.WebSearch.SuggestionSources;
|
||||||
|
|
||||||
namespace Wox.Plugin.WebSearch
|
namespace Wox.Plugin.WebSearch
|
||||||
@@ -123,19 +120,16 @@ namespace Wox.Plugin.WebSearch
|
|||||||
return context.API.GetTranslation("wox_plugin_websearch_plugin_description");
|
return context.API.GetTranslation("wox_plugin_websearch_plugin_description");
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsInstantQuery(string query)
|
public bool IsInstantQuery(string query) => false;
|
||||||
|
|
||||||
|
public bool IsExclusiveQuery(Query query)
|
||||||
{
|
{
|
||||||
var strings = query.Split(' ');
|
var strings = query.RawQuery.Split(' ');
|
||||||
if (strings.Length > 1)
|
if (strings.Length > 1)
|
||||||
{
|
{
|
||||||
return WebSearchStorage.Instance.WebSearches.Exists(o => o.ActionWord == strings[0] && o.Enabled);
|
return WebSearchStorage.Instance.WebSearches.Exists(o => o.ActionWord == strings[0] && o.Enabled);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsExclusiveQuery(Query query)
|
|
||||||
{
|
|
||||||
return IsInstantQuery(query.RawQuery);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Wox.Infrastructure.Storage;
|
using Wox.Infrastructure.Storage;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
@@ -43,7 +42,6 @@
|
|||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@@ -130,13 +128,6 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
@@ -144,4 +135,5 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|||||||
37
README.md
37
README.md
@@ -1,11 +1,11 @@
|
|||||||
Wox [](https://ci.appveyor.com/project/qianlifeng/wox) <a href="https://chocolatey.org/packages/wox"><img src="https://img.shields.io/badge/chocolatey-wox-b4884f.svg?style=flat" style="height:auto; width: 100%"></a> [](https://www.bountysource.com/teams/wox?utm_source=Wox&utm_medium=shield&utm_campaign=raised) [](http://meiweihezi.com/dashang/dashang.php?id=ZGsyNDI=)
|
Wox [](https://ci.appveyor.com/project/qianlifeng/wox) <a href="https://chocolatey.org/packages/wox"><img src="https://img.shields.io/badge/chocolatey-wox-b4884f.svg?style=flat" style="height:auto; width: 100%"></a> [](https://www.bountysource.com/teams/wox?utm_source=Wox&utm_medium=shield&utm_campaign=raised)
|
||||||
=========
|
=========
|
||||||
[Wox](http://www.getwox.com) is a launcher for windows, which was inspired by [Alfred](http://www.alfredapp.com/) and [Launchy](http://www.launchy.net/). Wox provide an entry to search everything you want.
|
[Wox](http://www.getwox.com) is a launcher for windows, inspired by [Alfred](http://www.alfredapp.com/) and [Launchy](http://www.launchy.net/). Wox indexes your programs, your documents, project files, folders, and bookmarks. You can launch everything with just a few keystrokes!.
|
||||||
|
|
||||||
Features
|
Features
|
||||||
=========
|
=========
|
||||||
1. Search applications, files and browser bookmarks (via plugin)
|
1. Search for applications, folders, files and in the browser bookmarks (using a plugin)
|
||||||
2. Search web contents with shortcuts (e.g. search google with `g keyword` or `youtube keyword`)
|
2. Search the web using shortcuts (e.g. search google with `g keyword` or Youtube `youtube keyword`)
|
||||||
3. Themes support, get more themes from [http://www.getwox.com/theme/builder](http://www.getwox.com/theme/builder)
|
3. Themes support, get more themes from [http://www.getwox.com/theme/builder](http://www.getwox.com/theme/builder)
|
||||||
4. Plugin support, get more plugins from [http://www.getwox.com/plugin](http://www.getwox.com/plugin)
|
4. Plugin support, get more plugins from [http://www.getwox.com/plugin](http://www.getwox.com/plugin)
|
||||||
|
|
||||||
@@ -15,27 +15,38 @@ Screenshot
|
|||||||
<a href="https://github.com/qianlifeng/Wox/wiki/Screenshot">More screenshot</a>
|
<a href="https://github.com/qianlifeng/Wox/wiki/Screenshot">More screenshot</a>
|
||||||
<img src="http://ww3.sinaimg.cn/large/dce48faejw1eihx6ffo8eg20zk0m8hdt.gif" />
|
<img src="http://ww3.sinaimg.cn/large/dce48faejw1eihx6ffo8eg20zk0m8hdt.gif" />
|
||||||
|
|
||||||
Download
|
Installation
|
||||||
=========
|
=========
|
||||||
|
|
||||||
Download from [release page](https://github.com/qianlifeng/Wox/releases).
|
1. Download
|
||||||
|
1. Latest stable version: [release page](https://github.com/qianlifeng/Wox/releases).
|
||||||
|
2. Latest build: [history](https://ci.appveyor.com/project/qianlifeng/wox/history)
|
||||||
|
(top green build -> artifacts -> release-binary.zip).
|
||||||
|
2. Unzip it and put it into your user directory (`C:\Users\YOUUSERNAME` or `%userprofile%`)
|
||||||
|
3. Windows 10 user, please have a look at https://github.com/Wox-launcher/Wox/issues/279
|
||||||
|
|
||||||
|
|
||||||
|
Simple Usage
|
||||||
|
=========
|
||||||
|
- Launch: <kbd>Alt</kbd>+<kbd>Space</kbd>
|
||||||
|
- Install/Uninstall plugin: type `wpm install/uninstall`
|
||||||
|
- Remember type `restart` to restarat Wox after installation of a plugin
|
||||||
|
|
||||||
Contribute
|
Contribute
|
||||||
=========
|
=========
|
||||||
|
|
||||||
If you are a developer, feel free to send a pull request to **Dev** branch. We still have a lot functions and bugs need to do now. Just pick one from [issues page](https://github.com/qianlifeng/Wox/issues) that you think you can fix.
|
If you are a developer, feel free to send a pull request to the **Dev** branch. We still have a lot of features and bugs to resolve. Take a look at [issues page](https://github.com/qianlifeng/Wox/issues) if you want to contribute :)
|
||||||
|
|
||||||
If you are not a developer, you can also help Wox by contributing the [Wox doc](http://doc.getwox.com).
|
If you are not a developer, you can still contribute to the project. Install the beta version, test things and help us with new entries and corrections to the docs [Wox doc](http://doc.getwox.com). Feedback is always welcome!
|
||||||
|
|
||||||
|
Docs
|
||||||
|
|
||||||
Doc
|
|
||||||
=========
|
=========
|
||||||
|
|
||||||
If you have any questions about how to use Wox, please read [Wox Documentation](http://doc.getwox.com) first. Wox documentation is a good place for users to understand Wox.
|
Full documentation can be found here [Wox Documentation](http://doc.getwox.com). This is a good place to start if you are installing Wox for the first time. Feel free to contribute if you want to improve, correct or translate the documentation.
|
||||||
|
|
||||||
|
In the future, all of the documentation will be moved back to Github wiki.
|
||||||
|
|
||||||
Discussion
|
Discussion
|
||||||
=========
|
=========
|
||||||
|
|
||||||
We build a [Wox Fourms](http://discussion.getwox.com), so users can talk about everything about Wox there.
|
Do you have a question or an idea for a killer feature? Discuss things with our community at the [Wox Fourms](http://discussion.getwox.com).
|
||||||
|
|||||||
Binary file not shown.
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
namespace Wox.Core
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Core
|
|
||||||
{
|
{
|
||||||
public static class APIServer
|
public static class APIServer
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using Wox.Core.Plugin;
|
|
||||||
using Wox.Infrastructure.Logger;
|
|
||||||
using Wox.Plugin;
|
|
||||||
|
|
||||||
namespace Wox.Core
|
|
||||||
{
|
|
||||||
internal class AssemblyHelper
|
|
||||||
{
|
|
||||||
public static List<KeyValuePair<PluginPair, T>> LoadPluginInterfaces<T>() where T : class
|
|
||||||
{
|
|
||||||
List<KeyValuePair<PluginPair, T>> results = new List<KeyValuePair<PluginPair, T>>();
|
|
||||||
foreach (PluginPair pluginPair in PluginManager.AllPlugins)
|
|
||||||
{
|
|
||||||
//need to load types from AllPlugins
|
|
||||||
//PluginInitContext is only available in this instance
|
|
||||||
T type = pluginPair.Plugin as T;
|
|
||||||
if (type != null)
|
|
||||||
{
|
|
||||||
results.Add(new KeyValuePair<PluginPair, T>(pluginPair,type));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<T> LoadInterfacesFromAppDomain<T>() where T : class
|
|
||||||
{
|
|
||||||
var interfaceObjects = AppDomain.CurrentDomain.GetAssemblies()
|
|
||||||
.SelectMany(s => s.GetTypes())
|
|
||||||
.Where(p => p.IsClass && !p.IsAbstract && p.GetInterfaces().Contains(typeof(T)));
|
|
||||||
|
|
||||||
return interfaceObjects.Select(interfaceObject => (T) Activator.CreateInstance(interfaceObject)).ToList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
namespace Wox.Core.Exception
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Core.Exception
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represent exceptions that wox can't handle and MUST close running Wox.
|
/// Represent exceptions that wox can't handle and MUST close running Wox.
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
namespace Wox.Core.Exception
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Core.Exception
|
|
||||||
{
|
{
|
||||||
public class WoxI18nException:WoxException
|
public class WoxI18nException:WoxException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
namespace Wox.Core.Exception
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Core.Exception
|
|
||||||
{
|
{
|
||||||
public class WoxPluginException : WoxException
|
public class WoxPluginException : WoxException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Wox.Core.Exception;
|
||||||
using Wox.Infrastructure.Logger;
|
using Wox.Infrastructure.Logger;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
using Wox.Core.Exception;
|
|
||||||
|
|
||||||
namespace Wox.Core.Plugin
|
namespace Wox.Core.Plugin
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace Wox.Core.Plugin
|
|||||||
{
|
{
|
||||||
internal class JsonRPCPluginLoader<T> : IPluginLoader where T : JsonRPCPlugin, new()
|
internal class JsonRPCPluginLoader<T> : IPluginLoader where T : JsonRPCPlugin, new()
|
||||||
{
|
{
|
||||||
public virtual IEnumerable<PluginPair> LoadPlugin(List<PluginMetadata> pluginMetadatas)
|
public IEnumerable<PluginPair> LoadPlugin(List<PluginMetadata> pluginMetadatas)
|
||||||
{
|
{
|
||||||
T jsonRPCPlugin = new T();
|
T jsonRPCPlugin = new T();
|
||||||
List<PluginMetadata> jsonRPCPluginMetadatas = pluginMetadatas.Where(o => o.Language.ToUpper() == jsonRPCPlugin.SupportedLanguage.ToUpper()).ToList();
|
List<PluginMetadata> jsonRPCPluginMetadatas = pluginMetadatas.Where(o => o.Language.ToUpper() == jsonRPCPlugin.SupportedLanguage.ToUpper()).ToList();
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Wox.Core.Exception;
|
using Wox.Core.Exception;
|
||||||
using Wox.Core.UserSettings;
|
using Wox.Core.UserSettings;
|
||||||
@@ -30,11 +28,6 @@ namespace Wox.Core.Plugin
|
|||||||
ParsePluginConfigs(pluginDirectory);
|
ParsePluginConfigs(pluginDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PluginManager.DebuggerMode != null)
|
|
||||||
{
|
|
||||||
PluginMetadata metadata = GetPluginMetadata(PluginManager.DebuggerMode);
|
|
||||||
if (metadata != null) pluginMetadatas.Add(metadata);
|
|
||||||
}
|
|
||||||
return pluginMetadatas;
|
return pluginMetadatas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using ICSharpCode.SharpZipLib.Zip;
|
using ICSharpCode.SharpZipLib.Zip;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
using MessageBox = System.Windows.Forms.MessageBox;
|
|
||||||
|
|
||||||
namespace Wox.Core.Plugin
|
namespace Wox.Core.Plugin
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Windows.Documents;
|
||||||
using Wox.Core.Exception;
|
using Wox.Core.Exception;
|
||||||
using Wox.Core.i18n;
|
using Wox.Core.i18n;
|
||||||
using Wox.Core.UI;
|
using Wox.Core.UI;
|
||||||
using Wox.Core.UserSettings;
|
using Wox.Core.UserSettings;
|
||||||
using Wox.Infrastructure;
|
using Wox.Infrastructure;
|
||||||
using Wox.Infrastructure.Http;
|
|
||||||
using Wox.Infrastructure.Logger;
|
using Wox.Infrastructure.Logger;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
using Wox.Plugin.Features;
|
|
||||||
|
|
||||||
namespace Wox.Core.Plugin
|
namespace Wox.Core.Plugin
|
||||||
{
|
{
|
||||||
@@ -22,33 +20,37 @@ namespace Wox.Core.Plugin
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static class PluginManager
|
public static class PluginManager
|
||||||
{
|
{
|
||||||
public const string ActionKeywordWildcardSign = "*";
|
public const string DirectoryName = "Plugins";
|
||||||
private static List<PluginMetadata> pluginMetadatas;
|
private static List<PluginMetadata> pluginMetadatas;
|
||||||
private static List<KeyValuePair<PluginPair, IInstantQuery>> instantSearches;
|
private static IEnumerable<PluginPair> instantQueryPlugins;
|
||||||
private static List<KeyValuePair<PluginPair, IExclusiveQuery>> exclusiveSearchPlugins;
|
private static IEnumerable<PluginPair> exclusiveSearchPlugins;
|
||||||
private static List<KeyValuePair<PluginPair, IContextMenu>> contextMenuPlugins;
|
private static IEnumerable<PluginPair> contextMenuPlugins;
|
||||||
|
private static List<PluginPair> plugins;
|
||||||
public static String DebuggerMode { get; private set; }
|
|
||||||
public static IPublicAPI API { get; private set; }
|
|
||||||
|
|
||||||
private static List<PluginPair> plugins = new List<PluginPair>();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Directories that will hold Wox plugin directory
|
/// Directories that will hold Wox plugin directory
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static List<string> pluginDirectories = new List<string>();
|
private static List<string> pluginDirectories = new List<string>();
|
||||||
|
|
||||||
|
public static IEnumerable<PluginPair> AllPlugins
|
||||||
|
{
|
||||||
|
get { return plugins; }
|
||||||
|
private set { plugins = value.OrderBy(o => o.Metadata.Name).ToList(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IPublicAPI API { private set; get; }
|
||||||
|
|
||||||
|
public static string PluginDirectory
|
||||||
|
{
|
||||||
|
get { return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), DirectoryName); }
|
||||||
|
}
|
||||||
|
|
||||||
private static void SetupPluginDirectories()
|
private static void SetupPluginDirectories()
|
||||||
{
|
{
|
||||||
pluginDirectories.Add(PluginDirectory);
|
pluginDirectories.Add(PluginDirectory);
|
||||||
MakesurePluginDirectoriesExist();
|
MakesurePluginDirectoriesExist();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string PluginDirectory
|
|
||||||
{
|
|
||||||
get { return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Plugins"); }
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void MakesurePluginDirectoriesExist()
|
private static void MakesurePluginDirectoriesExist()
|
||||||
{
|
{
|
||||||
foreach (string pluginDirectory in pluginDirectories)
|
foreach (string pluginDirectory in pluginDirectories)
|
||||||
@@ -76,38 +78,38 @@ namespace Wox.Core.Plugin
|
|||||||
|
|
||||||
SetupPluginDirectories();
|
SetupPluginDirectories();
|
||||||
API = api;
|
API = api;
|
||||||
plugins.Clear();
|
|
||||||
|
|
||||||
pluginMetadatas = PluginConfig.Parse(pluginDirectories);
|
pluginMetadatas = PluginConfig.Parse(pluginDirectories);
|
||||||
plugins.AddRange(new CSharpPluginLoader().LoadPlugin(pluginMetadatas));
|
AllPlugins = (new CSharpPluginLoader().LoadPlugin(pluginMetadatas)).
|
||||||
plugins.AddRange(new JsonRPCPluginLoader<PythonPlugin>().LoadPlugin(pluginMetadatas));
|
Concat(new JsonRPCPluginLoader<PythonPlugin>().LoadPlugin(pluginMetadatas));
|
||||||
|
|
||||||
//load plugin i18n languages
|
//load plugin i18n languages
|
||||||
ResourceMerger.ApplyPluginLanguages();
|
ResourceMerger.ApplyPluginLanguages();
|
||||||
|
|
||||||
foreach (PluginPair pluginPair in plugins)
|
foreach (PluginPair pluginPair in AllPlugins)
|
||||||
{
|
{
|
||||||
PluginPair pair = pluginPair;
|
PluginPair pair = pluginPair;
|
||||||
ThreadPool.QueueUserWorkItem(o =>
|
ThreadPool.QueueUserWorkItem(o =>
|
||||||
{
|
{
|
||||||
Stopwatch sw = new Stopwatch();
|
using (var time = new Timeit($"Plugin init: {pair.Metadata.Name}"))
|
||||||
sw.Start();
|
|
||||||
pair.Plugin.Init(new PluginInitContext()
|
|
||||||
{
|
{
|
||||||
CurrentPluginMetadata = pair.Metadata,
|
pair.Plugin.Init(new PluginInitContext
|
||||||
Proxy = HttpProxy.Instance,
|
{
|
||||||
API = API
|
CurrentPluginMetadata = pair.Metadata,
|
||||||
});
|
Proxy = HttpProxy.Instance,
|
||||||
sw.Stop();
|
API = API
|
||||||
DebugHelper.WriteLine(string.Format("Plugin init:{0} - {1}", pair.Metadata.Name, sw.ElapsedMilliseconds));
|
});
|
||||||
pair.InitTime = sw.ElapsedMilliseconds;
|
pair.InitTime = time.Current;
|
||||||
|
}
|
||||||
InternationalizationManager.Instance.UpdatePluginMetadataTranslations(pair);
|
InternationalizationManager.Instance.UpdatePluginMetadataTranslations(pair);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ThreadPool.QueueUserWorkItem(o =>
|
ThreadPool.QueueUserWorkItem(o =>
|
||||||
{
|
{
|
||||||
LoadInstantSearches();
|
instantQueryPlugins = GetPlugins<IInstantQuery>();
|
||||||
|
exclusiveSearchPlugins = GetPlugins<IExclusiveQuery>();
|
||||||
|
contextMenuPlugins = GetPlugins<IContextMenu>();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,97 +118,71 @@ namespace Wox.Core.Plugin
|
|||||||
PluginInstaller.Install(path);
|
PluginInstaller.Install(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Query(Query query)
|
public static Query QueryInit(string text) //todo is that possible to move it into type Query?
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(query.RawQuery.Trim()))
|
// replace multiple white spaces with one white space
|
||||||
|
var terms = text.Split(new[] { Query.Seperater }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
var rawQuery = string.Join(Query.Seperater, terms.ToArray());
|
||||||
|
var actionKeyword = string.Empty;
|
||||||
|
var search = rawQuery;
|
||||||
|
IEnumerable<string> actionParameters = terms;
|
||||||
|
if (terms.Length == 0) return null;
|
||||||
|
if (IsVailldActionKeyword(terms[0]))
|
||||||
{
|
{
|
||||||
query.Search = IsActionKeywordQuery(query) ? query.RawQuery.Substring(query.RawQuery.IndexOf(' ') + 1) : query.RawQuery;
|
actionKeyword = terms[0];
|
||||||
QueryDispatcher.QueryDispatcher.Dispatch(query);
|
|
||||||
}
|
}
|
||||||
}
|
if (!string.IsNullOrEmpty(actionKeyword))
|
||||||
|
|
||||||
public static List<PluginPair> AllPlugins
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
{
|
||||||
return plugins.OrderBy(o => o.Metadata.Name).ToList();
|
actionParameters = terms.Skip(1);
|
||||||
|
search = string.Join(Query.Seperater, actionParameters.ToArray());
|
||||||
}
|
}
|
||||||
}
|
return new Query
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Check if a query contains valid action keyword
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="query"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static bool IsActionKeywordQuery(Query query)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(query.RawQuery)) return false;
|
|
||||||
var strings = query.RawQuery.Split(' ');
|
|
||||||
if (strings.Length == 1) return false;
|
|
||||||
|
|
||||||
var actionKeyword = strings[0].Trim();
|
|
||||||
if (string.IsNullOrEmpty(actionKeyword)) return false;
|
|
||||||
|
|
||||||
PluginPair pair = plugins.FirstOrDefault(o => o.Metadata.ActionKeyword == actionKeyword);
|
|
||||||
if (pair != null)
|
|
||||||
{
|
{
|
||||||
var customizedPluginConfig = UserSettingStorage.Instance.CustomizedPluginConfigs.FirstOrDefault(o => o.ID == pair.Metadata.ID);
|
Terms = terms, RawQuery = rawQuery, ActionKeyword = actionKeyword, Search = search,
|
||||||
if (customizedPluginConfig != null && customizedPluginConfig.Disabled)
|
// Obsolete value initialisation
|
||||||
{
|
ActionName = actionKeyword, ActionParameters = actionParameters.ToList()
|
||||||
return false;
|
};
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsGenericPlugin(PluginMetadata metadata)
|
public static void QueryForAllPlugins(Query query)
|
||||||
{
|
{
|
||||||
return metadata.ActionKeyword == ActionKeywordWildcardSign;
|
var pluginPairs = GetNonSystemPlugin(query) != null ?
|
||||||
}
|
new List<PluginPair> { GetNonSystemPlugin(query) } : GetSystemPlugins();
|
||||||
|
foreach (var plugin in pluginPairs)
|
||||||
public static void ActivatePluginDebugger(string path)
|
|
||||||
{
|
|
||||||
DebuggerMode = path;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsInstantQuery(string query)
|
|
||||||
{
|
|
||||||
return LoadInstantSearches().Any(o => o.Value.IsInstantQuery(query));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsInstantSearchPlugin(PluginMetadata pluginMetadata)
|
|
||||||
{
|
|
||||||
//todo:to improve performance, any instant search plugin that takes long than 200ms will not consider a instant plugin anymore
|
|
||||||
return pluginMetadata.Language.ToUpper() == AllowedLanguage.CSharp &&
|
|
||||||
LoadInstantSearches().Any(o => o.Key.Metadata.ID == pluginMetadata.ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void ExecutePluginQuery(PluginPair pair, Query query)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
Stopwatch sw = new Stopwatch();
|
var customizedPluginConfig = UserSettingStorage.Instance.
|
||||||
sw.Start();
|
CustomizedPluginConfigs.FirstOrDefault(o => o.ID == plugin.Metadata.ID);
|
||||||
List<Result> results = pair.Plugin.Query(query) ?? new List<Result>();
|
if (customizedPluginConfig != null && customizedPluginConfig.Disabled) return;
|
||||||
results.ForEach(o =>
|
if (IsInstantQueryPlugin(plugin))
|
||||||
{
|
{
|
||||||
o.PluginID = pair.Metadata.ID;
|
using (new Timeit($"Plugin {plugin.Metadata.Name} is executing instant search"))
|
||||||
});
|
{
|
||||||
sw.Stop();
|
QueryForPlugin(plugin, query);
|
||||||
DebugHelper.WriteLine(string.Format("Plugin query: {0} - {1}", pair.Metadata.Name, sw.ElapsedMilliseconds));
|
}
|
||||||
pair.QueryCount += 1;
|
|
||||||
if (pair.QueryCount == 1)
|
|
||||||
{
|
|
||||||
pair.AvgQueryTime = sw.ElapsedMilliseconds;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pair.AvgQueryTime = (pair.AvgQueryTime + sw.ElapsedMilliseconds) / 2;
|
ThreadPool.QueueUserWorkItem(state =>
|
||||||
|
{
|
||||||
|
QueryForPlugin(plugin, query);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void QueryForPlugin(PluginPair pair, Query query)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (var time = new Timeit($"Query For {pair.Metadata.Name}"))
|
||||||
|
{
|
||||||
|
var results = pair.Plugin.Query(query) ?? new List<Result>();
|
||||||
|
results.ForEach(o => { o.PluginID = pair.Metadata.ID; });
|
||||||
|
var seconds = time.Current;
|
||||||
|
pair.QueryCount += 1;
|
||||||
|
pair.AvgQueryTime = pair.QueryCount == 1 ? seconds : (pair.AvgQueryTime + seconds) / 2;
|
||||||
|
API.PushResults(query, pair.Metadata, results);
|
||||||
}
|
}
|
||||||
API.PushResults(query, pair.Metadata, results);
|
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
@@ -214,13 +190,32 @@ namespace Wox.Core.Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<KeyValuePair<PluginPair, IInstantQuery>> LoadInstantSearches()
|
/// <summary>
|
||||||
|
/// Check if a query contains valid action keyword
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="actionKeyword"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static bool IsVailldActionKeyword(string actionKeyword)
|
||||||
{
|
{
|
||||||
if (instantSearches != null) return instantSearches;
|
if (string.IsNullOrEmpty(actionKeyword) || actionKeyword == Query.WildcardSign) return false;
|
||||||
|
PluginPair pair = AllPlugins.FirstOrDefault(o => o.Metadata.ActionKeyword == actionKeyword);
|
||||||
|
if (pair == null) return false;
|
||||||
|
var customizedPluginConfig = UserSettingStorage.Instance.
|
||||||
|
CustomizedPluginConfigs.FirstOrDefault(o => o.ID == pair.Metadata.ID);
|
||||||
|
return customizedPluginConfig == null || !customizedPluginConfig.Disabled;
|
||||||
|
}
|
||||||
|
|
||||||
instantSearches = AssemblyHelper.LoadPluginInterfaces<IInstantQuery>();
|
public static bool IsSystemPlugin(PluginMetadata metadata)
|
||||||
|
{
|
||||||
|
return metadata.ActionKeyword == Query.WildcardSign;
|
||||||
|
}
|
||||||
|
|
||||||
return instantSearches;
|
private static bool IsInstantQueryPlugin(PluginPair plugin)
|
||||||
|
{
|
||||||
|
//any plugin that takes more than 200ms for AvgQueryTime won't be treated as IInstantQuery plugin anymore.
|
||||||
|
return plugin.AvgQueryTime < 200 &&
|
||||||
|
plugin.Plugin is IInstantQuery &&
|
||||||
|
instantQueryPlugins.Any(p => p.Metadata.ID == plugin.Metadata.ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -233,63 +228,46 @@ namespace Wox.Core.Plugin
|
|||||||
return AllPlugins.FirstOrDefault(o => o.Metadata.ID == id);
|
return AllPlugins.FirstOrDefault(o => o.Metadata.ID == id);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static List<KeyValuePair<PluginPair, IExclusiveQuery>> LoadExclusiveSearchPlugins()
|
public static IEnumerable<PluginPair> GetPlugins<T>() where T : IFeatures
|
||||||
{
|
{
|
||||||
if (exclusiveSearchPlugins != null) return exclusiveSearchPlugins;
|
return AllPlugins.Where(p => p.Plugin is T);
|
||||||
exclusiveSearchPlugins = AssemblyHelper.LoadPluginInterfaces<IExclusiveQuery>();
|
|
||||||
return exclusiveSearchPlugins;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static PluginPair GetExclusivePlugin(Query query)
|
private static PluginPair GetExclusivePlugin(Query query)
|
||||||
{
|
{
|
||||||
KeyValuePair<PluginPair, IExclusiveQuery> plugin = LoadExclusiveSearchPlugins().FirstOrDefault(o => o.Value.IsExclusiveQuery((query)));
|
return exclusiveSearchPlugins.FirstOrDefault(p => ((IExclusiveQuery)p.Plugin).IsExclusiveQuery(query));
|
||||||
return plugin.Key;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static PluginPair GetActionKeywordPlugin(Query query)
|
private static PluginPair GetActionKeywordPlugin(Query query)
|
||||||
{
|
{
|
||||||
//if a query doesn't contain at least one space, it should not be a action keword plugin query
|
//if a query doesn't contain a vaild action keyword, it should not be a action keword plugin query
|
||||||
if (!query.RawQuery.Contains(" ")) return null;
|
if (string.IsNullOrEmpty(query.ActionKeyword)) return null;
|
||||||
|
return AllPlugins.FirstOrDefault(o => o.Metadata.ActionKeyword == query.ActionKeyword);
|
||||||
PluginPair actionKeywordPluginPair = AllPlugins.FirstOrDefault(o => o.Metadata.ActionKeyword == query.GetActionKeyword());
|
|
||||||
if (actionKeywordPluginPair != null)
|
|
||||||
{
|
|
||||||
var customizedPluginConfig = UserSettingStorage.Instance.
|
|
||||||
CustomizedPluginConfigs.FirstOrDefault(o => o.ID == actionKeywordPluginPair.Metadata.ID);
|
|
||||||
if (customizedPluginConfig != null && customizedPluginConfig.Disabled)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return actionKeywordPluginPair;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static bool IsExclusivePluginQuery(Query query)
|
private static PluginPair GetNonSystemPlugin(Query query)
|
||||||
{
|
{
|
||||||
return GetExclusivePlugin(query) != null || GetActionKeywordPlugin(query) != null;
|
return GetExclusivePlugin(query) ?? GetActionKeywordPlugin(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<PluginPair> GetSystemPlugins()
|
||||||
|
{
|
||||||
|
return AllPlugins.Where(o => IsSystemPlugin(o.Metadata)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Result> GetPluginContextMenus(Result result)
|
public static List<Result> GetPluginContextMenus(Result result)
|
||||||
{
|
{
|
||||||
List<Result> contextContextMenus = new List<Result>();
|
var pluginPair = contextMenuPlugins.FirstOrDefault(o => o.Metadata.ID == result.PluginID);
|
||||||
if (contextMenuPlugins == null)
|
var plugin = (IContextMenu)pluginPair?.Plugin;
|
||||||
{
|
if (plugin != null)
|
||||||
contextMenuPlugins = AssemblyHelper.LoadPluginInterfaces<IContextMenu>();
|
|
||||||
}
|
|
||||||
|
|
||||||
var contextMenuPlugin = contextMenuPlugins.FirstOrDefault(o => o.Key.Metadata.ID == result.PluginID);
|
|
||||||
if (contextMenuPlugin.Value != null)
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return contextMenuPlugin.Value.LoadContextMenus(result);
|
return plugin.LoadContextMenus(result);
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
Log.Error(string.Format("Couldn't load plugin context menus {0}: {1}", contextMenuPlugin.Key.Metadata.Name, e.Message));
|
Log.Error($"Couldn't load plugin context menus {pluginPair.Metadata.Name}: {e.Message}");
|
||||||
#if (DEBUG)
|
#if (DEBUG)
|
||||||
{
|
{
|
||||||
throw;
|
throw;
|
||||||
@@ -298,7 +276,7 @@ namespace Wox.Core.Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return contextContextMenus;
|
return new List<Result>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Wox.Core.UserSettings;
|
using Wox.Core.UserSettings;
|
||||||
using Wox.Infrastructure.Http;
|
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
|
|
||||||
namespace Wox.Core.Plugin
|
namespace Wox.Core.Plugin
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
|
||||||
using Wox.Infrastructure;
|
|
||||||
using Wox.Plugin;
|
|
||||||
|
|
||||||
namespace Wox.Core.Plugin.QueryDispatcher
|
|
||||||
{
|
|
||||||
public abstract class BaseQueryDispatcher : IQueryDispatcher
|
|
||||||
{
|
|
||||||
protected abstract List<PluginPair> GetPlugins(Query query);
|
|
||||||
|
|
||||||
public void Dispatch(Query query)
|
|
||||||
{
|
|
||||||
foreach (PluginPair pair in GetPlugins(query))
|
|
||||||
{
|
|
||||||
PluginPair localPair = pair;
|
|
||||||
if (query.IsIntantQuery && PluginManager.IsInstantSearchPlugin(pair.Metadata))
|
|
||||||
{
|
|
||||||
DebugHelper.WriteLine(string.Format("Plugin {0} is executing instant search.", pair.Metadata.Name));
|
|
||||||
using (new Timeit(" => instant search took: "))
|
|
||||||
{
|
|
||||||
PluginManager.ExecutePluginQuery(localPair, query);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ThreadPool.QueueUserWorkItem(state =>
|
|
||||||
{
|
|
||||||
PluginManager.ExecutePluginQuery(localPair, query);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
|
||||||
using Wox.Core.Exception;
|
|
||||||
using Wox.Core.UserSettings;
|
|
||||||
using Wox.Infrastructure.Logger;
|
|
||||||
using Wox.Plugin;
|
|
||||||
|
|
||||||
namespace Wox.Core.Plugin.QueryDispatcher
|
|
||||||
{
|
|
||||||
public class ExclusiveQueryDispatcher : BaseQueryDispatcher
|
|
||||||
{
|
|
||||||
protected override List<PluginPair> GetPlugins(Query query)
|
|
||||||
{
|
|
||||||
List<PluginPair> pluginPairs = new List<PluginPair>();
|
|
||||||
var exclusivePluginPair = PluginManager.GetExclusivePlugin(query) ??
|
|
||||||
PluginManager.GetActionKeywordPlugin(query);
|
|
||||||
if (exclusivePluginPair != null)
|
|
||||||
{
|
|
||||||
pluginPairs.Add(exclusivePluginPair);
|
|
||||||
}
|
|
||||||
|
|
||||||
return pluginPairs;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
|
||||||
using Wox.Core.Exception;
|
|
||||||
using Wox.Core.UserSettings;
|
|
||||||
using Wox.Infrastructure.Logger;
|
|
||||||
using Wox.Plugin;
|
|
||||||
|
|
||||||
namespace Wox.Core.Plugin.QueryDispatcher
|
|
||||||
{
|
|
||||||
public class GenericQueryDispatcher : BaseQueryDispatcher
|
|
||||||
{
|
|
||||||
protected override List<PluginPair> GetPlugins(Query query)
|
|
||||||
{
|
|
||||||
return PluginManager.AllPlugins.Where(o => PluginManager.IsGenericPlugin(o.Metadata)).ToList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
namespace Wox.Core.Plugin.QueryDispatcher
|
|
||||||
{
|
|
||||||
internal interface IQueryDispatcher
|
|
||||||
{
|
|
||||||
void Dispatch(Wox.Plugin.Query query);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
|
|
||||||
using System.Threading;
|
|
||||||
using Wox.Plugin;
|
|
||||||
|
|
||||||
namespace Wox.Core.Plugin.QueryDispatcher
|
|
||||||
{
|
|
||||||
internal static class QueryDispatcher
|
|
||||||
{
|
|
||||||
private static readonly IQueryDispatcher exclusivePluginDispatcher = new ExclusiveQueryDispatcher();
|
|
||||||
private static readonly IQueryDispatcher genericQueryDispatcher = new GenericQueryDispatcher();
|
|
||||||
|
|
||||||
public static void Dispatch(Query query)
|
|
||||||
{
|
|
||||||
if (PluginManager.IsExclusivePluginQuery(query))
|
|
||||||
{
|
|
||||||
exclusivePluginDispatcher.Dispatch(query);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
genericQueryDispatcher.Dispatch(query);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTitle("Wox.Core")]
|
[assembly: AssemblyTitle("Wox.Core")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("Oracle Corporation")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("Wox.Core")]
|
[assembly: AssemblyProduct("Wox.Core")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Oracle Corporation 2014")]
|
[assembly: AssemblyCopyright("The MIT License (MIT)")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Core.Theme
|
namespace Wox.Core.Theme
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,11 +14,12 @@ namespace Wox.Core.Theme
|
|||||||
{
|
{
|
||||||
public class Theme : IUIResource,ITheme
|
public class Theme : IUIResource,ITheme
|
||||||
{
|
{
|
||||||
|
public const string DirectoryName = "Themes";
|
||||||
private static List<string> themeDirectories = new List<string>();
|
private static List<string> themeDirectories = new List<string>();
|
||||||
|
|
||||||
static Theme()
|
static Theme()
|
||||||
{
|
{
|
||||||
themeDirectories.Add(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Themes"));
|
themeDirectories.Add(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), DirectoryName));
|
||||||
MakesureThemeDirectoriesExist();
|
MakesureThemeDirectoriesExist();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ namespace Wox.Core.Theme
|
|||||||
UserSettingStorage.Instance.Theme = themeName;
|
UserSettingStorage.Instance.Theme = themeName;
|
||||||
UserSettingStorage.Instance.Save();
|
UserSettingStorage.Instance.Save();
|
||||||
|
|
||||||
ResourceMerger.ApplyResources();
|
ResourceMerger.ApplyThemeResource(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResourceDictionary GetResourceDictionary()
|
public ResourceDictionary GetResourceDictionary()
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
namespace Wox.Core.Theme
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Core.Theme
|
|
||||||
{
|
{
|
||||||
public class ThemeManager
|
public class ThemeManager
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
using Wox.Core.i18n;
|
|
||||||
|
|
||||||
namespace Wox.Core.UI
|
namespace Wox.Core.UI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,48 +1,53 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using Wox.Core.i18n;
|
using Wox.Core.i18n;
|
||||||
using Wox.Core.Plugin;
|
using Wox.Core.Plugin;
|
||||||
using Wox.Core.Theme;
|
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
|
|
||||||
namespace Wox.Core.UI
|
namespace Wox.Core.UI
|
||||||
{
|
{
|
||||||
public class ResourceMerger
|
public static class ResourceMerger
|
||||||
{
|
{
|
||||||
internal static void ApplyResources()
|
private static void RemoveResource(string resourceDirectoryName)
|
||||||
{
|
{
|
||||||
Application.Current.Resources.MergedDictionaries.Clear();
|
var mergedDictionaries = Application.Current.Resources.MergedDictionaries;
|
||||||
ApplyPluginLanguages();
|
foreach (var resource in mergedDictionaries)
|
||||||
ApplyThemeAndLanguageResources();
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void ApplyThemeAndLanguageResources()
|
|
||||||
{
|
|
||||||
var UIResources = AssemblyHelper.LoadInterfacesFromAppDomain<IUIResource>();
|
|
||||||
foreach (var uiResource in UIResources)
|
|
||||||
{
|
{
|
||||||
Application.Current.Resources.MergedDictionaries.Add(uiResource.GetResourceDictionary());
|
int directoryPosition = resource.Source.Segments.Length - 2;
|
||||||
}
|
string currentDirectoryName = resource.Source.Segments[directoryPosition];
|
||||||
}
|
if (currentDirectoryName == resourceDirectoryName)
|
||||||
|
|
||||||
internal static void ApplyPluginLanguages()
|
|
||||||
{
|
|
||||||
var pluginI18ns = AssemblyHelper.LoadInterfacesFromAppDomain<IPluginI18n>();
|
|
||||||
foreach (var pluginI18n in pluginI18ns)
|
|
||||||
{
|
|
||||||
string languageFile = InternationalizationManager.Instance.GetLanguageFile(pluginI18n.GetLanguagesFolder());
|
|
||||||
if (!string.IsNullOrEmpty(languageFile))
|
|
||||||
{
|
{
|
||||||
Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary
|
mergedDictionaries.Remove(resource);
|
||||||
{
|
break;
|
||||||
Source = new Uri(languageFile, UriKind.Absolute)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void ApplyThemeResource(Theme.Theme t)
|
||||||
|
{
|
||||||
|
RemoveResource(Theme.Theme.DirectoryName);
|
||||||
|
Application.Current.Resources.MergedDictionaries.Add(t.GetResourceDictionary());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ApplyLanguageResources(Internationalization i)
|
||||||
|
{
|
||||||
|
RemoveResource(Internationalization.DirectoryName);
|
||||||
|
Application.Current.Resources.MergedDictionaries.Add(i.GetResourceDictionary());
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void ApplyPluginLanguages()
|
||||||
|
{
|
||||||
|
RemoveResource(PluginManager.DirectoryName);
|
||||||
|
foreach (var languageFile in PluginManager.GetPlugins<IPluginI18n>().
|
||||||
|
Select(plugin => InternationalizationManager.Instance.GetLanguageFile(((IPluginI18n)plugin.Plugin).GetLanguagesFolder())).
|
||||||
|
Where(file => !string.IsNullOrEmpty(file)))
|
||||||
|
{
|
||||||
|
Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary
|
||||||
|
{
|
||||||
|
Source = new Uri(languageFile, UriKind.Absolute)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Net;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Threading;
|
|
||||||
using NAppUpdate.Framework;
|
using NAppUpdate.Framework;
|
||||||
using NAppUpdate.Framework.Common;
|
using NAppUpdate.Framework.Common;
|
||||||
using NAppUpdate.Framework.Sources;
|
using NAppUpdate.Framework.Sources;
|
||||||
@@ -15,7 +12,6 @@ using Wox.Core.i18n;
|
|||||||
using Wox.Core.UserSettings;
|
using Wox.Core.UserSettings;
|
||||||
using Wox.Infrastructure.Http;
|
using Wox.Infrastructure.Http;
|
||||||
using Wox.Infrastructure.Logger;
|
using Wox.Infrastructure.Logger;
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace Wox.Core.Updater
|
namespace Wox.Core.Updater
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
|
||||||
using NAppUpdate.Framework.Common;
|
using NAppUpdate.Framework.Common;
|
||||||
using NAppUpdate.Framework.Sources;
|
using NAppUpdate.Framework.Sources;
|
||||||
using NAppUpdate.Framework.Utils;
|
using NAppUpdate.Framework.Utils;
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Reflection;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Wox.Infrastructure.Storage;
|
using Wox.Infrastructure.Storage;
|
||||||
using Wox.Plugin;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
namespace Wox.Core.UserSettings
|
namespace Wox.Core.UserSettings
|
||||||
{
|
{
|
||||||
@@ -86,6 +84,9 @@ namespace Wox.Core.UserSettings
|
|||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
public bool RememberLastLaunchLocation { get; set; }
|
public bool RememberLastLaunchLocation { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty]
|
||||||
|
public bool IgnoreHotkeysOnFullscreen { get; set; }
|
||||||
|
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
public string ProxyServer { get; set; }
|
public string ProxyServer { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
@@ -39,9 +38,9 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NAppUpdate.Framework, Version=0.1.0.0, Culture=neutral, PublicKeyToken=d1f1d1f19f9e5a56, processorArchitecture=MSIL">
|
<Reference Include="NAppUpdate.Framework, Version=0.3.2.0, Culture=neutral, PublicKeyToken=d1f1d1f19f9e5a56, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\NAppUpdate.Framework.0.3.2.0\lib\net20\NAppUpdate.Framework.dll</HintPath>
|
||||||
<HintPath>..\References\NAppUpdate.Framework.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
@@ -53,10 +52,6 @@
|
|||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -69,8 +64,6 @@
|
|||||||
<Compile Include="Exception\WoxI18nException.cs" />
|
<Compile Include="Exception\WoxI18nException.cs" />
|
||||||
<Compile Include="Exception\WoxJsonRPCException.cs" />
|
<Compile Include="Exception\WoxJsonRPCException.cs" />
|
||||||
<Compile Include="Exception\WoxPluginException.cs" />
|
<Compile Include="Exception\WoxPluginException.cs" />
|
||||||
<Compile Include="AssemblyHelper.cs" />
|
|
||||||
<Compile Include="Plugin\QueryDispatcher\BaseQueryDispatcher.cs" />
|
|
||||||
<Compile Include="Updater\Release.cs" />
|
<Compile Include="Updater\Release.cs" />
|
||||||
<Compile Include="Updater\UpdaterManager.cs" />
|
<Compile Include="Updater\UpdaterManager.cs" />
|
||||||
<Compile Include="Updater\WoxUpdateSource.cs" />
|
<Compile Include="Updater\WoxUpdateSource.cs" />
|
||||||
@@ -85,10 +78,6 @@
|
|||||||
<Compile Include="UI\IUIResource.cs" />
|
<Compile Include="UI\IUIResource.cs" />
|
||||||
<Compile Include="UI\ResourceMerger.cs" />
|
<Compile Include="UI\ResourceMerger.cs" />
|
||||||
<Compile Include="Plugin\PluginInstaller.cs" />
|
<Compile Include="Plugin\PluginInstaller.cs" />
|
||||||
<Compile Include="Plugin\QueryDispatcher\IQueryDispatcher.cs" />
|
|
||||||
<Compile Include="Plugin\QueryDispatcher\QueryDispatcher.cs" />
|
|
||||||
<Compile Include="Plugin\QueryDispatcher\ExclusiveQueryDispatcher.cs" />
|
|
||||||
<Compile Include="Plugin\QueryDispatcher\GenericQueryDispatcher.cs" />
|
|
||||||
<Compile Include="Plugin\JsonRPCPlugin.cs" />
|
<Compile Include="Plugin\JsonRPCPlugin.cs" />
|
||||||
<Compile Include="Plugin\JsonRPCPluginLoader.cs" />
|
<Compile Include="Plugin\JsonRPCPluginLoader.cs" />
|
||||||
<Compile Include="Plugin\CSharpPluginLoader.cs" />
|
<Compile Include="Plugin\CSharpPluginLoader.cs" />
|
||||||
@@ -121,7 +110,6 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Core.i18n
|
namespace Wox.Core.i18n
|
||||||
{
|
{
|
||||||
@@ -10,6 +7,7 @@ namespace Wox.Core.i18n
|
|||||||
public static Language English = new Language("en", "English");
|
public static Language English = new Language("en", "English");
|
||||||
public static Language Chinese = new Language("zh-cn", "中文");
|
public static Language Chinese = new Language("zh-cn", "中文");
|
||||||
public static Language Chinese_TW = new Language("zh-tw", "中文(繁体)");
|
public static Language Chinese_TW = new Language("zh-tw", "中文(繁体)");
|
||||||
|
public static Language Russian = new Language("ru", "Русский");
|
||||||
|
|
||||||
public static List<Language> GetAvailableLanguages()
|
public static List<Language> GetAvailableLanguages()
|
||||||
{
|
{
|
||||||
@@ -17,7 +15,8 @@ namespace Wox.Core.i18n
|
|||||||
{
|
{
|
||||||
English,
|
English,
|
||||||
Chinese,
|
Chinese,
|
||||||
Chinese_TW
|
Chinese_TW,
|
||||||
|
Russian,
|
||||||
};
|
};
|
||||||
return languages;
|
return languages;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Core.i18n
|
namespace Wox.Core.i18n
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using Wox.Core.Exception;
|
using Wox.Core.Exception;
|
||||||
using Wox.Core.UI;
|
using Wox.Core.UI;
|
||||||
@@ -15,7 +14,8 @@ namespace Wox.Core.i18n
|
|||||||
{
|
{
|
||||||
public class Internationalization : IInternationalization, IUIResource
|
public class Internationalization : IInternationalization, IUIResource
|
||||||
{
|
{
|
||||||
private static string DefaultLanguageDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Languages");
|
public const string DirectoryName = "Languages";
|
||||||
|
private static readonly string DefaultDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), DirectoryName);
|
||||||
|
|
||||||
static Internationalization()
|
static Internationalization()
|
||||||
{
|
{
|
||||||
@@ -24,11 +24,11 @@ namespace Wox.Core.i18n
|
|||||||
|
|
||||||
private static void MakesureThemeDirectoriesExist()
|
private static void MakesureThemeDirectoriesExist()
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(DefaultLanguageDirectory))
|
if (!Directory.Exists(DefaultDirectory))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(DefaultLanguageDirectory);
|
Directory.CreateDirectory(DefaultDirectory);
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
@@ -70,15 +70,14 @@ namespace Wox.Core.i18n
|
|||||||
|
|
||||||
UserSettingStorage.Instance.Language = language.LanguageCode;
|
UserSettingStorage.Instance.Language = language.LanguageCode;
|
||||||
UserSettingStorage.Instance.Save();
|
UserSettingStorage.Instance.Save();
|
||||||
ResourceMerger.ApplyResources();
|
ResourceMerger.ApplyLanguageResources(this);
|
||||||
UpdateAllPluginMetadataTranslations();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResourceDictionary GetResourceDictionary()
|
public ResourceDictionary GetResourceDictionary()
|
||||||
{
|
{
|
||||||
return new ResourceDictionary
|
return new ResourceDictionary
|
||||||
{
|
{
|
||||||
Source = new Uri(GetLanguageFile(DefaultLanguageDirectory), UriKind.Absolute)
|
Source = new Uri(GetLanguageFile(DefaultDirectory), UriKind.Absolute)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,15 +111,6 @@ namespace Wox.Core.i18n
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
internal void UpdateAllPluginMetadataTranslations()
|
|
||||||
{
|
|
||||||
List<KeyValuePair<PluginPair, IPluginI18n>> plugins = AssemblyHelper.LoadPluginInterfaces<IPluginI18n>();
|
|
||||||
foreach (var plugin in plugins)
|
|
||||||
{
|
|
||||||
UpdatePluginMetadataTranslations(plugin.Key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void UpdatePluginMetadataTranslations(PluginPair pluginPair)
|
internal void UpdatePluginMetadataTranslations(PluginPair pluginPair)
|
||||||
{
|
{
|
||||||
var pluginI18n = pluginPair.Plugin as IPluginI18n;
|
var pluginI18n = pluginPair.Plugin as IPluginI18n;
|
||||||
@@ -143,7 +133,7 @@ namespace Wox.Core.i18n
|
|||||||
|
|
||||||
private string GetLanguagePath(Language language)
|
private string GetLanguagePath(Language language)
|
||||||
{
|
{
|
||||||
string path = Path.Combine(DefaultLanguageDirectory, language.LanguageCode + ".xaml");
|
string path = Path.Combine(DefaultDirectory, language.LanguageCode + ".xaml");
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
{
|
{
|
||||||
return path;
|
return path;
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
using System;
|
namespace Wox.Core.i18n
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Windows;
|
|
||||||
using Wox.Core.UI;
|
|
||||||
using Wox.Infrastructure.Logger;
|
|
||||||
|
|
||||||
namespace Wox.Core.i18n
|
|
||||||
{
|
{
|
||||||
public static class InternationalizationManager
|
public static class InternationalizationManager
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
namespace Wox.Core.i18n
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Core.i18n
|
|
||||||
{
|
{
|
||||||
public class Language
|
public class Language
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
|
<package id="NAppUpdate.Framework" version="0.3.2.0" targetFramework="net35" />
|
||||||
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net35" />
|
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net35" />
|
||||||
<package id="SharpZipLib" version="0.86.0" targetFramework="net35" />
|
<package id="SharpZipLib" version="0.86.0" targetFramework="net35" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.CrashReporter
|
namespace Wox.CrashReporter
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,26 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
using System.Windows.Documents;
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
using Exceptionless;
|
using Exceptionless;
|
||||||
using Wox.Core;
|
|
||||||
using Wox.Core.Exception;
|
|
||||||
using Wox.Core.i18n;
|
using Wox.Core.i18n;
|
||||||
using Wox.Core.UI;
|
|
||||||
using Wox.Core.Updater;
|
using Wox.Core.Updater;
|
||||||
using Wox.Core.UserSettings;
|
|
||||||
using Wox.Infrastructure.Http;
|
|
||||||
using Wox.Infrastructure.Logger;
|
|
||||||
|
|
||||||
namespace Wox.CrashReporter
|
namespace Wox.CrashReporter
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||||
<RestorePackages>true</RestorePackages>
|
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
@@ -38,14 +37,10 @@
|
|||||||
<Reference Include="Exceptionless">
|
<Reference Include="Exceptionless">
|
||||||
<HintPath>..\packages\Exceptionless.1.5.2121\lib\net35\Exceptionless.dll</HintPath>
|
<HintPath>..\packages\Exceptionless.1.5.2121\lib\net35\Exceptionless.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Exceptionless.Models">
|
|
||||||
<HintPath>..\packages\Exceptionless.1.5.2121\lib\net35\Exceptionless.Models.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Xaml" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@@ -70,14 +65,6 @@
|
|||||||
<Project>{B749F0DB-8E75-47DB-9E5E-265D16D0C0D2}</Project>
|
<Project>{B749F0DB-8E75-47DB-9E5E-265D16D0C0D2}</Project>
|
||||||
<Name>Wox.Core</Name>
|
<Name>Wox.Core</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
|
||||||
<Project>{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}</Project>
|
|
||||||
<Name>Wox.Infrastructure</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Wox.Plugin\Wox.Plugin.csproj">
|
|
||||||
<Project>{8451ECDD-2EA4-4966-BB0A-7BBC40138E80}</Project>
|
|
||||||
<Name>Wox.Plugin</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Images\crash_warning.png">
|
<Resource Include="Images\crash_warning.png">
|
||||||
@@ -101,13 +88,6 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
@@ -115,4 +95,5 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Infrastructure
|
|
||||||
{
|
|
||||||
public static class DebugHelper
|
|
||||||
{
|
|
||||||
public static void WriteLine(string msg)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
Debug.WriteLine(msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.Text;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
namespace Wox.Infrastructure
|
namespace Wox.Infrastructure
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
|
||||||
using NLog;
|
using NLog;
|
||||||
|
|
||||||
namespace Wox.Infrastructure.Logger
|
namespace Wox.Infrastructure.Logger
|
||||||
|
|||||||
@@ -18,6 +18,6 @@
|
|||||||
<target xsi:type="File" name="file" fileName="${basedir}/Logs/${shortdate}.log"/>
|
<target xsi:type="File" name="file" fileName="${basedir}/Logs/${shortdate}.log"/>
|
||||||
</targets>
|
</targets>
|
||||||
<rules>
|
<rules>
|
||||||
<logger name="*" minlevel="Warn" writeTo="file" />
|
<logger name="*" minlevel="Info" writeTo="file" />
|
||||||
</rules>
|
</rules>
|
||||||
</nlog>
|
</nlog>
|
||||||
@@ -126,6 +126,11 @@
|
|||||||
<xs:documentation>Ignore further rules if this one matches.</xs:documentation>
|
<xs:documentation>Ignore further rules if this one matches.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="enabled" type="xs:boolean" default="true">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Enable or disable logging rule. Disabled rules are ignored.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="NLogFilters">
|
<xs:complexType name="NLogFilters">
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
@@ -147,6 +152,15 @@
|
|||||||
<xs:enumeration value="Fatal" />
|
<xs:enumeration value="Fatal" />
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="LineEndingMode">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="Default" />
|
||||||
|
<xs:enumeration value="CRLF" />
|
||||||
|
<xs:enumeration value="CR" />
|
||||||
|
<xs:enumeration value="LF" />
|
||||||
|
<xs:enumeration value="None" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
<xs:simpleType name="NLogLevelList">
|
<xs:simpleType name="NLogLevelList">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:pattern value="(|Trace|Debug|Info|Warn|Error|Fatal)(,(Trace|Debug|Info|Warn|Error|Fatal))*" />
|
<xs:pattern value="(|Trace|Debug|Info|Warn|Error|Fatal)(,(Trace|Debug|Info|Warn|Error|Fatal))*" />
|
||||||
@@ -226,58 +240,6 @@
|
|||||||
<xs:minLength value="1" />
|
<xs:minLength value="1" />
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:complexType name="AspNetBufferingWrapper">
|
|
||||||
<xs:complexContent>
|
|
||||||
<xs:extension base="WrapperTargetBase">
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="bufferGrowLimit" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
|
||||||
<xs:element name="bufferSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
|
||||||
<xs:element name="growBufferAsNeeded" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
</xs:choice>
|
|
||||||
<xs:attribute name="name" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Name of the target.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="bufferGrowLimit" type="xs:integer">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Maximum number of log events that the buffer can keep.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="bufferSize" type="xs:integer">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Number of log events to be buffered.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="growBufferAsNeeded" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Indicates whether buffer should grow as needed.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:complexContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="AspNetTrace">
|
|
||||||
<xs:complexContent>
|
|
||||||
<xs:extension base="Target">
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
|
|
||||||
</xs:choice>
|
|
||||||
<xs:attribute name="name" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Name of the target.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="layout" type="SimpleLayoutAttribute">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Layout used to format log messages.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:complexContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="AspResponse">
|
<xs:complexType name="AspResponse">
|
||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="Target">
|
<xs:extension base="Target">
|
||||||
@@ -540,6 +502,7 @@
|
|||||||
<xs:element name="useDefaultRowHighlightingRules" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="useDefaultRowHighlightingRules" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="highlight-row" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.ConsoleRowHighlightingRule" />
|
<xs:element name="highlight-row" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.ConsoleRowHighlightingRule" />
|
||||||
<xs:element name="highlight-word" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.ConsoleWordHighlightingRule" />
|
<xs:element name="highlight-word" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.ConsoleWordHighlightingRule" />
|
||||||
|
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="errorStream" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="errorStream" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
<xs:attribute name="name" type="xs:string">
|
<xs:attribute name="name" type="xs:string">
|
||||||
@@ -567,6 +530,11 @@
|
|||||||
<xs:documentation>Indicates whether to use default row highlighting rules.</xs:documentation>
|
<xs:documentation>Indicates whether to use default row highlighting rules.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="encoding" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>The encoding for writing messages to the .</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
<xs:attribute name="errorStream" type="xs:boolean">
|
<xs:attribute name="errorStream" type="xs:boolean">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Indicates whether the error stream (stderr) should be used instead of the output stream (stdout).</xs:documentation>
|
<xs:documentation>Indicates whether the error stream (stderr) should be used instead of the output stream (stdout).</xs:documentation>
|
||||||
@@ -667,6 +635,7 @@
|
|||||||
<xs:element name="header" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="header" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="footer" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="footer" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="error" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="error" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
|
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
<xs:attribute name="name" type="xs:string">
|
<xs:attribute name="name" type="xs:string">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
@@ -693,6 +662,11 @@
|
|||||||
<xs:documentation>Indicates whether to send the log messages to the standard error instead of the standard output.</xs:documentation>
|
<xs:documentation>Indicates whether to send the log messages to the standard error instead of the standard output.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="encoding" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>The encoding for writing messages to the .</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
@@ -709,7 +683,6 @@
|
|||||||
<xs:element name="dbProvider" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="dbProvider" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="dbUserName" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="dbUserName" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="keepConnection" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="keepConnection" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="useTransactions" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
<xs:element name="installConnectionString" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="installConnectionString" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="install-command" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.DatabaseCommandInfo" />
|
<xs:element name="install-command" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.DatabaseCommandInfo" />
|
||||||
<xs:element name="uninstall-command" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.DatabaseCommandInfo" />
|
<xs:element name="uninstall-command" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.DatabaseCommandInfo" />
|
||||||
@@ -762,11 +735,6 @@
|
|||||||
<xs:documentation>Indicates whether to keep the database connection open between the log events.</xs:documentation>
|
<xs:documentation>Indicates whether to keep the database connection open between the log events.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="useTransactions" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Indicates whether to use database transactions. Some data providers require this.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="installConnectionString" type="SimpleLayoutAttribute">
|
<xs:attribute name="installConnectionString" type="SimpleLayoutAttribute">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used.</xs:documentation>
|
<xs:documentation>Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used.</xs:documentation>
|
||||||
@@ -855,7 +823,7 @@
|
|||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="DebugHelper">
|
<xs:complexType name="Debugger">
|
||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="Target">
|
<xs:extension base="Target">
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
@@ -917,7 +885,8 @@
|
|||||||
<xs:element name="eventId" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="eventId" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="log" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="log" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="machineName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="machineName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="source" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="source" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
|
<xs:element name="entryType" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
<xs:attribute name="name" type="xs:string">
|
<xs:attribute name="name" type="xs:string">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
@@ -949,11 +918,16 @@
|
|||||||
<xs:documentation>Name of the machine on which Event Log service is running.</xs:documentation>
|
<xs:documentation>Name of the machine on which Event Log service is running.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="source" type="xs:string">
|
<xs:attribute name="source" type="SimpleLayoutAttribute">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Value to be used as the event Source.</xs:documentation>
|
<xs:documentation>Value to be used as the event Source.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="entryType" type="SimpleLayoutAttribute">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Optional entrytype. When not set, or when not convertable to then determined by </xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
@@ -986,30 +960,32 @@
|
|||||||
<xs:element name="header" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="header" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="footer" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="footer" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="lineEnding" minOccurs="0" maxOccurs="1" type="NLog.Targets.LineEndingMode" />
|
<xs:element name="lineEnding" minOccurs="0" maxOccurs="1" type="LineEndingMode" />
|
||||||
|
<xs:element name="maxArchiveFiles" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||||
<xs:element name="archiveNumbering" minOccurs="0" maxOccurs="1" type="NLog.Targets.ArchiveNumberingMode" />
|
<xs:element name="archiveNumbering" minOccurs="0" maxOccurs="1" type="NLog.Targets.ArchiveNumberingMode" />
|
||||||
<xs:element name="archiveFileName" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="archiveFileName" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="archiveEvery" minOccurs="0" maxOccurs="1" type="NLog.Targets.FileArchivePeriod" />
|
<xs:element name="archiveEvery" minOccurs="0" maxOccurs="1" type="NLog.Targets.FileArchivePeriod" />
|
||||||
<xs:element name="archiveAboveSize" minOccurs="0" maxOccurs="1" type="xs:long" />
|
<xs:element name="archiveAboveSize" minOccurs="0" maxOccurs="1" type="xs:long" />
|
||||||
<xs:element name="maxArchiveFiles" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
<xs:element name="enableArchiveFileCompression" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="forceManaged" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="forceManaged" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="fileAttributes" minOccurs="0" maxOccurs="1" type="NLog.Targets.Win32FileAttributes" />
|
<xs:element name="fileAttributes" minOccurs="0" maxOccurs="1" type="NLog.Targets.Win32FileAttributes" />
|
||||||
<xs:element name="replaceFileContentsOnEachWrite" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="replaceFileContentsOnEachWrite" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="deleteOldFileOnStartup" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
<xs:element name="fileName" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="fileName" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="archiveDateFormat" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="archiveDateFormat" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="archiveOldFileOnStartup" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="archiveOldFileOnStartup" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="createDirs" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="createDirs" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
|
<xs:element name="deleteOldFileOnStartup" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="enableFileDelete" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="enableFileDelete" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="openFileCacheTimeout" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
<xs:element name="openFileCacheTimeout" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||||
<xs:element name="networkWrites" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="networkWrites" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
|
<xs:element name="maxLogFilenames" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||||
<xs:element name="keepFileOpen" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="keepFileOpen" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="concurrentWrites" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="concurrentWrites" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="concurrentWriteAttempts" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
<xs:element name="concurrentWriteAttempts" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||||
<xs:element name="concurrentWriteAttemptDelay" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
<xs:element name="concurrentWriteAttemptDelay" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||||
<xs:element name="bufferSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
|
||||||
<xs:element name="openFileCacheSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
|
||||||
<xs:element name="autoFlush" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="autoFlush" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
|
<xs:element name="openFileCacheSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||||
|
<xs:element name="bufferSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
<xs:attribute name="name" type="xs:string">
|
<xs:attribute name="name" type="xs:string">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
@@ -1036,11 +1012,16 @@
|
|||||||
<xs:documentation>File encoding.</xs:documentation>
|
<xs:documentation>File encoding.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="lineEnding" type="NLog.Targets.LineEndingMode">
|
<xs:attribute name="lineEnding" type="LineEndingMode">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Line ending mode.</xs:documentation>
|
<xs:documentation>Line ending mode.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="maxArchiveFiles" type="xs:integer">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Maximum number of archive files that should be kept.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
<xs:attribute name="archiveNumbering" type="NLog.Targets.ArchiveNumberingMode">
|
<xs:attribute name="archiveNumbering" type="NLog.Targets.ArchiveNumberingMode">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Way file archives are numbered.</xs:documentation>
|
<xs:documentation>Way file archives are numbered.</xs:documentation>
|
||||||
@@ -1058,17 +1039,17 @@
|
|||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="archiveAboveSize" type="xs:long">
|
<xs:attribute name="archiveAboveSize" type="xs:long">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Size in bytes above which log files will be automatically archived.</xs:documentation>
|
<xs:documentation>Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose: </xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="maxArchiveFiles" type="xs:integer">
|
<xs:attribute name="enableArchiveFileCompression" type="xs:boolean">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Maximum number of archive files that should be kept.</xs:documentation>
|
<xs:documentation>Indicates whether to compress archive files into the zip archive format.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="forceManaged" type="xs:boolean">
|
<xs:attribute name="forceManaged" type="xs:boolean">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Gets ors set a value indicating whether a managed file stream is forced, instead of used the native implementation.</xs:documentation>
|
<xs:documentation>Gets or set a value indicating whether a managed file stream is forced, instead of used the native implementation.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="fileAttributes" type="NLog.Targets.Win32FileAttributes">
|
<xs:attribute name="fileAttributes" type="NLog.Targets.Win32FileAttributes">
|
||||||
@@ -1081,11 +1062,6 @@
|
|||||||
<xs:documentation>Indicates whether to replace file contents on each write instead of appending log message at the end.</xs:documentation>
|
<xs:documentation>Indicates whether to replace file contents on each write instead of appending log message at the end.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="deleteOldFileOnStartup" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Indicates whether to delete old log file on startup.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="fileName" type="SimpleLayoutAttribute">
|
<xs:attribute name="fileName" type="SimpleLayoutAttribute">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Name of the file to write to.</xs:documentation>
|
<xs:documentation>Name of the file to write to.</xs:documentation>
|
||||||
@@ -1103,7 +1079,12 @@
|
|||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="createDirs" type="xs:boolean">
|
<xs:attribute name="createDirs" type="xs:boolean">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Indicates whether to create directories if they don't exist.</xs:documentation>
|
<xs:documentation>Indicates whether to create directories if they do not exist.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="deleteOldFileOnStartup" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Indicates whether to delete old log file on startup.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="enableFileDelete" type="xs:boolean">
|
<xs:attribute name="enableFileDelete" type="xs:boolean">
|
||||||
@@ -1121,6 +1102,11 @@
|
|||||||
<xs:documentation>Indicates whether concurrent writes to the log file by multiple processes on different network hosts.</xs:documentation>
|
<xs:documentation>Indicates whether concurrent writes to the log file by multiple processes on different network hosts.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="maxLogFilenames" type="xs:integer">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Maximum number of log filenames that should be stored as existing.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
<xs:attribute name="keepFileOpen" type="xs:boolean">
|
<xs:attribute name="keepFileOpen" type="xs:boolean">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Indicates whether to keep log file open instead of opening and closing it on each logging event.</xs:documentation>
|
<xs:documentation>Indicates whether to keep log file open instead of opening and closing it on each logging event.</xs:documentation>
|
||||||
@@ -1141,9 +1127,9 @@
|
|||||||
<xs:documentation>Delay in milliseconds to wait before attempting to write to the file again.</xs:documentation>
|
<xs:documentation>Delay in milliseconds to wait before attempting to write to the file again.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="bufferSize" type="xs:integer">
|
<xs:attribute name="autoFlush" type="xs:boolean">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Log file buffer size in bytes.</xs:documentation>
|
<xs:documentation>Indicates whether to automatically flush the file buffers after each log message.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="openFileCacheSize" type="xs:integer">
|
<xs:attribute name="openFileCacheSize" type="xs:integer">
|
||||||
@@ -1151,23 +1137,14 @@
|
|||||||
<xs:documentation>Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger).</xs:documentation>
|
<xs:documentation>Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger).</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="autoFlush" type="xs:boolean">
|
<xs:attribute name="bufferSize" type="xs:integer">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Indicates whether to automatically flush the file buffers after each log message.</xs:documentation>
|
<xs:documentation>Log file buffer size in bytes.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:simpleType name="NLog.Targets.LineEndingMode">
|
|
||||||
<xs:restriction base="xs:string">
|
|
||||||
<xs:enumeration value="Default" />
|
|
||||||
<xs:enumeration value="CRLF" />
|
|
||||||
<xs:enumeration value="CR" />
|
|
||||||
<xs:enumeration value="LF" />
|
|
||||||
<xs:enumeration value="None" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:simpleType name="NLog.Targets.ArchiveNumberingMode">
|
<xs:simpleType name="NLog.Targets.ArchiveNumberingMode">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:enumeration value="Sequence" />
|
<xs:enumeration value="Sequence" />
|
||||||
@@ -1226,50 +1203,6 @@
|
|||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="FormControl">
|
|
||||||
<xs:complexContent>
|
|
||||||
<xs:extension base="Target">
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
|
|
||||||
<xs:element name="append" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
<xs:element name="controlName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="formName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="reverseOrder" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
</xs:choice>
|
|
||||||
<xs:attribute name="name" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Name of the target.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="layout" type="SimpleLayoutAttribute">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Layout used to format log messages.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="append" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Indicates whether log text should be appended to the text of the control instead of overwriting it.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="controlName" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Name of control to which NLog will log write log text.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="formName" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Name of the Form on which the control is located.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="reverseOrder" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Whether new log entry are added to the start or the end of the control</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:complexContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="ImpersonatingWrapper">
|
<xs:complexType name="ImpersonatingWrapper">
|
||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="WrapperTargetBase">
|
<xs:extension base="WrapperTargetBase">
|
||||||
@@ -1356,6 +1289,7 @@
|
|||||||
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="endpointAddress" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="endpointAddress" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="endpointConfigurationName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="endpointConfigurationName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
|
<xs:element name="useOneWayContract" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="clientId" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="clientId" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="includeEventProperties" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="includeEventProperties" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.MethodCallParameter" />
|
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.MethodCallParameter" />
|
||||||
@@ -1376,6 +1310,11 @@
|
|||||||
<xs:documentation>Name of the endpoint configuration in WCF configuration file.</xs:documentation>
|
<xs:documentation>Name of the endpoint configuration in WCF configuration file.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="useOneWayContract" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Indicates whether to use a WCF service contract that is one way (fire and forget) or two way (request-reply)</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
<xs:attribute name="clientId" type="SimpleLayoutAttribute">
|
<xs:attribute name="clientId" type="SimpleLayoutAttribute">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Client ID.</xs:documentation>
|
<xs:documentation>Client ID.</xs:documentation>
|
||||||
@@ -1402,7 +1341,7 @@
|
|||||||
</xs:choice>
|
</xs:choice>
|
||||||
<xs:attribute name="layout" type="SimpleLayoutAttribute">
|
<xs:attribute name="layout" type="SimpleLayoutAttribute">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Layout that should be use to calcuate the value for the parameter.</xs:documentation>
|
<xs:documentation>Layout that should be use to calculate the value for the parameter.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="name" type="xs:string">
|
<xs:attribute name="name" type="xs:string">
|
||||||
@@ -1427,9 +1366,9 @@
|
|||||||
<xs:element name="html" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="html" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="addNewLines" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="addNewLines" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="bcc" minOccurs="0" maxOccurs="1" type="Layout" />
|
|
||||||
<xs:element name="to" minOccurs="0" maxOccurs="1" type="Layout" />
|
|
||||||
<xs:element name="cc" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="cc" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
|
<xs:element name="to" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
|
<xs:element name="bcc" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="body" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="body" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="subject" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="subject" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="from" minOccurs="0" maxOccurs="1" type="Layout" />
|
<xs:element name="from" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
@@ -1443,6 +1382,8 @@
|
|||||||
<xs:element name="enableSsl" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="enableSsl" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="smtpPort" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
<xs:element name="smtpPort" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||||
<xs:element name="useSystemNetMailSettings" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
<xs:element name="useSystemNetMailSettings" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
|
<xs:element name="pickupDirectoryLocation" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
|
<xs:element name="deliveryMethod" minOccurs="0" maxOccurs="1" type="System.Net.Mail.SmtpDeliveryMethod" />
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
<xs:attribute name="name" type="xs:string">
|
<xs:attribute name="name" type="xs:string">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
@@ -1479,9 +1420,9 @@
|
|||||||
<xs:documentation>Indicates whether to add new lines between log entries.</xs:documentation>
|
<xs:documentation>Indicates whether to add new lines between log entries.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="bcc" type="SimpleLayoutAttribute">
|
<xs:attribute name="cc" type="SimpleLayoutAttribute">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).</xs:documentation>
|
<xs:documentation>CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="to" type="SimpleLayoutAttribute">
|
<xs:attribute name="to" type="SimpleLayoutAttribute">
|
||||||
@@ -1489,9 +1430,9 @@
|
|||||||
<xs:documentation>Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).</xs:documentation>
|
<xs:documentation>Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="cc" type="SimpleLayoutAttribute">
|
<xs:attribute name="bcc" type="SimpleLayoutAttribute">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).</xs:documentation>
|
<xs:documentation>BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="body" type="SimpleLayoutAttribute">
|
<xs:attribute name="body" type="SimpleLayoutAttribute">
|
||||||
@@ -1559,6 +1500,16 @@
|
|||||||
<xs:documentation>Indicates whether the default Settings from System.Net.MailSettings should be used.</xs:documentation>
|
<xs:documentation>Indicates whether the default Settings from System.Net.MailSettings should be used.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="pickupDirectoryLocation" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Folder where applications save mail messages to be processed by the local SMTP server.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="deliveryMethod" type="System.Net.Mail.SmtpDeliveryMethod">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Specifies how outgoing email messages will be handled.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
@@ -1569,6 +1520,13 @@
|
|||||||
<xs:enumeration value="Ntlm" />
|
<xs:enumeration value="Ntlm" />
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
|
<xs:simpleType name="System.Net.Mail.SmtpDeliveryMethod">
|
||||||
|
<xs:restriction base="xs:string">
|
||||||
|
<xs:enumeration value="Network" />
|
||||||
|
<xs:enumeration value="SpecifiedPickupDirectory" />
|
||||||
|
<xs:enumeration value="PickupDirectoryFromIis" />
|
||||||
|
</xs:restriction>
|
||||||
|
</xs:simpleType>
|
||||||
<xs:complexType name="Memory">
|
<xs:complexType name="Memory">
|
||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="Target">
|
<xs:extension base="Target">
|
||||||
@@ -1589,32 +1547,6 @@
|
|||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="MessageBox">
|
|
||||||
<xs:complexContent>
|
|
||||||
<xs:extension base="Target">
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
|
|
||||||
<xs:element name="caption" minOccurs="0" maxOccurs="1" type="Layout" />
|
|
||||||
</xs:choice>
|
|
||||||
<xs:attribute name="name" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Name of the target.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="layout" type="SimpleLayoutAttribute">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Layout used to format log messages.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="caption" type="SimpleLayoutAttribute">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Message box title.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:complexContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="MSMQ">
|
<xs:complexType name="MSMQ">
|
||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="Target">
|
<xs:extension base="Target">
|
||||||
@@ -1939,6 +1871,7 @@
|
|||||||
<xs:element name="counterHelp" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="counterHelp" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="counterName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="counterName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="counterType" minOccurs="0" maxOccurs="1" type="System.Diagnostics.PerformanceCounterType" />
|
<xs:element name="counterType" minOccurs="0" maxOccurs="1" type="System.Diagnostics.PerformanceCounterType" />
|
||||||
|
<xs:element name="incrementValue" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
<xs:element name="instanceName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="instanceName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
<xs:attribute name="name" type="xs:string">
|
<xs:attribute name="name" type="xs:string">
|
||||||
@@ -1971,6 +1904,11 @@
|
|||||||
<xs:documentation>Performance counter type.</xs:documentation>
|
<xs:documentation>Performance counter type.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="incrementValue" type="SimpleLayoutAttribute">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>The value by which to increment the counter.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
<xs:attribute name="instanceName" type="xs:string">
|
<xs:attribute name="instanceName" type="xs:string">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Performance counter instance name.</xs:documentation>
|
<xs:documentation>Performance counter instance name.</xs:documentation>
|
||||||
@@ -2108,165 +2046,6 @@
|
|||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="RichTextBox">
|
|
||||||
<xs:complexContent>
|
|
||||||
<xs:extension base="Target">
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
|
|
||||||
<xs:element name="autoScroll" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
<xs:element name="controlName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="formName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="height" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
|
||||||
<xs:element name="maxLines" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
|
||||||
<xs:element name="showMinimized" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
<xs:element name="toolWindow" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
<xs:element name="width" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
|
||||||
<xs:element name="row-coloring" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.RichTextBoxRowColoringRule" />
|
|
||||||
<xs:element name="useDefaultRowColoringRules" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
<xs:element name="word-coloring" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.RichTextBoxWordColoringRule" />
|
|
||||||
</xs:choice>
|
|
||||||
<xs:attribute name="name" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Name of the target.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="layout" type="SimpleLayoutAttribute">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Layout used to format log messages.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="autoScroll" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Indicates whether scroll bar will be moved automatically to show most recent log entries.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="controlName" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Name of RichTextBox to which Nlog will write.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="formName" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Name of the Form on which the control is located. If there is no open form of a specified name than NLog will create a new one.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="height" type="xs:integer">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Initial height of the form with rich text box.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="maxLines" type="xs:integer">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Maximum number of lines the rich text box will store (or 0 to disable this feature).</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="showMinimized" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Indicates whether the created form will be initially minimized.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="toolWindow" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Indicates whether the created window will be a tool window.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="width" type="xs:integer">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Initial width of the form with rich text box.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="useDefaultRowColoringRules" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Indicates whether to use default coloring rules.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:complexContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="System.Drawing.FontStyle">
|
|
||||||
<xs:restriction base="xs:string">
|
|
||||||
<xs:enumeration value="Regular" />
|
|
||||||
<xs:enumeration value="Bold" />
|
|
||||||
<xs:enumeration value="Italic" />
|
|
||||||
<xs:enumeration value="Underline" />
|
|
||||||
<xs:enumeration value="Strikeout" />
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="NLog.Targets.RichTextBoxRowColoringRule">
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element name="condition" minOccurs="0" maxOccurs="1" type="Condition" />
|
|
||||||
<xs:element name="backgroundColor" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="fontColor" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="style" minOccurs="0" maxOccurs="1" type="System.Drawing.FontStyle" />
|
|
||||||
</xs:choice>
|
|
||||||
<xs:attribute name="condition" type="Condition">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Condition that must be met in order to set the specified font color.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="backgroundColor" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Background color.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="fontColor" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Font color.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="style" type="System.Drawing.FontStyle">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Font style of matched text.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="NLog.Targets.RichTextBoxWordColoringRule">
|
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
||||||
<xs:element name="ignoreCase" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
<xs:element name="regex" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="text" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="wholeWords" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
|
||||||
<xs:element name="backgroundColor" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="fontColor" minOccurs="0" maxOccurs="1" type="xs:string" />
|
|
||||||
<xs:element name="style" minOccurs="0" maxOccurs="1" type="System.Drawing.FontStyle" />
|
|
||||||
</xs:choice>
|
|
||||||
<xs:attribute name="ignoreCase" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Indicates whether to ignore case when comparing texts.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="regex" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Regular expression to be matched. You must specify either text or regex.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="text" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Text to be matched. You must specify either text or regex.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="wholeWords" type="xs:boolean">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Indicates whether to match whole words only.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="backgroundColor" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Background color. Names are identical with KnownColor enum extended with Empty value which means that background color won't be changed.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="fontColor" type="xs:string">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Font color. Names are identical with KnownColor enum extended with Empty value which means that font color won't be changed.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="style" type="System.Drawing.FontStyle">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Font style of matched text. Possible values are the same as in FontStyle enum in System.Drawing.</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:attribute>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="RoundRobinGroup">
|
<xs:complexType name="RoundRobinGroup">
|
||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="CompoundTargetBase">
|
<xs:extension base="CompoundTargetBase">
|
||||||
@@ -2320,6 +2099,7 @@
|
|||||||
<xs:extension base="Target">
|
<xs:extension base="Target">
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
|
<xs:element name="includeBOM" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.MethodCallParameter" />
|
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="NLog.Targets.MethodCallParameter" />
|
||||||
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
<xs:element name="methodName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
<xs:element name="methodName" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
@@ -2332,6 +2112,11 @@
|
|||||||
<xs:documentation>Name of the target.</xs:documentation>
|
<xs:documentation>Name of the target.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
<xs:attribute name="includeBOM" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
<xs:attribute name="encoding" type="xs:string">
|
<xs:attribute name="encoding" type="xs:string">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Encoding.</xs:documentation>
|
<xs:documentation>Encoding.</xs:documentation>
|
||||||
@@ -2339,12 +2124,12 @@
|
|||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="methodName" type="xs:string">
|
<xs:attribute name="methodName" type="xs:string">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Web service method name.</xs:documentation>
|
<xs:documentation>Web service method name. Only used with Soap.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="namespace" type="xs:string">
|
<xs:attribute name="namespace" type="xs:string">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Web service namespace.</xs:documentation>
|
<xs:documentation>Web service namespace. Only used with Soap.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="protocol" type="NLog.Targets.WebServiceProtocol">
|
<xs:attribute name="protocol" type="NLog.Targets.WebServiceProtocol">
|
||||||
@@ -2459,6 +2244,43 @@
|
|||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
<xs:complexType name="JsonLayout">
|
||||||
|
<xs:complexContent>
|
||||||
|
<xs:extension base="Layout">
|
||||||
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<xs:element name="attribute" minOccurs="0" maxOccurs="unbounded" type="NLog.Layouts.JsonAttribute" />
|
||||||
|
<xs:element name="suppressSpaces" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
|
</xs:choice>
|
||||||
|
<xs:attribute name="suppressSpaces" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Option to suppress the extra spaces in the output json</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:complexContent>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:complexType name="NLog.Layouts.JsonAttribute">
|
||||||
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
|
<xs:element name="encode" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||||
|
<xs:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||||
|
<xs:element name="name" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||||
|
</xs:choice>
|
||||||
|
<xs:attribute name="encode" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Determines wether or not this attribute will be Json encoded.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="layout" type="SimpleLayoutAttribute">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Layout that will be rendered as the attribute's value.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="name" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Name of the attribute.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
</xs:complexType>
|
||||||
<xs:complexType name="LayoutWithHeaderAndFooter">
|
<xs:complexType name="LayoutWithHeaderAndFooter">
|
||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="Layout">
|
<xs:extension base="Layout">
|
||||||
@@ -1,12 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices.ComTypes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace Wox.Infrastructure.Storage
|
namespace Wox.Infrastructure.Storage
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.Serialization.Formatters;
|
using System.Runtime.Serialization.Formatters;
|
||||||
using System.Runtime.Serialization.Formatters.Binary;
|
using System.Runtime.Serialization.Formatters.Binary;
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Wox.Infrastructure.Logger;
|
using Wox.Infrastructure.Logger;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
namespace Wox.Infrastructure.Storage
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Infrastructure.Storage
|
|
||||||
{
|
{
|
||||||
public interface IStorage
|
public interface IStorage
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
namespace Wox.Infrastructure
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Infrastructure
|
|
||||||
{
|
{
|
||||||
public class StringMatcher
|
public class StringMatcher
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,26 +1,38 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using Wox.Infrastructure.Logger;
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Infrastructure
|
namespace Wox.Infrastructure
|
||||||
{
|
{
|
||||||
public class Timeit : IDisposable
|
public class Timeit : IDisposable
|
||||||
{
|
{
|
||||||
private Stopwatch stopwatch = new Stopwatch();
|
private readonly Stopwatch _stopwatch = new Stopwatch();
|
||||||
private string name;
|
private readonly string _name;
|
||||||
|
|
||||||
public Timeit(string name)
|
public Timeit(string name)
|
||||||
{
|
{
|
||||||
this.name = name;
|
_name = name;
|
||||||
stopwatch.Start();
|
_stopwatch.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long Current
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
_stopwatch.Stop();
|
||||||
|
long seconds = _stopwatch.ElapsedMilliseconds;
|
||||||
|
_stopwatch.Start();
|
||||||
|
return seconds;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
stopwatch.Stop();
|
_stopwatch.Stop();
|
||||||
DebugHelper.WriteLine(name + ":" + stopwatch.ElapsedMilliseconds + "ms");
|
string info = _name + " : " + _stopwatch.ElapsedMilliseconds + "ms";
|
||||||
|
Debug.WriteLine(info);
|
||||||
|
Log.Info(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wox.Infrastructure
|
namespace Wox.Infrastructure
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace Wox.Infrastructure
|
namespace Wox.Infrastructure
|
||||||
{
|
{
|
||||||
@@ -146,7 +144,7 @@ namespace Wox.Infrastructure
|
|||||||
startInfo.WindowStyle = global::System.Diagnostics.ProcessWindowStyle.Normal;
|
startInfo.WindowStyle = global::System.Diagnostics.ProcessWindowStyle.Normal;
|
||||||
startInfo.ErrorDialog = (dwSeclFlags | ShellExecCmdLineFlags.SECL_NO_UI) == 0;
|
startInfo.ErrorDialog = (dwSeclFlags | ShellExecCmdLineFlags.SECL_NO_UI) == 0;
|
||||||
startInfo.ErrorDialogParentHandle = hwnd;
|
startInfo.ErrorDialogParentHandle = hwnd;
|
||||||
|
startInfo.WorkingDirectory = startDir;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
global::System.Diagnostics.Process.Start(startInfo);
|
global::System.Diagnostics.Process.Start(startInfo);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user