public PrivateNetworkPrerequisite(PrivateNetworkTaskSubCommand privateNetworkTaskSubCommand) : base ( title: Resources.PrivateNetworkTitle, successMessage: Resources.PrivateNetworkSuccess, errorMessage: Resources.PrivateNetworkError, resolveText: Resources.PrivateNetworkResolve, configureText: Resources.PrivateNetworkConfigure ) { _privateNetworkTaskSubCommand = privateNetworkTaskSubCommand; SubCommands.Add(_privateNetworkTaskSubCommand); }
public NewNetNatPrerequisite(NewNetIpAddressTaskSubCommand newNetIpAddressTaskSubCommand) : base ( title: Resources.NewNatName, successMessage: Resources.NewNetSuccess, errorMessage: Resources.NewNetError, resolveText: Resources.NewNatResolve, configureText: Resources.NewNatConfigure ) { _newNetIpAddressTaskSubCommand = newNetIpAddressTaskSubCommand; SubCommands.Add(_newNetIpAddressTaskSubCommand); }
public MyCommand(TimerForm form) { this.form = form; SubCommands.Add("quit", () => { form.canclose = true; form.Close(); Application.Exit(); }); SubCommands.Add(WORK_COMMAND, new timeCommand(form, true)); SubCommands.Add(BREAK_COMMAND, new timeCommand(form, false)); SubCommands.Add(PAUSE_COMMAND, form.icon.Pause); }
public ServerConfigurationPrerequisite( OpenServerConfigDirectorySubCommand openServerConfigDirectorySubCommand, ChangeServerConfigDirectorySubCommand changeServerConfigDirectorySubCommand) : base ( title: Resources.ServerConfiguration, successMessage: Resources.ServerConfigurationSuccessMessage, errorMessage: Resources.ServerConfigurationMissingErrorMessage, resolveText: Resources.ServerConfigurationConfigureText, configureText: Resources.ServerConfigurationConfigureText ) { SubCommands.Add(openServerConfigDirectorySubCommand); SubCommands.Add(changeServerConfigDirectorySubCommand); }
public ClientConfigurationsPrerequisite( OpenClientConfigDirectorySubCommand openClientConfigDirectorySubCommand, ChangeClientConfigDirectorySubCommand changeClientConfigDirectorySubCommand) : base ( title: Resources.ClientConfigurations, successMessage: Resources.ClientConfigurationsSuccessMessage, errorMessage: Resources.ClientConfigurationsMissingErrorMessage, resolveText: Resources.ClientConfigurationsResolveText, configureText: Resources.ClientConfigurationsResolveText ) { SubCommands.Add(openClientConfigDirectorySubCommand); SubCommands.Add(changeClientConfigDirectorySubCommand); }
public AlarmCommand(PluginInitContext context, CommandHandlerBase parent) : base(context, parent) { SubCommands.Add(new AlarmAddCommand(context, this)); SubCommands.Add(new AlarmTimerCommand(context, this)); SubCommands.Add(new AlarmListCommand(context, this)); SubCommands.Add(new AlarmEditCommand(context, this)); SubCommands.Add(new AlarmDeleteCommand(context, this)); SubCommands.Add(new AlarmStopwatchCommand(context, this)); System.Timers.Timer alarmTimer = new System.Timers.Timer(5000); alarmTimer.Elapsed += AlarmTimer_Elapsed; alarmTimer.Start(); }
public Command WithSubCommand(Command sub) { if (HasArguments) { throw new InvalidOperationException("A command cannot have both arguments and sub-commands"); } if (SubCommands == null) { SubCommands = new List <Command>(); } sub._AllowAnonymous = this._AllowAnonymous; // Inherit property. sub.Parent = this; // Store referencee to parent. SubCommands.Add(sub); NumSubCommands++; return(this); }
public void AddSubCommand(ScriptCommand scriptCommand) { SubCommands.Add(scriptCommand); scriptCommand.ParentCommand = this; }