Esempio n. 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();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var proxy    = new ImageProxy("1.png");
            var fileName = proxy.GetFileName();

            proxy.Draw();

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

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

            imageProxy.Draw();
        }