Interface IMainFormController
Inherited Members
Namespace: LemonEdge.Client.UI.API.Controllers
Assembly: LemonEdge.Client.UI.API.dll
Syntax
public interface IMainFormController : IModelLayoutHostController, IController
Properties
MenuWithoutDuplicatedOnAllMenuItems
Returns a list of all main menu items and their associated Command object that can be used in the client ui application
If duplicateActivateOnAllMenuItems
is true then it is still only returned once, this method
does not copy it for each menu. Use Menu(bool) for that.
Declaration
IEnumerable<MenuItemCommand> MenuWithoutDuplicatedOnAllMenuItems { get; }
Property Value
Type | Description |
---|---|
IEnumerable<MenuItemCommand> |
Methods
ActivateOnLoadItems(IEnumerable<MenuItemCommand>)
Declaration
void ActivateOnLoadItems(IEnumerable<MenuItemCommand> allMenuItems)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<MenuItemCommand> | allMenuItems |
Close(bool)
Closes the main application. If there are any open contexts with unsaved changes then
promptSaveChanges
indicates if the user should be prompted to save them before closing
Declaration
Task<bool> Close(bool promptSaveChanges = false)
Parameters
Type | Name | Description |
---|---|---|
bool | promptSaveChanges | Indicates if there are any unsaved changes the user is given the option to save them first before closing, or to cancel the close. If false the system will close loosing any unsaved changes. |
Returns
Type | Description |
---|---|
Task<bool> | A task indicating if the close was succesful. False if there were changes and the user decided to cancel closing the application. |
CloseLayout(IModelLayoutDisplayer, bool)
Closes the specified layout, removes it from the LemonEdge.Client.Core.Views.Core.ModelLayoutHostController.Displayer, disposes of it and return true if the layout was removed
If silent
is false, and the layout has pending changes within its context then this will first prompt the user to continue, save or cancel. If the user selects cancel or
the save fails then false is returned.
Declaration
Task<bool> CloseLayout(IModelLayoutDisplayer layout, bool silent = false)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutDisplayer | layout | The layout to be closed, and removed from the LemonEdge.Client.Core.Views.Core.ModelLayoutHostController.Displayer |
bool | silent | If true means any pending changes should be ignored and disposed. If false and the layout has pending changes then it will prompt the user what to do before closing the layout |
Returns
Type | Description |
---|---|
Task<bool> | True if the layout was closed, or false if the user cancelled or a save failed |
CreateDuplicateActivateOnAllMenusCommands()
Returns a list of each main menu item and a new actual Command object if the item is marked as ActiveOnAllMenus
Declaration
Task<IEnumerable<MenuItemCommand>> CreateDuplicateActivateOnAllMenusCommands()
Returns
Type | Description |
---|---|
Task<IEnumerable<MenuItemCommand>> | A list of each main menu item and a new actual Command object if the item is marked as ActiveOnAllMenus |
Menu(bool)
Returns a list of all main menu items and their associated Command object that can be used in the client ui application
If duplicateActivateOnAllMenuItems
is true then each item marked as
ActiveOnAllMenus is copied for each main menu with a new associated
Command object too.
Declaration
IEnumerable<MenuItemCommand> Menu(bool duplicateActivateOnAllMenuItems)
Parameters
Type | Name | Description |
---|---|---|
bool | duplicateActivateOnAllMenuItems | Indicates that for each item marked as ActiveOnAllMenus the returned list should contain it copied into each main menu |
Returns
Type | Description |
---|---|
IEnumerable<MenuItemCommand> | A list of all main menu items and their associated Command object that can be used in the client ui application |