public void Setup()
    {
        var type = DefinitionCacheItemType.Script;
            var commands = new List<DefinitionCacheItem>();
            commands.Add(new DefinitionCacheItem(_parameterAppender) {
                    Type = type, Location = "", Updated = DateTime.Now, Required = true, Name = "Option1", Description = "Opt1 desc"
                });
            commands[0].Append(type, "", DateTime.Now, false, true, "opt1sub1", "desc");

            commands.Add(new DefinitionCacheItem(_parameterAppender) {
                    Type = type, Location = "", Updated = DateTime.Now, Required = true, Name = "Option2", Description = "Opt2 desc"
                });
            commands[1].Append(type, "", DateTime.Now, false, true, "opt2sub1", "desc");
            commands[1].Append(type, "", DateTime.Now, false, true, "opt2sub2", "desc");

            _builder = new CommandBuilder(commands);
            initialize();
    }
Esempio n. 2
0
 public RunCommandForm(string directory, string additionalParameters, CommandBuilder builder)
 {
     InitializeComponent();
     _directory = directory;
     _additionalParameters = additionalParameters;
     if (_additionalParameters == null)
         _additionalParameters = "";
     _builder = builder;
     listOptions();
     if (informationList.Items.Count > 0)
         informationList.Items[0].Selected = true;
     Text = "Running command from " + _directory;
     labelInfo.Text = "Already selected parameters: " + additionalParameters;
     if (additionalParameters != null && additionalParameters.Length > 0)
     {
         textBoxSearch.Text = additionalParameters + " ";
         textBoxSearch.SelectionStart = textBoxSearch.Text.Length;
         textBoxSearch_TextChanged(this, new EventArgs());
     }
 }