From c686be8c88d33ff397e24c2b7d6e2d2240b2f64b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Sat, 3 Feb 2018 06:38:35 +0100 Subject: :book: use own compiled opentk and remove nuget config --- src/Command.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/Command.cs') diff --git a/src/Command.cs b/src/Command.cs index b3f31ff0..ba95acc9 100644 --- a/src/Command.cs +++ b/src/Command.cs @@ -30,6 +30,9 @@ using System.ComponentModel; namespace Crow { + /// + /// helper class to bind in one step icon, caption, action, and validity tests to a controls + /// public class Command : IValueChange { #region IValueChange implementation @@ -41,6 +44,10 @@ namespace Crow #endregion #region CTOR + /// + /// Initializes a new instance of Command with the action pass as argument. + /// + /// action to excecute when command is triggered public Command (Action _executeAction) { execute = _executeAction; @@ -54,6 +61,9 @@ namespace Crow bool canExecute = true; #region Public properties + /// + /// if true, action defined in this command may be executed, + /// [XmlAttributeAttribute][DefaultValue(true)] public virtual bool CanExecute { get { return canExecute; } @@ -64,6 +74,9 @@ namespace Crow NotifyValueChanged ("CanExecute", canExecute); } } + /// + /// label to display in the bound control + /// [XmlAttributeAttribute][DefaultValue("Unamed Command")] public virtual string Caption { get { return caption; } @@ -75,6 +88,9 @@ namespace Crow } } + /// + /// Icon to display in the bound control + /// [XmlAttributeAttribute] public Picture Icon { get { return icon; } @@ -87,6 +103,9 @@ namespace Crow } #endregion + /// + /// trigger the execution of the command + /// public void Execute(){ if (execute != null && CanExecute) execute (); -- cgit v1.3.1-4-g156e