惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Last Watchdog
The Last Watchdog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
T
Tor Project blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Vercel News
Vercel News
Last Week in AI
Last Week in AI
月光博客
月光博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
博客园 - 叶小钗
NISL@THU
NISL@THU
C
Check Point Blog
K
Kaspersky official blog
N
News and Events Feed by Topic
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
Arctic Wolf
T
Threatpost
GbyAI
GbyAI
L
LINUX DO - 热门话题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
N
News and Events Feed by Topic
Scott Helme
Scott Helme
P
Privacy International News Feed
The Register - Security
The Register - Security
G
GRAHAM CLULEY
Recorded Future
Recorded Future
Apple Machine Learning Research
Apple Machine Learning Research
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog
Project Zero
Project Zero
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Microsoft Security Blog
Microsoft Security Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
DataBreaches.Net
J
Java Code Geeks
AWS News Blog
AWS News Blog
Help Net Security
Help Net Security
Engineering at Meta
Engineering at Meta
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
Google DeepMind News
Google DeepMind News

博客园 - dn

[2008年]毕业论文格式要求 《面向.NET的XML程序设计》MAC模拟题 《基于C#的Windows应用程序设计》MCP认证考试模拟题 第六章课后习题及答案 第五章课后习题及答案 第四章课后习题及答案 毕业设计论文封面模板 在C#程序设计中使用Win32 API .NET中常用的连接字符串 第三章课后习题和答案 第三章例题:为控件添加设计时支持 第三章例题:重载控件属性 第三章例题:自定义控件 毕业论文格式 第二章课后习题及答案 第二章例题:验证处理 第二章例题:动态添加控件 [2007年]毕业设计:bluehill人事管理系统 快速导航
第三章例题:文件许可
dn · 2007-04-15 · via 博客园 - dn

第三章例题:文件许可

对教材3.4.1部分进行演示,即LicFileLicenseProvider类使用的演示

 1//使用LicFileLicenseProvider作为许可提供类
 2    [LicenseProvider(typeof(LicFileLicenseProvider))]
 3    public class LicensedColorComboBox : System.Windows.Forms.ComboBox
 4    {
 5        //用License类型保存许可
 6        private License license = null;
 7
 8        public LicensedColorComboBox()
 9        {
10            //验证许可是否通过,未通过则会弹出异常
11            license = LicenseManager.Validate(typeof(LicensedColorComboBox), this);
12            FillItems();
13            base.SelectedItem = base.Items[7]; // Black
14            base.DrawItem += new DrawItemEventHandler(this.combo_DrawItem);
15        }

16
17        ~LicensedColorComboBox() 
18        {
19            //释放许可资源
20            if (license != null
21            {
22                license.Dispose();
23                license = null;
24            }

25        }

26

完整源代码下载:LicensedApps.rar

posted @ 2007-04-15 15:49  dn  阅读(271)  评论(0)    收藏  举报

刷新页面返回顶部