예제 #1
0
        static void Main(string[] args)
        {
            var   girl  = new Girl("Judy");
            Proxy proxy = new Proxy(girl);

            proxy.GiveDolls();
            proxy.GiveFlowers();
            proxy.GiveChocolate();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Girl jiaojiao = new Girl();

            jiaojiao.Name = "李娇娇";
            Proxy dali = new Proxy(jiaojiao, "甲");

            dali.Name        = "戴利";
            dali.PursuitName = "甲";
            dali.GiveChocolate();
            dali.GiveDolls();
            dali.GiveFlowers();
            Console.Read();
        }
예제 #3
0
 public Proxy(Girl mm, string PursuitName)
 {
     gg = new Pursuit(mm, PursuitName);
     this.PursuitName = PursuitName;
 }
예제 #4
0
 public Pursuit(Girl mm, string name)
 {
     this.mm   = mm;
     this.Name = name;
 }