[]
        
(Showing Draft Content)

C1.Win.C1Command.C1Command

C1Command Class

The base for specialized commands such as button (a plain button, the only action is invoke), submenu (points to a menu or a toolbar), textbox (text entry), list, combo etc. etc.

Implements
Namespace: C1.Win.C1Command
Assembly: C1.Win.C1Command.4.8.dll
Syntax
[TypeConverter(typeof(C1Command.TypeConverter))]
[C1Description("C1Command", "Executable command without a submenu. Base class for all commands.")]
public class C1Command : Component, IComponent, IDisposable

Constructors

Name Description
C1Command()

Initializes a new instance of the C1Command class.

Fields

Name Description
Empty

Empty command

Properties

Name Description
C1ContextMenu

Gets or sets the C1ContextMenu component associated with this command.

Category

Gets or sets the command category.

CheckAutoToggle

If true, the Checked property value is toggled automatically when this command is invoked.

Checked

Gets or sets whether the command is checked.

DropDown

Gets or sets whether the command has a drop down arrow when it is in a toolbar.

Enabled

Gets or sets whether the command is enabled.

HasInputFocus

Returns true if the command has focus and "firmly" keeps it (e.g. if it is C1CommandControl and user clicked inside the control).

Icon

Gets or sets the command icon.

Image

Gets or sets the command image.

ImageIndex

Gets or sets the index of the command image (in C1CommandHolder.ImageList).

ImageTransparentColor

Gets or sets the color to treat as transparent in a image.

IsParent

Determines whether this command is a non-empty submenu.

Mnemonic

Returns the value of the mnemonic character, or the character following the ampersand, to be used as an access key.

Name

Gets or sets the name of the command.

Owner

C1CommandHolder containing this command.

Pressed

Gets or sets whether the command is pressed.

Shortcut

Gets or sets the keyboard shortcut associated with the command.

ShortcutText

Gets or sets the shortcut text associated with the command.

ShowShortcut

Indicates whether the shortcut for this command will be shown.

ShowTextAsToolTip

Indicates whether this command's text will be shown as tooltip.

Text

Gets or sets the text of the command.

ToolTipText

Gets or sets the tool tip text.

UserData

Arbitrary data that can be associated with the command.

Visible

Gets or sets the command visibility.

Methods

Name Description

This method is for internal use only.

AssignFrom(C1Command)

Copy another command properties to this command

CheckNonEmpty()

This method is for internal use only.

Dispose(bool)

Releases the resources used by the C1Command.

InvalidateBars()

This method is for internal use only.

Invoke(ClickEventArgs)

Invokes the command.

This method is for internal use only.

OnBarPopDown()

This method is for internal use only.

OnCategoryChanged(EventArgs)

This method is for internal use only.

OnCheckedChanged(CheckedChangedEventArgs)

This method is for internal use only.

OnClick(ClickEventArgs)

This method is for internal use only.

OnCommandLinkAdded(CommandLinkEventArgs)

This method is for internal use only.

OnCommandLinkRemoved(CommandLinkEventArgs)

This method is for internal use only.

OnCommandStateQuery(CommandStateQueryEventArgs)

This method is for internal use only.

OnDropDown(DropDownEventArgs)

This method is for internal use only.

OnEnabledChanged(EventArgs)

This method is for internal use only.

OnImageChanged(EventArgs)

This method is for internal use only.

OnPressedChanged(EventArgs)

This method is for internal use only.

OnSelect(EventArgs)

This method is for internal use only.

OnShowShortcutChanged(EventArgs)

This method is for internal use only.

OnShowTextAsToolTipChanged(EventArgs)

This method is for internal use only.

OnTextChanged(EventArgs)

This method is for internal use only.

OnToolTipChanged(EventArgs)

This method is for internal use only.

OnVisibleChanged(EventArgs)

This method is for internal use only.

PerformClick()

Generates a click event for the C1Command.

PerformSelect()

Raises the Select event for the C1Command.

RefreshBars(bool)

This method is for internal use only.

This method is for internal use only.

ResetC1ContextMenu()

Restore the C1ContextMenu property to its default value.

ResetIcon()

This method is for internal use only.

ResetImage()

This method is for internal use only.

ResetImageTransparentColor()

Resets the ImageTransparentColor property to its default value.

SetBoolean(ref bool, bool)

Returns true if the change has actually been made and the control is not initializing (i.e. on change should be fired)

ShouldSerializeC1ContextMenu()

Indicates whether the C1ContextMenu has a default value.

ShouldSerializeIcon()

This method is for internal use only.

ShouldSerializeImage()

This method is for internal use only.

ShouldSerializeImageTransparentColor()

Returns true if this ImageTransparentColor property has changed; otherwise, returns false.

StateQuery()

Fires the CommandStateQuery event, updates any changed properties.

Events

Name Description
CategoryChanged

Event fired when the Category property of command is changed.

CheckedChanged

Event fired when the Checked property has changed.

Click

Event fired when the command is invoked by the user.

CommandLinkAdded

Event fired after a command link was linked to this command.

CommandLinkRemoved

Event fired after a command link was unlinked from this command.

CommandStateQuery

Event fired when the command state has to be verified.

DropDownClicked

Event fired when the drop down arrow is clicked on the toolbar button.

EnabledChanged

Event fired when the Enabled property of command is changed.

ImageChanged

Event fired when the Image or ImageIndex or Icon property of command is changed.

PressedChanged

Event fired when the Pressed property has changed.

Select

Event fired when the command is selected by the user.

ShowShortcutChanged

Event fired when the ShowShortcut property of command is changed.

ShowTextAsToolTipChanged

Event fired when the ShowTextAsToolTip property of command is changed.

TextChanged

Event fired when the Text property of command is changed.

ToolTipChanged

Event fired when the ToolTip property of command is changed.

VisibleChanged

Event fired when the Visible property of command is changed.