示例#1
0
        static void Main(string[] args)
        {
            ImageProxy proxy = new ImageProxy("ImageName"); //no image is newed.

            proxy.image.Draw();                             //new Image and Draw.
            proxy.image.Draw();
        }
示例#2
0
        static void Main(string[] args)
        {
            var proxy    = new ImageProxy("1.png");
            var fileName = proxy.GetFileName();

            proxy.Draw();

            Console.ReadLine();
        }
示例#3
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();
        }
示例#4
0
        private void btnLazyLoad_Click(object sender, EventArgs e)
        {
            ImageProxy proxy = new ImageProxy(url, pbLogo);

            proxy.PaintIcon();
        }
示例#5
0
 //-----
 private void init()
 {
     imgProxy = new ImageProxy();
 }
示例#6
0
        static void Main(string[] args)
        {
            var imageProxy = new ImageProxy();

            imageProxy.Draw();
        }