10 2012 档案

摘要:Refer to http://stackoverflow.com/questions/7936438/errorprovider-using-classpublic partial class Form1 : Form { public Form1() { InitializeComponent(); } private readonly ErrorProvider errorProvider1 = new ErrorProvider(); private void textBox1_TextC... 阅读全文
posted @ 2012-10-26 15:14 webglcn 阅读(182) 评论(0) 推荐(0)
摘要:I like to keep views decoupled or unaware of the presenters, hence Views communicate to the presenter by raising events. This eliminates the need for the view to have a reference to the presenter. Keep Views thin and dumb.The presenter on the other hand has a member reference to the view (and the mo 阅读全文
posted @ 2012-10-23 14:03 webglcn 阅读(199) 评论(0) 推荐(1)
摘要:For Msimsiexec /i <PathToInstaller>\<installer_name>.msi /lvx* <PathToLogFile>\<logfile_name>.txtFor Exe<PathToInstaller>\<installer_name>.exe /lvx* <PathToLogFile>\<logfile_name>.txt 阅读全文
posted @ 2012-10-19 13:36 webglcn 阅读(137) 评论(0) 推荐(0)
摘要:namespace ObserverPattern{ public interface ISubject { event EventHandler NotifyHandler; } public class CstEventArg : EventArgs { public string Name { get; set; } } public class News : ISubject { public event EventHandler NotifyHandler; public voi... 阅读全文
posted @ 2012-10-18 14:06 webglcn 阅读(511) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/wyixin/archive/2011/12/11/2284313.html首先实现两个接口:Subject(用于发布信息) Observer(信息接受者)Subject中:registerObserver(Observer observer); 用于登记需要推送的用户removeObserver(Observer observer); 将用户剔除出推送列表notifyObserver(); 推送服务Observer中:update(string news); 当Subject信息发送时,用于更新然后用 Newssta... 阅读全文
posted @ 2012-10-18 11:18 webglcn 阅读(358) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/donghaiyiyu/archive/2007/07/29/828738.html在所有关于C#事件机制的介绍中,我更倾向于发布者/订阅者(Publisher/Subscriber)这种描述。理解事件机制并不是一件容易的事情,它所涉及的思想值得我们好好去研究。谈到事件,我们涉及到两个角色:事件发布者(Publisher)和事件订阅者(Scriber),也可以说是事件发送者(Sender)和事件接收者(Receiver)的关系。举个例子来说,市面上目前有许多杂志,杂志的种类也很多。而我只对其中的某些感兴趣,那么我就可以向杂志发行商提出订阅。之后,每 阅读全文
posted @ 2012-10-18 11:17 webglcn 阅读(809) 评论(0) 推荐(0)
摘要:1.class AA : IA; class AB : AA, IA (inherit IA here is useless)2.long == Int64 in .net. 阅读全文
posted @ 2012-10-16 11:17 webglcn 阅读(150) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/wenanry/archive/2009/08/06/1540777.html 阅读全文
posted @ 2012-10-08 13:57 webglcn 阅读(95) 评论(0) 推荐(0)