Table of Contents

Method AddCommand

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

AddCommand(Command, CommandImplementation)

Sets the function that will be invoked for a Command. Views should call AddCommand for each command they support.

If AddCommand has already been called for commandimpl will replace the old one.

protected void AddCommand(Command command, View.CommandImplementation impl)

Parameters

command Command

The command.

impl View.CommandImplementation

The delegate.

Remarks

This version of AddCommand is for commands that require CommandContext.

AddCommand(Command, Func<bool?>)

Sets the function that will be invoked for a Command. Views should call AddCommand for each command they support.

If AddCommand has already been called for commandimpl will replace the old one.

protected void AddCommand(Command command, Func<bool?> impl)

Parameters

command Command

The command.

impl Func<bool?>

The delegate.

Remarks

This version of AddCommand is for commands that do not require a CommandContext. If the command requires context, use AddCommand(Command, CommandImplementation)