Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //何时使用: 1、客户端不需要知道系统内部的复杂联系,整个系统只需提供一个"接待员"即可。 2、定义系统的入口。

            ShapeMaker shapeMaker = new ShapeMaker();

            shapeMaker.DrawRectangle();
            shapeMaker.DrawSquare();

            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Facade facade = new Facade();

            Console.WriteLine(facade.OrderFood());

            ShapeMaker shapeMaker = new ShapeMaker();

            Console.WriteLine(shapeMaker.DrawSquare());
            Console.WriteLine(shapeMaker.DrawRectangle());
            Console.WriteLine(shapeMaker.DrawSquare());
        }