static void Main(string[] args) { ImageProxy proxy = new ImageProxy("ImageName"); //no image is newed. proxy.image.Draw(); //new Image and Draw. proxy.image.Draw(); }
static void Main(string[] args) { var proxy = new ImageProxy("1.png"); var fileName = proxy.GetFileName(); proxy.Draw(); Console.ReadLine(); }
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(); }
private void btnLazyLoad_Click(object sender, EventArgs e) { ImageProxy proxy = new ImageProxy(url, pbLogo); proxy.PaintIcon(); }
//----- private void init() { imgProxy = new ImageProxy(); }
static void Main(string[] args) { var imageProxy = new ImageProxy(); imageProxy.Draw(); }