diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c4efe2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,261 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc \ No newline at end of file diff --git a/Images/icon.png b/Images/icon.png new file mode 100644 index 0000000..e01b784 Binary files /dev/null and b/Images/icon.png differ diff --git a/README.md b/README.md index 8a4541f..5690bd9 100644 --- a/README.md +++ b/README.md @@ -1 +1,27 @@ -# Wox.Plugin.CppRef \ No newline at end of file +# Wox.Plugin.CppRef + +一个快速查阅C/C++参考的插件 + +![](http://img01.sogoucdn.com/app/a/100520146/da9545cb6d2326307d73a3d0b48b1c68) + +![](http://img01.sogoucdn.com/app/a/100520146/48f2c1bb8e0804491db6a3c742c2a814) + +### 安装Wox + +[github链接](https://github.com/Wox-launcher/Wox) + + + +###安装CppRef + +#### 方法一: + +打开wox,输入命令 + +``` +wpm install CppRef +``` + +#### 方法二: + +到Release中下载主题包,解压到wox主题文件夹中并重启wox \ No newline at end of file diff --git a/Wox.Plugin.CppRef.sln b/Wox.Plugin.CppRef.sln new file mode 100644 index 0000000..599d694 --- /dev/null +++ b/Wox.Plugin.CppRef.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2046 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.CppRef", "Wox.Plugin.CppRef\Wox.Plugin.CppRef.csproj", "{9D4644A6-C5C6-4C47-8160-7BADB3046ECE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9D4644A6-C5C6-4C47-8160-7BADB3046ECE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D4644A6-C5C6-4C47-8160-7BADB3046ECE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D4644A6-C5C6-4C47-8160-7BADB3046ECE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D4644A6-C5C6-4C47-8160-7BADB3046ECE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E0B72A6E-4AF8-47FE-B32E-2E768E9BD9E1} + EndGlobalSection +EndGlobal diff --git a/Wox.Plugin.CppRef/Main.cs b/Wox.Plugin.CppRef/Main.cs new file mode 100644 index 0000000..3c9a8cd --- /dev/null +++ b/Wox.Plugin.CppRef/Main.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Wox.Plugin; + +namespace Wox.Plugin.CppRef +{ + public class Main : IPlugin + { + public void Init(PluginInitContext context) + { + } + + public List Query(Query query) + { + List res = new List(); + string[] args = query.RawQuery.Split(' '); + if (args.GetLength(0) > 1) + { + string url = "https://zh.cppreference.com/mwiki/index.php?search=" + args[1]; + res.Add(new Result + { + Title = "search " + args[1] + " in cppreference.com", + IcoPath = "Images\\icon.png", + Action = e => + { + System.Diagnostics.Process.Start(url); + return true; + } + }); + } + return res; + } + } +} diff --git a/Wox.Plugin.CppRef/Properties/AssemblyInfo.cs b/Wox.Plugin.CppRef/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b642c61 --- /dev/null +++ b/Wox.Plugin.CppRef/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Wox.Plugin.CppRef")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Wox.Plugin.CppRef")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("9d4644a6-c5c6-4c47-8160-7badb3046ece")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Wox.Plugin.CppRef/Wox.Plugin.CppRef.csproj b/Wox.Plugin.CppRef/Wox.Plugin.CppRef.csproj new file mode 100644 index 0000000..dd68eab --- /dev/null +++ b/Wox.Plugin.CppRef/Wox.Plugin.CppRef.csproj @@ -0,0 +1,54 @@ + + + + + Debug + AnyCPU + {9D4644A6-C5C6-4C47-8160-7BADB3046ECE} + Library + Properties + Wox.Plugin.CppRef + Wox.Plugin.CppRef + v4.0 + 512 + true + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + ..\packages\Wox.Plugin.1.2.0.486\lib\net35\Wox.Plugin.dll + + + + + + + + + + + \ No newline at end of file diff --git a/Wox.Plugin.CppRef/packages.config b/Wox.Plugin.CppRef/packages.config new file mode 100644 index 0000000..0cca4d7 --- /dev/null +++ b/Wox.Plugin.CppRef/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..4d34287 --- /dev/null +++ b/plugin.json @@ -0,0 +1,12 @@ +{ + "ID":"2af6da212f7849c6af3682d4bf11ce20", + "ActionKeyword":"cr", + "Name":"CppRef", + "Description":"c/c++ reference", + "Author":"cildhdi", + "Version":"1.0.0", + "Language":"csharp", + "Website":"https://github.com/cildhdi/Wox.Plugin.CppRef", + "IcoPath": "Images\\icon.png", + "ExecuteFileName":"Wox.Plugin.CppRef.dll" + } \ No newline at end of file