public static void InvokeProxy()
        {
            IImage image = new ProxyImage("imagemTeste.jpg");

            image.display();
            Console.WriteLine("");
            image.display();
            Console.ReadLine();
        }
Beispiel #2
0
        private void btProxyPattern_Click(object sender, EventArgs e)
        {
            string str   = "";
            IImage image = new ProxyImage("test_10mb.jpg");

            //图像将从磁盘加载
            str += image.display() + "\r\n";
            //图像将无法从磁盘加载
            str += image.display() + "\r\n";
            tbOutWindow.Text = str;
        }
Beispiel #3
0
        static void Main()
        {
            Image image = new ProxyImage("fileName.png");

            image.display();
        }