public ShowWorkbenchPreset(Genus2D.GameData.EventCommand command) { InitializeComponent(); _command = command; for (int i = 0; i < CraftableData.GetWorkbenchDataCount(); i++) { WorkbenchSelectionBox.Items.Add(CraftableData.GetWorkbench(i)); } int workbenchID = (int)command.GetParameter("WorkbenchID"); if (workbenchID < WorkbenchSelectionBox.Items.Count) { WorkbenchSelectionBox.SelectedIndex = workbenchID; } }
public void AddEventCommand(EventCommand command) { EventCommands.Add(command); }