Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Receiver r = new Receiver();
            Command c = new Run1000Meter(r);
            Invoke i = new Invoke(c);

            i.ExecuteCommand();
            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Receiver receiver = new Receiver();
            Command command =new ConcreteCommand(receiver);
            Invoker invoke = new Invoker();

            invoke.SetCommand(command);
            invoke.ExecuteCommand();

            Console.ReadKey();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Receiver r = new Receiver();
            Command c = new ConcreteCommand(r);
            Invoker i = new Invoker();

            // Set and execute command
            i.SetCommand(c);
            i.ExecuteCommand();

            Console.Read();
        }
Ejemplo n.º 4
0
 public ConcreteCommand(Receiver receiver)
     :
   base(receiver) { }
Ejemplo n.º 5
0
 public Command(Receiver receiver)
 {
     this.receiver = receiver;
 }
Ejemplo n.º 6
0
 public ConcreteCommond(Receiver recv)
     : base(recv)
 {
 }
Ejemplo n.º 7
0
 public Commond(Receiver recv)
 {
     this.receiver = recv;
 }
Ejemplo n.º 8
0
 public ConcreteCommand(Receiver receiver)
     :
     base(receiver)
 {
 }
Ejemplo n.º 9
0
 public Command(Receiver receiver)
 {
     this.receiver = receiver;
 }
Ejemplo n.º 10
0
 public override void Excute()
 {
     Receiver.Action("执行请求A");
 }
Ejemplo n.º 11
0
 public Run1000Meter(Receiver _receiver) : base(_receiver) { }
Ejemplo n.º 12
0
 public Command(Receiver _receiver)
 {
     this.receiver = _receiver;
 }
Ejemplo n.º 13
0
 public AbstractCommand(Receiver r)
 {
     this.receiver = r;
 }
Ejemplo n.º 14
0
 public ConcreteCommond()
 {
     receiver = new Receiver();
 }