-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The Buttons in StartMenu() are created hard coded for testing purposes.
The plan is to have a configuration file (XML / JSON), which holds the StartMenuEntries (NIY) in a maintainable format.
Each entry should have at least the following attributes assigned to it:
[String]Text[String]Action[Int]Slot[Int]TabIndex (Slot() + 2)[Bool]CreateNewInstance (Indicates, ifActionis a new Process or aScriptBlock)
Current favorite is XML.
These Buttons are injected either at initialization, or through a lambda in $menuForm.Add_Load({}), where the menu itself would parse the configuration. I think a injection would fit best, as I want to add configuration support to more routines, not only this one.
Idea: Two seperate Event Handlers listening for Button.Click. One performs the defined action, the other hides the menu. Currently, we are using one Handler, performing both actions sequental. Check if that would increase performance.