public override void Initialize() { base.Initialize(); List <Add.Base> adds = new List <Add.Base> (); List <Remove.Base> removes = new List <Remove.Base> (); List <List.Base> lists = new List <List.Base> (); for (int i = 0; i < (int)AutoCommands.Event.Count; i++) { AutoCommands.Event eve = ((AutoCommands.Event)i); string name = eve.ToString().ToLower(); adds.Add(new Add.Base(name, eve)); removes.Add(new Remove.Base(name, eve)); lists.Add(new List.Base(name, eve)); } Add addSet = new Add(); Remove removeSet = new Remove(); List listSet = new List(); AddProceduralCommands(addSet); AddProceduralCommands(removeSet); AddProceduralCommands(listSet); addSet.AddProceduralCommands(adds.ToArray()); removeSet.AddProceduralCommands(removes.ToArray()); listSet.AddProceduralCommands(lists.ToArray()); // This could all be done in a loop I guess. }
public Base(string name, AutoCommands.Event _eve) { command = name; shortHelp = "List chains in " + name; eve = _eve; AddOverload(typeof(string), "Lists all chains in the " + name + " autoc event."); }
public Base(string name, AutoCommands.Event _eve) { command = name; shortHelp = "Remove chain from " + name; eve = _eve; AddOverload(typeof(bool), "Remove a chain command from the " + name + " autoc event, given by name."); }
public Base(string name, AutoCommands.Event _eve) { command = name; shortHelp = "Add a chain to " + name; eve = _eve; AddOverload(typeof(AutoCommands.Autoc), "Autoc event arguments: " + AutoCommands.args[(int)eve]); //AddOverload (typeof (AutoCommands.Autoc), "Add an already existing command chain to the " + name + " autoc event."); }