# WinFormTransValueDemoByDelOrEvent
使用方法:使用vs2013打开编译运行即可;
C#winform窗体间传值,三种方法示例,注释详细
###方法1:通过保存对象的引用调用其方法实现对子窗体的控制;
###方法2:通过委托,在子窗体显示之前,为委托赋值,关注主窗体的数据变化,当有当有多个窗体需要接收信息,只需要为委托继续赋值(+=)即可,实现了数据传递的解耦性;
###方法3:子窗体弹出来之前,注册事件,关注主窗体消息的变化,当有多个窗体需要接收信息,,只需要分别为窗体注册数据接收事件即可,实现了数据传递的解耦性;
方法2与方法3即为发布订阅模式(观察者模式);
主窗体为消息的发布者,窗体A、B等等为消息的接收者;
没有合适的资源?快使用搜索试试~ 我知道了~
类库向winform窗体传值通过对象、委托、事件
共233个文件
dll:52个
xml:48个
_:36个
需积分: 15 0 下载量 32 浏览量
2022-09-09
11:00:05
上传
评论
收藏 2.68MB RAR 举报
温馨提示
类库向winform窗体传值通过对象、委托、事件
资源详情
资源评论
资源推荐
收起资源包目录
类库向winform窗体传值通过对象、委托、事件 (233个子文件)
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
DesignTimeResolveAssemblyReferencesInput.cache 8KB
DesignTimeResolveAssemblyReferencesInput.cache 7KB
Common.csproj.AssemblyReference.cache 7KB
WinFormTransValueDemo.csproj.GenerateResource.cache 1KB
DesignTimeResolveAssemblyReferences.cache 665B
WinFormTransValueDemo.csproj.CoreCompileInputs.cache 42B
Common.csproj.CoreCompileInputs.cache 42B
WinFormTransValueDemo.csproj.AssemblyReference.cache 11B
packages.config 661B
WinFrmDemo.exe.config 562B
App.config 562B
Common.dll.config 448B
Common.dll.config 448B
app.config 448B
WinFormTransValueDemo.csproj.CopyComplete 0B
Common.csproj.CopyComplete 0B
MainForm.cs 4KB
ClassTest.cs 4KB
Resources.Designer.cs 3KB
MainForm.Designer.cs 3KB
ObeserverFormB.Designer.cs 2KB
ObeserverFormA.Designer.cs 2KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
ObeserverFormA.cs 1KB
Settings.Designer.cs 1KB
ObeserverFormB.cs 864B
Program.cs 503B
MyEventArg.cs 278B
.NETFramework,Version=v4.7.2.AssemblyAttributes.cs 214B
.NETFramework,Version=v4.7.2.AssemblyAttributes.cs 214B
.NETFramework,Version=v4.5.AssemblyAttributes.cs 210B
WinFormTransValueDemo.csproj 6KB
Common.csproj 4KB
RabbitMQ.Client.dll 272KB
RabbitMQ.Client.dll 272KB
RabbitMQ.Client.dll 272KB
RabbitMQ.Client.dll 269KB
System.Numerics.Vectors.dll 160KB
System.Numerics.Vectors.dll 157KB
System.Numerics.Vectors.dll 157KB
System.Memory.dll 138KB
System.Memory.dll 138KB
System.Memory.dll 138KB
System.Memory.dll 138KB
System.Memory.dll 134KB
System.Numerics.Vectors.dll 113KB
System.Numerics.Vectors.dll 113KB
System.Numerics.Vectors.dll 113KB
System.Threading.Channels.dll 48KB
System.Threading.Channels.dll 45KB
System.Threading.Channels.dll 45KB
System.Threading.Channels.dll 45KB
System.Threading.Channels.dll 45KB
System.Threading.Channels.dll 45KB
System.Numerics.Vectors.dll 37KB
System.Numerics.Vectors.dll 37KB
System.Numerics.Vectors.dll 37KB
System.Numerics.Vectors.dll 29KB
System.Threading.Tasks.Extensions.dll 25KB
System.Threading.Tasks.Extensions.dll 25KB
System.Threading.Tasks.Extensions.dll 25KB
System.Threading.Tasks.Extensions.dll 25KB
System.Threading.Tasks.Extensions.dll 25KB
共 233 条
- 1
- 2
- 3
lijingguang
- 粉丝: 384
- 资源: 65
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0