public void OnEditCommandButtonPressed(UICommandElement uiCommandElement, GameConfigButtonDescriptor commandDescriptor) { UIUtils.ShutDownWindowSafe(ref _windowAddSingleCommand); UIUtils.ShutDownWindowSafe(ref _windowAddExposedCommand); UIUtils.ShutDownWindowSafe(ref _windowAddSequenceCommand); if (commandDescriptor._type == GameConfigButtonDescriptor.Etype.FixedArgument) { _windowAddSingleCommand = new WindowAddSingleCommand(this, uiCommandElement, commandDescriptor); MoveWindowToWindowPos(_windowAddSingleCommand); _windowAddSingleCommand.Show(); } else if (commandDescriptor._type == GameConfigButtonDescriptor.Etype.ExposedArgument) { _windowAddExposedCommand = new WindowAddExposedCommand(this, uiCommandElement, commandDescriptor); MoveWindowToWindowPos(_windowAddExposedCommand); _windowAddExposedCommand.Show(); } else if (commandDescriptor._type == GameConfigButtonDescriptor.Etype.MultiCommand) { _windowAddSequenceCommand = new WindowAddSequenceCommand(this, uiCommandElement, commandDescriptor); MoveWindowToWindowPos(_windowAddSequenceCommand); _windowAddSequenceCommand.Show(); } }
public void OnMenuAddNewCommandButtonPress(object sender, EventArgs e, GameConfigButtonDescriptor.Etype type, int sectionIndex) { UIUtils.ShutDownWindowSafe(ref _windowAddSingleCommand); UIUtils.ShutDownWindowSafe(ref _windowAddExposedCommand); UIUtils.ShutDownWindowSafe(ref _windowAddSequenceCommand); if (type == GameConfigButtonDescriptor.Etype.FixedArgument) { _windowAddSingleCommand = new WindowAddSingleCommand(this, sectionIndex); MoveWindowToWindowPos(_windowAddSingleCommand); _windowAddSingleCommand.Show(); } else if (type == GameConfigButtonDescriptor.Etype.ExposedArgument) { _windowAddExposedCommand = new WindowAddExposedCommand(this, sectionIndex); MoveWindowToWindowPos(_windowAddExposedCommand); _windowAddExposedCommand.Show(); } else if (type == GameConfigButtonDescriptor.Etype.MultiCommand) { _windowAddSequenceCommand = new WindowAddSequenceCommand(this, sectionIndex); MoveWindowToWindowPos(_windowAddSequenceCommand); _windowAddSequenceCommand.Show(); } }