环境:VS2008
关键字:WinFrom C# 插件结构 插件程序 用户控件
本例测试WinForm下的插件结构程序编写
利用用户控件,实现左边菜单右操作区的效果
上传内容为编写软件前写的测试例子,
希望对您有帮助。
//参考资料:http://www.cnblogs.com
例子创建过程
1、新建PlugInAppTest项目
*PlugInAppTest为本次实例的“宿主程序”
*主窗体划分左右区(Panel)用于放置菜单区和操作区
2、定义插件程序和宿主程序要实现的接口(Contract工程)
*Contract\IPlugIn.cs
插件类需继承的接口,定义插件程序能让宿主程序访问的属性,方法,事件...
*Contract\IAppContext.cs
主窗体需继承的接口,在插件接口IPlugIn中有相应的引用
用来实现插件程序与宿主程序的通讯
3、宿主程序实现接口IAppContext
4、创建插件程序ConfigFile,实现接口IPlugIn
5、创建另一个插件程序
6、宿主程序装载插件DLL
其他看代码
注意:
*设置插件程序的输出路径"..\PlugInAppTest\bin\Debug\PlugIn\"
*PlugIn文件夹会生成通用的接口DLL(Contract.dll),其实是可以删掉的
感谢您的时间和CSDN分。:)
Any Question:ajuntor@126.com
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
PlugInAppTest.rar (70个子文件)
PlugInAppTest
Contract
Contract.csproj 3KB
bin
obj
Debug
Contract.csproj.FileListAbsolute.txt 589B
Contract.csproj.GenerateResource.Cache 775B
Contract.BaseUC.resources 180B
Contract.pdb 14KB
Refactor
Contract.dll 4KB
Contract.dll 5KB
TempPE
BaseUC.cs 367B
BaseUC.resx 6KB
Properties
AssemblyInfo.cs 1KB
IAppContext.cs 476B
BaseUC.Designer.cs 1KB
IPlugIn.cs 345B
PlugInAppTest.suo 37KB
PlugInAppTest.sln 2KB
solution.png 14KB
ConfigFile
ConfigFile.csproj 3KB
bin
obj
Debug
ConfigFile.csproj.FileListAbsolute.txt 765B
ResolveAssemblyReference.cache 10KB
ConfigFile.MainUC.resources 180B
ConfigFile.csproj.GenerateResource.Cache 775B
Refactor
TempPE
01-ConfigFile.dll 7KB
01-ConfigFile.pdb 16KB
MainClass.cs 1KB
Properties
AssemblyInfo.cs 1KB
MainUC.cs 1011B
MainUC.Designer.cs 3KB
MainUC.resx 6KB
PlugInAppTest
CustomerPanel.cs 4KB
bin
Debug
PlugInAppTest.vshost.exe.manifest 490B
PlugInAppTest.pdb 34KB
PlugInAppTest.exe 12KB
Contract.pdb 14KB
Contract.dll 5KB
PlugInAppTest.vshost.exe 14KB
PlugIn
02-AnotherUC.dll 6KB
02-AnotherUC.pdb 16KB
Contract.pdb 14KB
Contract.dll 5KB
01-ConfigFile.dll 7KB
01-ConfigFile.pdb 16KB
obj
Debug
PlugInAppTest.Properties.Resources.resources 180B
PlugInAppTest.pdb 34KB
PlugInAppTest.csproj.GenerateResource.Cache 850B
PlugInAppTest.exe 12KB
PlugInAppTest.csproj.FileListAbsolute.txt 688B
Refactor
PlugInAppTest.MainForm.resources 180B
TempPE
Properties
Resources.Designer.cs 3KB
Settings.settings 249B
Resources.resx 5KB
Settings.Designer.cs 1KB
AssemblyInfo.cs 1KB
Program.cs 508B
PlugInAppTest.csproj 4KB
MainForm.resx 6KB
MainForm.cs 4KB
PlugIn
MainForm.Designer.cs 3KB
protal.png 9KB
readme.txt 1KB
AnotherUC
AnotherUC.csproj 3KB
bin
obj
Debug
02-AnotherUC.dll 6KB
AnotherUC.MainUC.resources 180B
AnotherUC.csproj.GenerateResource.Cache 775B
02-AnotherUC.pdb 16KB
Refactor
TempPE
AnotherUC.csproj.FileListAbsolute.txt 510B
MainClass.cs 1KB
Properties
AssemblyInfo.cs 1KB
MainUC.cs 515B
MainUC.Designer.cs 2KB
MainUC.resx 6KB
共 70 条
- 1
juntor
- 粉丝: 10
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页