public void Display() { if (realImage == null) { realImage = new RealImage(fileName); } realImage.Display(); }
public ProxyForm() { InitializeComponent(); RealImage1 = new RealImage(FolderPath + @"Image1.jpg"); ProxyImage2 = new ProxyImage(FolderPath + @"Image2.jpg"); ProxyImage3 = new ProxyImage(FolderPath + @"Image3.jpg"); ProxyImage4 = new ProxyImage(FolderPath + @"Image4.jpg"); RealImage1.LoadImageFromDisk(); // Image is already loaded on construction and may never be displayed }
public void DisPlay() { if (_realImage == null) { _realImage = new RealImage(_fileName); } if (_realImage != null) { _realImage.DisPlay(); } }