Skip to content

Instantly share code, notes, and snippets.

@andreaGhisa
Created July 26, 2018 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreaGhisa/2b0cf53eec00b462272f7558b6807ce0 to your computer and use it in GitHub Desktop.
Save andreaGhisa/2b0cf53eec00b462272f7558b6807ce0 to your computer and use it in GitHub Desktop.
IStudioNotificationCommand
public class InSourceCommand : IStudioNotificationCommand
{
private readonly Action action;
public InSourceCommand(Action action)
{
this.action = action;
}
public event EventHandler CanExecuteChanged;
public bool CanExecute(object parameter)
{
return true;
}
public void Execute(object parameter)
{
action();
}
public string CommandText { get; set; }
public string CommandToolTip { get; set; }
public Icon CommandIcon { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment