예제 #1
0
        static void Main(string[] args)
        {
            var proxy    = new ImageProxy("1.png");
            var fileName = proxy.GetFileName();

            proxy.Draw();

            Console.ReadLine();
        }
예제 #2
0
        static void Main(string[] args)
        {
            //客户端只知道代理对象,不知道真实对象
            Graphic proxy  = new ImageProxy("图片a", 200, 300);
            var     extent = proxy.GetExtent();

            Console.WriteLine("宽:" + extent.Weight + ",高:" + extent.Height);
            Console.WriteLine("————————");
            proxy.Draw();
            extent = proxy.GetExtent();
            Console.WriteLine("宽:" + extent.Weight + ",高:" + extent.Height);
            Console.ReadLine();
        }
예제 #3
0
        static void Main(string[] args)
        {
            var imageProxy = new ImageProxy();

            imageProxy.Draw();
        }