public static void InitFunctions() { NomadCodeBox.s_functions.Clear(); for (int i = 0; i < Wilderness.NumFunctions; i++) { Wilderness.FunctionDef function = Wilderness.GetFunction(i); NomadCodeBox.s_functions.Add(function.Name, function); } }
private void InitContextMenuFunctions() { this.insertFunctionToolStripMenuItem.DropDownItems.Clear(); SortedList <string, Wilderness.FunctionDef> sortedList = new SortedList <string, Wilderness.FunctionDef>(); for (int i = 0; i < Wilderness.NumFunctions; i++) { Wilderness.FunctionDef function = Wilderness.GetFunction(i); sortedList.Add(function.Name, function); } foreach (string current in sortedList.Keys) { ToolStripMenuItem value = new ToolStripMenuItem(current, null, new EventHandler(this.functionToolStripMenuItem_Click)); this.insertFunctionToolStripMenuItem.DropDownItems.Add(value); } }
public void Setup(Wilderness.FunctionDef function) { this.prototypeLabel.Text = function.Prototype; this.descriptionLabel.Text = function.Description; }