文件名称:ranSelect
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:173.19kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
C#四种方式实现对用户操作响应灵敏及可动态更新的窗体控件及其对比
随机抽奖应用为例 开发环境vs2010
timer,backGroundWorker,多线程,委托四种方式的对比:
1.4种方式都可以实现要求 可谓条条大路通罗马
2.多线程和委托需要强行禁用CheckForIllegalCrossThreadCalls,有可能存在运行安全问题,但目前还没遇到
3.timer的源代码最少最简单 其次是多线程
4.委托本质上还是要用到多线程 区别在于委托是通过消息和事件的方式同步协调线程之间的配合 Observer设计模式
5.多线程和委托需要自己处理资源释放 否则程序非正常退出时会仍然驻留内存
6.backGroundWorker看来是微软针对此要求度身定做的成熟组件,封装了线程、同步协调及资源释放,又没有运行安全问题的担心
7.性能哪个最好?有空导几万条数据再测试啦
4个源代码中 backGroundWorker的源代码是最完整的 还对既公平又高效的随机抽奖算法进行了一些探讨 详见源代码注释
其他3个源代码只实现基本要求-random select user
随机抽奖应用为例 开发环境vs2010
timer,backGroundWorker,多线程,委托四种方式的对比:
1.4种方式都可以实现要求 可谓条条大路通罗马
2.多线程和委托需要强行禁用CheckForIllegalCrossThreadCalls,有可能存在运行安全问题,但目前还没遇到
3.timer的源代码最少最简单 其次是多线程
4.委托本质上还是要用到多线程 区别在于委托是通过消息和事件的方式同步协调线程之间的配合 Observer设计模式
5.多线程和委托需要自己处理资源释放 否则程序非正常退出时会仍然驻留内存
6.backGroundWorker看来是微软针对此要求度身定做的成熟组件,封装了线程、同步协调及资源释放,又没有运行安全问题的担心
7.性能哪个最好?有空导几万条数据再测试啦
4个源代码中 backGroundWorker的源代码是最完整的 还对既公平又高效的随机抽奖算法进行了一些探讨 详见源代码注释
其他3个源代码只实现基本要求-random select user
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ranSelectBackgroundWorker/ranSelectBackgroundWorker.sln
ranSelectBackgroundWorker/ranSelectBackgroundWorker.suo
ranSelectBackgroundWorker/WindowsFormsApplication6/bin/Debug/ranSelectBackgroundWorker.vshost.exe
ranSelectBackgroundWorker/WindowsFormsApplication6/bin/Debug/ranSelectBackgroundWorker.vshost.exe.manifest
ranSelectBackgroundWorker/WindowsFormsApplication6/frmMain.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/frmMain.Designer.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/frmMain.resx
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/GenerateResource.read.1.tlog
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/GenerateResource.write.1.tlog
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.csproj.FileListAbsolute.txt
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.exe
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.Form1.resources
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.frmMain.resources
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.pdb
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.Properties.Resources.resources
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ResolveAssemblyReference.cache
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/WindowsFormsApplication6.csproj.FileListAbsolute.txt
ranSelectBackgroundWorker/WindowsFormsApplication6/Program.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/Properties/AssemblyInfo.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/Properties/Resources.Designer.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/Properties/Resources.resx
ranSelectBackgroundWorker/WindowsFormsApplication6/Properties/Settings.Designer.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/Properties/Settings.settings
ranSelectBackgroundWorker/WindowsFormsApplication6/ranSelectBackgroundWorker.csproj
ranSelectBackgroundWorker/WindowsFormsApplication6.suo
ranSelectDelegate/ranSelectDelegate.sln
ranSelectDelegate/ranSelectDelegate.suo
ranSelectDelegate/WindowsFormsApplication7/bin/Debug/ranSelectDelegate.vshost.exe
ranSelectDelegate/WindowsFormsApplication7/bin/Debug/ranSelectDelegate.vshost.exe.manifest
ranSelectDelegate/WindowsFormsApplication7/Class1.cs
ranSelectDelegate/WindowsFormsApplication7/frmMain.cs
ranSelectDelegate/WindowsFormsApplication7/frmMain.Designer.cs
ranSelectDelegate/WindowsFormsApplication7/frmMain.resx
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/GenerateResource.read.1.tlog
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/GenerateResource.write.1.tlog
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/ranSelectDelegate.exe
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/ranSelectDelegate.frmMain.resources
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/ranSelectDelegate.pdb
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/ranSelectDelegate.Properties.Resources.resources
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/ResolveAssemblyReference.cache
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/WindowsFormsApplication7.csproj.FileListAbsolute.txt
ranSelectDelegate/WindowsFormsApplication7/Program.cs
ranSelectDelegate/WindowsFormsApplication7/Properties/AssemblyInfo.cs
ranSelectDelegate/WindowsFormsApplication7/Properties/Resources.Designer.cs
ranSelectDelegate/WindowsFormsApplication7/Properties/Resources.resx
ranSelectDelegate/WindowsFormsApplication7/Properties/Settings.Designer.cs
ranSelectDelegate/WindowsFormsApplication7/Properties/Settings.settings
ranSelectDelegate/WindowsFormsApplication7/WindowsFormsApplication7.csproj
ranSelectDelegate/WindowsFormsApplication7.suo
ranSelectMultiThread/ranSelectMultiThread.sln
ranSelectMultiThread/ranSelectMultiThread.suo
ranSelectMultiThread/WindowsFormsApplication8/bin/Debug/WindowsFormsApplication8.vshost.exe
ranSelectMultiThread/WindowsFormsApplication8/bin/Debug/WindowsFormsApplication8.vshost.exe.manifest
ranSelectMultiThread/WindowsFormsApplication8/frmMain.cs
ranSelectMultiThread/WindowsFormsApplication8/frmMain.Designer.cs
ranSelectMultiThread/WindowsFormsApplication8/frmMain.resx
ranSelectMultiThread/WindowsFormsApplication8/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
ranSele
ranSelectBackgroundWorker/ranSelectBackgroundWorker.suo
ranSelectBackgroundWorker/WindowsFormsApplication6/bin/Debug/ranSelectBackgroundWorker.vshost.exe
ranSelectBackgroundWorker/WindowsFormsApplication6/bin/Debug/ranSelectBackgroundWorker.vshost.exe.manifest
ranSelectBackgroundWorker/WindowsFormsApplication6/frmMain.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/frmMain.Designer.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/frmMain.resx
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/GenerateResource.read.1.tlog
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/GenerateResource.write.1.tlog
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.csproj.FileListAbsolute.txt
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.exe
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.Form1.resources
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.frmMain.resources
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.pdb
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ranSelectBackgroundWorker.Properties.Resources.resources
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/ResolveAssemblyReference.cache
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll
ranSelectBackgroundWorker/WindowsFormsApplication6/obj/x86/Debug/WindowsFormsApplication6.csproj.FileListAbsolute.txt
ranSelectBackgroundWorker/WindowsFormsApplication6/Program.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/Properties/AssemblyInfo.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/Properties/Resources.Designer.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/Properties/Resources.resx
ranSelectBackgroundWorker/WindowsFormsApplication6/Properties/Settings.Designer.cs
ranSelectBackgroundWorker/WindowsFormsApplication6/Properties/Settings.settings
ranSelectBackgroundWorker/WindowsFormsApplication6/ranSelectBackgroundWorker.csproj
ranSelectBackgroundWorker/WindowsFormsApplication6.suo
ranSelectDelegate/ranSelectDelegate.sln
ranSelectDelegate/ranSelectDelegate.suo
ranSelectDelegate/WindowsFormsApplication7/bin/Debug/ranSelectDelegate.vshost.exe
ranSelectDelegate/WindowsFormsApplication7/bin/Debug/ranSelectDelegate.vshost.exe.manifest
ranSelectDelegate/WindowsFormsApplication7/Class1.cs
ranSelectDelegate/WindowsFormsApplication7/frmMain.cs
ranSelectDelegate/WindowsFormsApplication7/frmMain.Designer.cs
ranSelectDelegate/WindowsFormsApplication7/frmMain.resx
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/GenerateResource.read.1.tlog
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/GenerateResource.write.1.tlog
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/ranSelectDelegate.exe
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/ranSelectDelegate.frmMain.resources
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/ranSelectDelegate.pdb
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/ranSelectDelegate.Properties.Resources.resources
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/ResolveAssemblyReference.cache
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll
ranSelectDelegate/WindowsFormsApplication7/obj/x86/Debug/WindowsFormsApplication7.csproj.FileListAbsolute.txt
ranSelectDelegate/WindowsFormsApplication7/Program.cs
ranSelectDelegate/WindowsFormsApplication7/Properties/AssemblyInfo.cs
ranSelectDelegate/WindowsFormsApplication7/Properties/Resources.Designer.cs
ranSelectDelegate/WindowsFormsApplication7/Properties/Resources.resx
ranSelectDelegate/WindowsFormsApplication7/Properties/Settings.Designer.cs
ranSelectDelegate/WindowsFormsApplication7/Properties/Settings.settings
ranSelectDelegate/WindowsFormsApplication7/WindowsFormsApplication7.csproj
ranSelectDelegate/WindowsFormsApplication7.suo
ranSelectMultiThread/ranSelectMultiThread.sln
ranSelectMultiThread/ranSelectMultiThread.suo
ranSelectMultiThread/WindowsFormsApplication8/bin/Debug/WindowsFormsApplication8.vshost.exe
ranSelectMultiThread/WindowsFormsApplication8/bin/Debug/WindowsFormsApplication8.vshost.exe.manifest
ranSelectMultiThread/WindowsFormsApplication8/frmMain.cs
ranSelectMultiThread/WindowsFormsApplication8/frmMain.Designer.cs
ranSelectMultiThread/WindowsFormsApplication8/frmMain.resx
ranSelectMultiThread/WindowsFormsApplication8/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
ranSele
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.