ICommand.cs 945 B

123456789101112131415161718192021222324252627282930313233343536
  1. //-----------------------------------------------------------------------------
  2. // ICommand.cs
  3. //
  4. // Microsoft XNA Community Game Platform
  5. // Copyright (C) Microsoft Corporation. All rights reserved.
  6. //-----------------------------------------------------------------------------
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Text;
  10. namespace Xna.Tools
  11. {
  12. /// <summary>
  13. /// Commoand interface that provides Execute and Unexecute methods.
  14. /// </summary>
  15. public interface ICommand
  16. {
  17. /// <summary>
  18. /// Execute command.
  19. /// </summary>
  20. void Execute();
  21. /// <summary>
  22. /// Unexecute (Undo) command.
  23. /// </summary>
  24. void Unexecute();
  25. }
  26. /// <summary>
  27. /// Command handler
  28. /// </summary>
  29. /// <param name="sender"></param>
  30. /// <param name="command"></param>
  31. public delegate void CommandHandler(object sender, ICommand command);
  32. }