关于实现日志的明细保存问题 2005-05-24 与联想桥思路: 通过一个自定义控件与全局变量实现对每一步进行详细的日志记录 通botton的委托关系实现调用自定义控件外部botton的单击事件下面是一个非常简单的例子,-----自定义控件using system;using system.collections;using system.componentmodel;using system.drawing;using system.data;using system.windows.forms;
public bt() { // 该调用是 windows.forms 窗体设计器所必需的. initializecomponent(); 【程序编程相关:what is new in c sha】
namespace zcgl.baseclass{ /// <summary> /// bt /// 一个button按钮 /// </summary> public class bt : system.windows.forms.usercontrol { public system.windows.forms.button btc; /// <summary> /// 必需的设计器变量. /// </summary> private system.componentmodel.container components = null; 【推荐阅读:原创:.NET中C#实现C/S架构下的T】
} 【扩展信息:用户自定义控件的应用。 】
// todo: 在 initializecomponent 调用后添加任何初始化
/// <summary> /// 清理所有正在使用的资源. /// </summary> protected override void dispose( bool disposing ) { if( disposing ) { if(components != null) { components.dispose(); } } base.dispose( disposing ); }
#region 组件设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器 /// 修改此方法的内容.... 下一页