Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
            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);
            }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
 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();
        }
Esempio n. 7
0
 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);
 }
Esempio n. 8
0
 public void AddSubCommand(ScriptCommand scriptCommand)
 {
     SubCommands.Add(scriptCommand);
     scriptCommand.ParentCommand = this;
 }