コード例 #1
0
ファイル: Command.cs プロジェクト: SongToSoft/DesignPatterns
        static public void Run()
        {
            Console.WriteLine("------------Command------------");
            UIButton       invoker  = new UIButton();
            Panel          receiver = new Panel();
            CertainCommand command  = new CertainCommand(receiver);

            invoker.SetCommand(command);
            invoker.Run();
            invoker.Cancel();
        }
コード例 #2
0
ファイル: Command.cs プロジェクト: SongToSoft/DesignPatterns
 public void SetCommand(CertainCommand _command)
 {
     command = _command;
 }