摘要: 1 动机 :将客户端需要的对象的创建过程封装到一个类中,进而使客户端并不需要知道如何创建对象,而就能通过字符获得对象。2 类图 : 3 实现方法:第一种publicInterfaceIFactory{ IProduct CreatObject(string objectName);}public Interface IProduct{ //do some function void SayHall... 阅读全文
posted @ 2010-04-04 19:34 x4646 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1 动机 :为系统提供单一的对象,是全局的,不可序列化的,不可分割的,原子的,只能被调用,不能复制的对象。2 类图 : 3 实现方法:第一种public sealedclass Singleton{ public static radonlyobject SingletonObject privite staticSingleton(){SingletonObject= new Singleton... 阅读全文
posted @ 2010-04-04 18:19 x4646 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 48844609 http://dx69.newyx.net/arclive.exe arclive 平台下载http://www.yxbs.nethttp://files.cnblogs.com/x4646/sf2ce.zipsf2ce 阅读全文
posted @ 2010-04-04 17:03 x4646 阅读(178) 评论(1) 推荐(0) 编辑
摘要: var flag=false; //ImgD图片对象//w 外框宽度//h 外框高度function DrawImage(ImgD,w,h){ var image=new Image(); var iwidth = w; //定义允许图片宽度 var iheight = h; //定义允许图片高度 image.src=ImgD.src; if(image.width>0 &&... 阅读全文
posted @ 2010-04-01 14:04 x4646 阅读(176) 评论(0) 推荐(0) 编辑
摘要: functiondelegate(func){this.arr=newArray();//回调函数数组this.add=function(func){this.arr[this.arr.length]=func;};this.run=function(){for(vari=0;i<this.arr.length;i++){varfunc=this.arr[i];if(typeoffunc==... 阅读全文
posted @ 2010-04-01 13:44 x4646 阅读(472) 评论(0) 推荐(0) 编辑