上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 26 下一页
  2011年9月2日
摘要: As we know, In asp.net ,we can use web.config to store the configuration for the website.but In WinForm, we can use App.config to function the same function. See below settings: 阅读全文
posted @ 2011-09-02 11:46 程序诗人 阅读(329) 评论(2) 推荐(0)
  2011年8月31日
摘要: 在进行多线程设计过程中,最重要的就是实现线程同步和线程界面交互。如果想实现线程同步,可以通过lock锁来进行;而如果要想线程和界面交互,则需要利用委托来进行。 阅读全文
posted @ 2011-08-31 22:50 程序诗人 阅读(793) 评论(0) 推荐(0)
  2011年8月30日
摘要: 在使用Castle ActiveRecord的时候,需要两种方式来进行初始化,一种就是通过配置文件,另外一种就是将初始配置进行硬编码,写到程序中来。 当然,一般来说,利用配置文件来进行将会大大简化后期维护,我们首先在程序中添加一个App.config的配置文件,记住,一定要将这个配置文件的生成操作设置为“嵌入的资源”才行。否则会提示如学习笔记二中所出现的问题。 阅读全文
posted @ 2011-08-30 22:42 程序诗人 阅读(911) 评论(0) 推荐(0)
  2011年8月29日
摘要: 在进行castle activerecord设计的时候,经常会出现“NHibernate.Cfg.Configuration”的类型初始值设定项引发异常。当时也不知道是怎么回事,反正是弄好了,谁知道第二次修改了一些东西以后,居然又出现了这个错误提示,但是当时就是不知道为什么,摸索了半天,原来是xml嵌入资源的事情。 如果你的项目中有App.config等配置文件,请将其设置为“嵌入的资源”,这样再运行的时候,就不会出错了。 阅读全文
posted @ 2011-08-29 23:29 程序诗人 阅读(1392) 评论(0) 推荐(0)
  2011年8月28日
摘要: Castle ActiveRecord抛弃了Nhibernate的繁杂的配置,采用了一种更加方便的方式来组织项目结构,是对Nhibernate的再次封装,大大简化了开发,下面就来说明其配置过程 阅读全文
posted @ 2011-08-28 10:51 程序诗人 阅读(1380) 评论(4) 推荐(0)
  2011年8月19日
摘要: using System;using System.ComponentModel;using System.Windows.Forms;using System.Threading;namespace WindowsFormsApplication1{ publicpartialclass Form1 : Form { public Form1() { InitializeComponent(); worker =new BackgroundWorker(); worker.DoWork+... 阅读全文
posted @ 2011-08-19 00:18 程序诗人 阅读(348) 评论(0) 推荐(0)
  2011年8月14日
摘要: using System;using System.Collections.Generic;using System.Text; namespace MyDelegate{ class Program { static void Main(string[] args) { List<string> m_liName=new List<string>(); m_liName.Add("sadi"); m_liName.Add("pothik"); m_liName.Add("shiman"); m_liName. 阅读全文
posted @ 2011-08-14 23:17 程序诗人 阅读(248) 评论(0) 推荐(0)
摘要: 最近项目中使用到了Log4Net,于是便做了一个小记,来记录下简单的使用情况,具体的,需要等到以后去挖掘。首先就是让Console显示Log4Net日志记录情况,这个不需要什么具体的配置,只需要下载log4net,然后引用相应的dll文件即可。你可以通过http://logging.apache.org/log4net/download.html去下载Log4Net,具体代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;using log4net;using log4ne 阅读全文
posted @ 2011-08-14 22:48 程序诗人 阅读(907) 评论(0) 推荐(0)
  2011年8月12日
摘要: using System;using System.Windows.Forms;using System.Threading;namespaceThreadBeginInvokeAPP{publicpartialclassmainFrm : Form{public mainFrm(){InitializeComponent();Thread t = newThread(newThreadStart(ChangeLabel));t.Start();//运行线程}privatedelegatevoidSetLabelTextDelegate(int number); //委托privatevoid 阅读全文
posted @ 2011-08-12 10:12 程序诗人 阅读(503) 评论(0) 推荐(0)
  2011年8月10日
摘要: Guid属于using System.Runtime.InteropServices命名空间下,但是在vs2008中,在Guid上面右击,竟然找不到resolve... 奇怪 阅读全文
posted @ 2011-08-10 22:05 程序诗人 阅读(704) 评论(1) 推荐(0)
摘要: 在C#中,Thread用的是比较多的,至少在windows form中使用是比较频繁的。一说到线程,可能马上就会想到界面和线程交互的头疼事,多线程之前数据共享,线程异步等等。这些当然是比较头疼的,只要有信心 ,慢慢来,相信理解不是难事。 阅读全文
posted @ 2011-08-10 21:39 程序诗人 阅读(3441) 评论(0) 推荐(0)
摘要: Thanks to all of the functional goodness that was put into C# 3.0 we have a ton of power at our disposal. Unfortunately with a lot of this power also comes increased complexity. Programmers usually exacerbate the complexity problem, because unfortunately we often like to sound like we are smarter th 阅读全文
posted @ 2011-08-10 00:17 程序诗人 阅读(476) 评论(0) 推荐(0)
  2011年8月2日
摘要: 下面显示的是效果图:然后是代码,其中有一些解释:using System;using System.Collections.Generic;using System.ComponentModel;using System.Diagnostics;using System.Text;using System.Windows.Forms;using System.Drawing;using System.Drawing.Drawing2D;namespace scyGroupBox{ public partial class scyGroupBox : GroupBox { private Gra 阅读全文
posted @ 2011-08-02 21:57 程序诗人 阅读(1912) 评论(2) 推荐(0)
  2011年8月1日
摘要: 在Asp.net中,HttpModule和HttpHandler均可以截取IIS消息进行处理,这使得我们制作人员能够非常方便的进行诸如图片水印添加,图片盗链检查等功能。下面先就HttpModule的使用方法进行简单说明:using System;using System.Web;namespace MyWebApp{ public class MyHttpModule:IHttpModule { public void Init(HttpApplication application) { application.BeginRequest+=new EventHandler(applicati 阅读全文
posted @ 2011-08-01 21:32 程序诗人 阅读(969) 评论(0) 推荐(0)
  2011年7月21日
摘要: 就是加上 display:inline; 阅读全文
posted @ 2011-07-21 21:19 程序诗人 阅读(311) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 26 下一页