2010年9月3日

C#中常用的经典文件操作方法

摘要: C#中常用的经典文件操作方法 阅读全文

posted @ 2010-09-03 11:39 shaya 阅读(153) 评论(0) 推荐(0) 编辑

OnPaint事件

摘要: protected override void OnPaint(PaintEventArgs pe){ if (this.pictureBoxState[0x20]) { try { if (this.WaitOnLoad) { this.Load(); } else { this.LoadAsync(); } } catch (Exception exception) { if (ClientU... 阅读全文

posted @ 2010-09-03 11:38 shaya 阅读(465) 评论(0) 推荐(0) 编辑

文件的权限设制

摘要: using Microsoft.Win32.Security;private Boolean CreateDir(String strSitePath, String strUserName) {Boolean bOk;try {Directory.CreateDirectory(strSitePath);SecurityDescriptor secDesc = SecurityDescripto... 阅读全文

posted @ 2010-09-03 11:34 shaya 阅读(219) 评论(0) 推荐(0) 编辑

2010年9月2日

【转】c#实现魔兽(warIII)中显血和改键功能 (附源码)(不影响聊天打字)

摘要: 本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/sohighthesky/archive/2009/09/14/4550294.aspx#在论坛中看到有人提到 这个功能,感觉应该能实现,周末就抽时间写出来了,在这里分享下:思路:Hook+SendMessage,首先,因为我们要改的键war3不是自己写的程序,所以只能用Hook来监控键盘的按键:键盘Hook:+ ex... 阅读全文

posted @ 2010-09-02 14:43 shaya 阅读(1571) 评论(0) 推荐(0) 编辑

CHART的鼠标点击确定位置

摘要: private void chart1_MouseMove(object sender, MouseEventArgs e) { HitTestResult result = chart1.HitTest(e.X, e.Y); if (result.ChartElementType == ChartElementType.DataPoint) { Cursor = Cursors.Hand; tx... 阅读全文

posted @ 2010-09-02 12:05 shaya 阅读(1365) 评论(0) 推荐(0) 编辑

2010年8月27日

父类获取子类属性

摘要: public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { B obj = new B(); obj.str1 = "a"; obj.str2 = "b"; Response.Write(obj.DoSomethine()); } } clas... 阅读全文

posted @ 2010-08-27 15:51 shaya 阅读(776) 评论(0) 推荐(0) 编辑

2010年8月26日

【转】三种Timer的使用

摘要: 在.net中有三种计时器,一是System.Windows.Forms命名空间下的Timer控件,它直接继承自Componet;二是System.Timers命名空间下的Timer类。Timer控件:Timer控件只有绑定了Tick事件,和设置Enabled=True后才会自动计时,停止计时可以用Stop()控制,通过Stop()停止之后,如果想重新计时,可以用Start()方法来启动计时器。Ti... 阅读全文

posted @ 2010-08-26 11:28 shaya 阅读(335) 评论(0) 推荐(0) 编辑

CMD中查询进程

摘要: wmic->process 阅读全文

posted @ 2010-08-26 11:23 shaya 阅读(205) 评论(0) 推荐(0) 编辑

2010年8月24日

【转】C#3.0入门系列(九)-之GroupBy操作

摘要: 原文:http://www.cnblogs.com/126/archive/2007/07/10/812621.html有朋友反馈说我提供的sample不能编译。大概是版本的问题,可以到http://msdn2.microsoft.com/en-us/bb330936.aspx下载for beta1的版本。本节接着讲groupby。上一节,我们讲了如何理解groupby返回的结果。本节会延这个思路... 阅读全文

posted @ 2010-08-24 09:45 shaya 阅读(258) 评论(0) 推荐(0) 编辑

【转】C#3.0入门系列(八)-之GroupBy操作

摘要: 原文:http://www.cnblogs.com/126/archive/2007/07/09/634231.html换一种写作风格。本节讲groupby操作。在所有的Linq To Sql操作中,GroupBy是最难理解的一个。因为,这里和Sql的出入较大。而Group真的就能返回n多组。打开vs,新建一工程,加入System.Data.Linq.dll的引用。把northwind数据库做个映... 阅读全文

posted @ 2010-08-24 09:44 shaya 阅读(199) 评论(0) 推荐(0) 编辑

导航