上一页 1 2 3 4 5 6 ··· 13 下一页
该文被密码保护。 Read More
posted @ 2013-03-24 13:26 C#老头子 Views(2) Comments(0) Diggs(0) Edit
Visual Studio 提供了IWizard接口,在实现该接口后,您可以在用户根据模板创建项目时运行自定义代码。http://msdn.microsoft.com/zh-cn/library/ms185301(v=vs.100).aspxhttp://msdn.microsoft.com/zh-cn/library/ms247119(v=vs.100).aspxVisual Studio 提供了IWizard接口,在实现该接口后,您可以在用户根据模板创建项目时运行自定义代码。项目模板的自定义可用于:显示收集用户输入以参数化模板的自定义 UI。添加要在模板中使用的参数值。向模板添加其他文件。 Read More
posted @ 2013-03-24 13:15 C#老头子 Views(445) Comments(0) Diggs(0) Edit
http://www.cnblogs.com/chenxizhang/archive/2010/03/13/1685179.html今天在讲到动态执行方法的时候,我们讨论到了Delegate.CreateDelegate的方法。但也有下面这样的一个更加通用的方法:可以执行任何方法,传递任意个数的参数,而无需定义delegate using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;namespace ConsoleApplication1 Read More
posted @ 2013-03-24 13:00 C#老头子 Views(291) Comments(0) Diggs(0) Edit
下面代码是今天课程中,有朋友上台做即席演讲时举的一个例子.这个例子不错,概括了动态调用方法的几种情况,包括静态方法,实例方法,方法重载等等using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { //MyClass obj... Read More
posted @ 2013-03-24 12:56 C#老头子 Views(196) Comments(0) Diggs(0) Edit
2007-01-29 11:21 by 无常, 3368 阅读,8评论,收藏,编辑前言在需要录入数据的字段比较多的表单应用程序中,为了给用户更好的体验,我们通常会将[Enter]键转为[TAB]将输入焦点移到下一个控件,或是将获得焦点的输入控件背景经一个醒目的背景颜色显示等等。以往的做法通常是从TextBox、ComboBox等标准输入控件派生一个新的控件,在新控件中改变击键和在获得/失去焦点时的动作,但此方法的不便之外就是到项目的最后,会增加了一系列的标准控件的小功能扩展控件,增大了后期的维护工作量。在DotNet中,对于类似的对标准控件的“小功能扩展”我们有了更好解决方案,那就是神奇的IE Read More
posted @ 2013-03-24 12:32 C#老头子 Views(305) Comments(0) Diggs(0) Edit
说起扩展编程组件,我们不得不起到一个接口IExtenderProvider,参考msdn的定义:定义将属性扩展到容器中的其他组件的接口;下面我贴上IExtenderProvider的定义:http://www.cnblogs.com/eastjade/archive/2010/08/10/1796422.html /// <summary> /// 定义将属性扩展到容器中的其他组件的接口。 /// </summary> public interface IExtenderProvider { /// <summary> /// 指定此对... Read More
posted @ 2013-03-24 12:28 C#老头子 Views(277) Comments(0) Diggs(0) Edit
http://msdn.microsoft.com/zh-cn/library/ms171830(v=vs.80).aspx 必须添加对设计时程序集 System.Design.dll 的引用。此程序集不包含在 .NET Framework 4 Client Profile 中。若要添加对 System.Design.dll 的引用,必须将项目的目标框架更改为“.NET Framework 4”。 此示例演示如何向组件和自定义控件添加智能标记支持。 有关此代码示例的完整说明,请参见演练:向 Windows 窗体组件添加智能标记。///////////////////////////////// Read More
posted @ 2013-03-24 12:19 C#老头子 Views(407) Comments(0) Diggs(0) Edit
该文被密码保护。 Read More
posted @ 2013-03-24 12:07 C#老头子 Views(0) Comments(0) Diggs(0) Edit
http://msdn.microsoft.com/zh-cn/library/tbt775x3(v=vs.100).aspx元数据筛选允许设计器在设计时修改组件或控件所公开的属性、特性和事件。例如,Control具有一个名为Visible的属性,该属性确定控件是否可见。但是,无论该属性的值是多少,设计时控件总是应保持可见,以便开发人员可以在设计图面上定位它。Control的设计器在设计时用自己的版本替换Visible属性,以后再恢复此属性的运行时值。若要执行元数据筛选,设计器可以实现IDesignerFilter接口,或者可以向设计时服务提供程序(该程序可在设计时环境中对任何组件执行元数据筛 Read More
posted @ 2013-03-24 12:03 C#老头子 Views(391) Comments(0) Diggs(0) Edit
http://www.codeproject.com/Articles/4683/Getting-to-know-IExtenderProviderGetting to know IExtenderProviderBy James T. Johnson, 2 Aug 2003 4.88 (65 votes) Download the source code (15.7 Kb)Note: A demo isn't provided because the IExtenderProvider is a design time tool, the runtime value is to b. Read More
posted @ 2013-03-24 12:00 C#老头子 Views(249) Comments(0) Diggs(0) Edit
上一页 1 2 3 4 5 6 ··· 13 下一页