aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Command.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-02-03 06:38:35 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-02-03 06:38:35 +0100
commit15abb01100d6c25a4a404538850881bad1ce86ea (patch)
tree0312f02171cbbadc412115da267725d7b623aaf1 /src/Command.cs
parent0f0cb8dcc87bda217a405e9899ef6ccf1eaf6ac0 (diff)
:book: use own compiled opentk and remove nuget config
Diffstat (limited to 'src/Command.cs')
-rw-r--r--src/Command.cs19
1 files changed, 19 insertions, 0 deletions
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
{
+ /// <summary>
+ /// helper class to bind in one step icon, caption, action, and validity tests to a controls
+ /// </summary>
public class Command : IValueChange
{
#region IValueChange implementation
@@ -41,6 +44,10 @@ namespace Crow
#endregion
#region CTOR
+ /// <summary>
+ /// Initializes a new instance of Command with the action pass as argument.
+ /// </summary>
+ /// <param name="_executeAction">action to excecute when command is triggered</param>
public Command (Action _executeAction)
{
execute = _executeAction;
@@ -54,6 +61,9 @@ namespace Crow
bool canExecute = true;
#region Public properties
+ /// <summary>
+ /// if true, action defined in this command may be executed,
+ /// </summary>
[XmlAttributeAttribute][DefaultValue(true)]
public virtual bool CanExecute {
get { return canExecute; }
@@ -64,6 +74,9 @@ namespace Crow
NotifyValueChanged ("CanExecute", canExecute);
}
}
+ /// <summary>
+ /// label to display in the bound control
+ /// </summary>
[XmlAttributeAttribute][DefaultValue("Unamed Command")]
public virtual string Caption {
get { return caption; }
@@ -75,6 +88,9 @@ namespace Crow
}
}
+ /// <summary>
+ /// Icon to display in the bound control
+ /// </summary>
[XmlAttributeAttribute]
public Picture Icon {
get { return icon; }
@@ -87,6 +103,9 @@ namespace Crow
}
#endregion
+ /// <summary>
+ /// trigger the execution of the command
+ /// </summary>
public void Execute(){
if (execute != null && CanExecute)
execute ();