StoneJade(三生石上)
来源: BlogBus 原始链接: http://www.blogbus.com:80/blogbus/blog/index.php?blogid=16986 存档链接: https://web.archive.org/web/20041123205254id_/http://www.blogbus.com:80/blogbus/blog/index.php?blogid=16986
StoneJade(三生石上) 春梦随云散,飞花逐水流。 分页: [1] [2] [3] 添加一个程序 -[札记] 时间:2004-11-12 23:25 以前做的图形学作业,就的还好,拿出来大家分享, 见 http://etour.ustc.edu.cn/zlei/ StoneJade 发表于 23:25 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 SharpDXGame1.0&FirstAVG1.0 -[SharpDXGame] 时间:2004-10-25 11:40 由于一些事情烦心,提前发布: http://etour.ustc.edu.cn/zlei StoneJade 发表于 11:40 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 好消息了 -[札记] 时间:2004-10-17 17:14 今天上午的得到的消息,我们组的作品易拓旅游获得安徽省首届创业大赛 金奖,只是一分钱没有,倒帖了不少,不过挺高兴的,锻炼了一下,记之。 希望SharpDXGame1.0和FirstAVG1.0能在11月份之前发布,到11月份还有一 堆的事去做了。 StoneJade 发表于 17:14 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 设计模式 -[dotnet] 时间:2004-10-11 13:20 //设计模式对程序的过程设计具有重要的作用。 //设计模式试图解决灵活性问题,但所用的方法并不是继承, //继承在编译时完成任务,通过使用设计模式,可以在运行时更改对象行为。 //设计模式提供了用于实际应用程序的通用解决方案列表。 StoneJade 发表于 13:20 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 设计模式--Proxy -[dotnet] 时间:2004-10-11 13:10 //模式:Proxy //描述:将大对象的创建时间推迟到真正使用之时。 //点评: public interface IHelloPrinter { void PrintHello(); } public class EnglishHelloPrinter : IHelloPrinter { public void PrintHello() { System.Console.WriteLine("Hello World!"); } } public class GermanHelloPrinter : IHelloPrinter { public void PrintHello() { System.Console.WriteLine("Hallo Welt!"); } } public class HelloFactory { public IHelloPrinter CreateHelloPrinter(string language) { switch(language) { case "en": return new EnglishHelloPrinter(); break; case "de": return new GermanHelloPrinter(); break; } return null; } } public class HelloPrinterProxy : IHelloPrinter { string language; IHelloPrinter printer = null; public HelloPrinterProxy(string language) { this.language = language; } public void PrintHello() { if(printer == null) { printer = new HelloFactory().CreateHelloPrinter(this.language); if(printer == null) { throw new System.NotSupportedException(this.language); } } this.printer.PrintHello(); } } StoneJade 发表于 13:10 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 设计模式--Decorator -[dotnet] 时间:2004-10-11 13:03 //模式:Decorator //描述:在运行时为对象添加功能,它从一个接口继承而来,并扩展和实现了该接口的全部实现和方法。 //点评: public interface IHelloPrinter { void PrintHello(); } public class EnglishHelloPrinter : IHelloPrinter { public void PrintHello() { System.Console.WriteLine("Hello World!"); } } public class GermanHelloPrinter : IHelloPrinter { public void PrintHello() { System.Console.WriteLine("Hallo Welt!"); } } public interface IHelloPrinterDecorator : IHelloPrinter { void PrintGoodbye(); } public abstract class AbstractHelloPrinterDecorator : IHelloPrinterDecorator { private IHelloPrinter helloPrinter; public AbstractHelloPrinterDecorator(IHelloPrinter helloPrinter) { this.helloPrinter = helloPrinter; } public void PrintHello() { this.helloPrinter.PrintHello(); } public abstract void PrintGoodbye(); } public class GermanHelloPrinterDecorator : AbstractHelloPrinterDecorator { public GermanHelloPrinterDecorator(IHelloPrinter helloPrinter) :base(helloPrinter) { } public override void PrintGoodbye() { System.Console.WriteLine("Auf Wiedersehen!"); } } public class EnglishHelloPrinterDecorator : AbstractHelloPrinterDecorator { public EnglishHelloPrinterDecorator(IHelloPrinter helloPrinter) :base(helloPrinter) { } public override void PrintGoodbye() { System.Console.WriteLine("Good bye!"); } } StoneJade 发表于 13:03 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 设计模式--Strategy -[dotnet] 时间:2004-10-11 12:47 //模式:Strategy //描述:从若干个可能的类创建对象。 //点评:类似于Factory模式,factory在创建时改变对象,Strategy则可以自由切换 public interface IHelloStrategy { void PrintHello(); } public class EnglishHelloStrategy : IHelloStrategy { public void PrintHello() { System.Console.WriteLine("Hello World!"); } } public class GermanHelloStrategy : IHelloStrategy { public void PrintHello() { System.Console.WriteLine("Hallo Welt!"); } } public class HelloPrinter { private IHelloStrategy helloStrategy; public IHelloStrategy HelloStrategy { get { return helloStrategy; } set { this.helloStrategy = value; } } public void PrinterHello() { if(this.helloStrategy != null) { this.helloStrategy.PrintHello(); } } } StoneJade 发表于 12:47 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 设计模式--Factory -[dotnet] 时间:2004-10-11 12:44 //模式:Factory //描述:从若干个可能的类创建对象。 //点评:如果正在处理一个接口,并有多种实现方法,可以使用factory创建。 public interface IHelloPrinter { void PrintHello(); } public class EnglishHelloPrinter : IHelloPrinter { public void PrintHello() { System.Console.WriteLine("Hello World!"); } } public class GermanHelloPrinter : IHelloPrinter { public void PrintHello() { System.Console.WriteLine("Hallo Welt!"); } } public class HelloFactory { public IHelloPrinter CreateHelloPrinter(string language) { switch(language) { case "en": return new EnglishHelloPrinter(); break; case "de": return new GermanHelloPrinter(); break; } return null; } } StoneJade 发表于 12:44 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 设计模式--Singleton -[dotnet] 时间:2004-10-11 12:18 //模式:Singleton //描述:是一种面向模式的全局变量的创建方法,确保运行是只有Singleton类一个实例。 //点评:Singleton对象只有私有的构造函数。 class ExampleSingleton { static ExampleSingleton exampleSingleton = new ExampleSingleton(); public static ExampleSingleton Singleton { get { return exampleSingleton; } } ExampleSingleton() { } public void PrintHello() { System.Console.WriteLine("Hello World!"); } } StoneJade 发表于 12:18 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 下雨了 -[札记] 时间:2004-10-09 15:41 前两天看七巧板,发现一首童谣挺好玩的: 下雨了,冒泡了; 谁家小狗不要了; 不要了,我要了; 小狗看着我笑了。 StoneJade 发表于 15:41 | 阅读全文 | 评论(1) | 引用Trackback(0) | 编辑 图标转换精灵1.0发布 -[札记] 时间:2004-09-28 00:22 可将任意格式的图片 无失真 的转换为图标。 http://etour.ustc.edu.cn/zlei/ StoneJade 发表于 00:22 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 天气精灵1.0发布 -[dotnet] 时间:2004-09-25 23:36 最近两三天做了个天气精灵,用C#写的。 http://etour.ustc.edu.cn/zlei/ StoneJade 发表于 23:36 | 阅读全文 | 评论(0) | 引用Trackback(0) | 编辑 分页: [1] [2] [3] 分类 首页 札记 dotnet SharpDXGame 日历 2004 年 11 月 Sun Mon Tue Wen Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 最后更新 添加一个程序 SharpDXGame1.0&FirstAVG1.0 好消息了 设计模式 设计模式--Proxy 设计模式--Decorator 设计模式--Strategy 设计模式--Factory 设计模式--Singleton 下雨了 最新评论 ring : 我终于看懂了. zlei : 呵呵,9.0C的框架. fls : 对于DX框架的研究. StoneJade : 只是觉得稍微可以. bobo : 过时了吧:P. 存档 1970/01/02/-2004/09/21 我的链接 我的临时主页 科大BBS CodeProject Gameres