Class ToolWindowToggler
The base command for toggling a layout to be displayed as a tool window in the tool window area that can react to other active layouts
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands.ToolWindows
Assembly: LemonEdge.ClientCore.dll
Syntax
public abstract class ToolWindowToggler : ViewToggleCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
ToolWindowToggler(IRootController, IModelLayoutCommon)
Creates a new ToolWindowToggler
Declaration
protected ToolWindowToggler(IRootController root, IModelLayoutCommon host)
Parameters
Type | Name | Description |
---|---|---|
IRootController | root | The root controller, for service access. |
IModelLayoutCommon | host | The main form host context this command operates within |
Properties
DisplayableToolWindowItemType
The ToolWindowItem type this tool window displays
Declaration
protected abstract Type DisplayableToolWindowItemType { get; }
Property Value
Type | Description |
---|---|
Type |
OverlayIconID
On some clients another image can be overlayed on the bottom right of the main icon (for indicating add, remove, etc)
This optional overlay image can be specified here, either a ImageType or ImageID
Declaration
public override Guid? OverlayIconID { get; }
Property Value
Type | Description |
---|---|
Guid? |
Overrides
SubscribeToLayoutChange
True - Indicates a tool window command will respond to the changes of the active layout as a tool window item typically works against the active layout
Declaration
protected override bool SubscribeToLayoutChange { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
CreateDisplayableItem(IModelLayoutDisplayer)
Returns a new instance of the DisplayableToolWindowItemType type for display against the given active layout
Declaration
protected abstract ToolWindowItem CreateDisplayableItem(IModelLayoutDisplayer activeLayout)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutDisplayer | activeLayout | The current active layout for this toolw window to display an item against |
Returns
Type | Description |
---|---|
ToolWindowItem | A new instance of the DisplayableToolWindowItemType type for display against the given active layout |
InternalCanExecute(object)
By default this tool window command can only be executed if the current active layout is not null
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | The command parameter |
Returns
Type | Description |
---|---|
bool | True if the current active layout is not null |
Overrides
InternalExecuteAsync(object)
Toggles between making the toolwindow visible and hidden
Declaration
public override Task InternalExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | The command parameter |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
OnLayoutsChanged(IModelLayoutHost, LayoutChangeEventArgs)
Updates the toggler for this command when the layouts have changed
Declaration
protected override void OnLayoutsChanged(IModelLayoutHost sender, LayoutChangeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutHost | sender | The main form context that has had layouts change within it |
LayoutChangeEventArgs | e | The type of layout change |