/Utilities/CommandUtilities.cs

https://github.com/shader/QuickArch · C# · 18 lines · 16 code · 2 blank · 0 comment · 0 complexity · 64491e4810a924d3bb0d23f859efdaa5 MD5 · raw file

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using QuickArch.ViewModel;
  6. using System.Drawing;
  7. namespace QuickArch.Utilities
  8. {
  9. public static class CommandUtilities
  10. {
  11. public static CommandViewModel NewCommand(string displayName, Action<object> execute, Icon icon, bool isEnabled = true)
  12. {
  13. return new CommandViewModel(displayName, new RelayCommand(execute), isEnabled, icon);
  14. }
  15. }
  16. }