C# Class CardMaker.Events.Managers.ElementManager

Handles Element related communication between components
Show file Open project: nhmkdev/cardmaker Class Usage Examples

Public Methods

Method Description
ConfigureUserAction ( Rectangle>.Dictionary dictionarySelectedUndo, Rectangle>.Dictionary dictionarySelectedRedo ) : void

Adds a new user action based on the undo/redo collections of elements -> rectangles

ElementManager ( ) : System
FireElementBoundsUpdateEvent ( ) : void

Fired when the Element bounds have been updated (of those currently selected)

FireElementSelectRequestedEvent ( ProjectLayoutElement zElement ) : void

Fires the ElementSelectRequested event

FireElementSelectedEvent ( List listElements ) : void

Fires the ElementSelected event after setting the element selection

GetSelectedElement ( ) : ProjectLayoutElement

Returns the first of the selected elements

GetUndoRedoPoints ( ) : Rectangle>.Dictionary

Creates a collection of rectangles based on the selected list of elements

ProcessSelectedElementsChange ( int nX, int nY, int nWidth, int nHeight, decimal dScaleWidth = 1, decimal dScaleHeight = 1 ) : void

Adjusts the selected elements based on the passed in parameters

Private Methods

Method Description
Project_Opened ( object sender, CardMaker.Events.Args.ProjectEventArgs projectEventArgs ) : void

Method Details

ConfigureUserAction() public method

Adds a new user action based on the undo/redo collections of elements -> rectangles
public ConfigureUserAction ( Rectangle>.Dictionary dictionarySelectedUndo, Rectangle>.Dictionary dictionarySelectedRedo ) : void
dictionarySelectedUndo Rectangle>.Dictionary The undo collection of rectangles
dictionarySelectedRedo Rectangle>.Dictionary The redo collection of rectangles
return void

ElementManager() public method

public ElementManager ( ) : System
return System

FireElementBoundsUpdateEvent() public method

Fired when the Element bounds have been updated (of those currently selected)
public FireElementBoundsUpdateEvent ( ) : void
return void

FireElementSelectRequestedEvent() public method

Fires the ElementSelectRequested event
public FireElementSelectRequestedEvent ( ProjectLayoutElement zElement ) : void
zElement CardMaker.XML.ProjectLayoutElement The element to select
return void

FireElementSelectedEvent() public method

Fires the ElementSelected event after setting the element selection
public FireElementSelectedEvent ( List listElements ) : void
listElements List The elements to indicate as selected
return void

GetSelectedElement() public method

Returns the first of the selected elements
public GetSelectedElement ( ) : ProjectLayoutElement
return CardMaker.XML.ProjectLayoutElement

GetUndoRedoPoints() public method

Creates a collection of rectangles based on the selected list of elements
public GetUndoRedoPoints ( ) : Rectangle>.Dictionary
return Rectangle>.Dictionary

ProcessSelectedElementsChange() public method

Adjusts the selected elements based on the passed in parameters
public ProcessSelectedElementsChange ( int nX, int nY, int nWidth, int nHeight, decimal dScaleWidth = 1, decimal dScaleHeight = 1 ) : void
nX int x adjustment
nY int y adjustment
nWidth int width adjustment
nHeight int height adjustment
dScaleWidth decimal width scale
dScaleHeight decimal height scale
return void