前言
关于 SharpShell
SharpShell makes it easy to create Windows Shell Extensions using the .NET Framework.
准备
-
去 https://github.com/dwmkerr/sharpshell/releases 下载 ServerManager.zip、ServerRegistrationManager.zip
-
移动到一个本地目录,比如我这里是:C:\MyFiles\SharpShell\SharpShell_Tools_v2.7.2
-
把 ServerRegistrationManager.exe 改为 srm.exe 放入 C:\MyFiles\SharpShell\SharpShell_Tools_v2.7.2
打开 ServerManager.exe
如图:
点击菜单栏的 File => Load Server
如图:
打开我们自己编写的 CountLinesExtension.dll 所在的目录
打开 C:\MyFiles\SharpShell\CountLinesExtension_v2.7.2
如图:
点击 Test Server in Test Shell
如图:
提前准备 Test Text.txt
如图:
在 Test Shell 中找到 C 盘
如图:
测试成功
如图:
点击菜单栏的 Server – Install
如图:
安装成功
如图:
关闭 SharpShell Tools 后,在 C 盘 Test Txt 文件上右键
如图:
统计文本文件的行数测试成功
如图:
附录
- 安装和卸载SharpShell服务器
https://github.com/dwmkerr/sharpshell/blob/master/docs/installing/installing.md
- Nuget
https://www.nuget.org/packages/ServerRegistrationManager
- .NET Shell Extensions – Shell Context Menus
https://www.codeproject.com/Articles/512956/NET-Shell-Extensions-Shell-Context-Menus
谢谢浏览!
Original: https://www.cnblogs.com/Music/p/NET-Shell-Extensions-Shell-Context-Menus.html
Author: 音乐让我说
Title: 利用 C# 给 Windows 资源管理器注册右键菜单(Windows Shell)(一):入门
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/529655/
转载文章受原作者版权保护。转载请注明原作者出处!