05 2011 档案

摘要:this.PictureBoxNodeBackImage.AllowDrop = true; //这个也要加上 //最后我们判断完成后怎样向PictureBox中添加数据,并从datagridview中删除选中数据所在的行,我们在PictureBox的DragDrop事件中执行操作 private void PictureBoxNodeBackImage_DragDrop(object sender, DragEventArgs e) { Point pos = new Point(e.X, e.Y); //拖動數據后 所記錄的坐標 pos = this.PictureBoxNodeBack. 阅读全文
posted @ 2011-05-26 17:22 biubiubiu 阅读(790) 评论(0) 推荐(0)
摘要:反射是种机制,通过这种机制我们可以知道一个未知类型的类型信息,比如,有一个对象a,这个对象不是我们定义的,也许是通过网络捕捉到的,也许是使用泛型定义的,但我们想知道这个对象的类型信息,想知道这个对象有哪些方法或者属性什么的.甚至我们想进一步调用这个对象的方法.关键是现在我们只知道它是一个对象,不知道它的类型,自然不会知道它有哪些方法等信息.这时我们该怎么办?反射机制就是解决这么一个问题的.通过反射机制我们可以知道未知类型对象的类型信息.再比如,我们有一个dll文件 ,我们想调用里面的类.现在假设这个dll文件 的类的定义,数量等不是固定的,是经常变化的.也许某一天你要在这个dll里面增加一个类 阅读全文
posted @ 2011-05-25 11:18 biubiubiu 阅读(285) 评论(0) 推荐(1)
摘要:public class Document { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual DocumentFile DocumentFile { get; set; } } public class DocumentFile { public virtual int Id { get; set; } public virtual Document Document { get; set; } public virtual byte[] Data { ge 阅读全文
posted @ 2011-05-11 20:00 biubiubiu 阅读(260) 评论(0) 推荐(1)
摘要:using System;using Microsoft.Win32;namespace TunEc.ZHJF.Common{ public class OperateReg { /// <summary> /// 读取指定名称的注册表的值 /// </summary> /// <param name="name">注册表值</param> /// <returns></returns> public static string GetRegData(string strItemName) { try 阅读全文
posted @ 2011-05-09 17:13 biubiubiu 阅读(352) 评论(0) 推荐(0)
摘要://TreeView的AfterCheck事件 private void TvNodeInfo_AfterCheck(object sender, TreeViewEventArgs e) { CheckControl(e); } public void CheckControl(TreeViewEventArgs e) { if (e.Action != TreeViewAction.Unknown) { if (e.Node != null && !Convert.IsDBNull(e.Node)) { CheckParentNode(e.Node); if (e.Node 阅读全文
posted @ 2011-05-03 13:19 biubiubiu 阅读(420) 评论(0) 推荐(0)