public BuildStepWindow(BuildStep InTask, List<string> InTargetNames, string InBaseDirectory, IReadOnlyDictionary<string, string> InVariables) { Step = InTask; TargetNames = InTargetNames; BaseDirectoryPrefix = Path.GetFullPath(InBaseDirectory) + Path.DirectorySeparatorChar; Variables = InVariables; InitializeComponent(); }
void AddTask(BuildStep Task) { ListViewItem Item = new ListViewItem(Task.Description); Item.Tag = Task; Item.SubItems.Add(new ListViewItem.ListViewSubItem()); Item.SubItems.Add(new ListViewItem.ListViewSubItem()); Item.SubItems.Add(new ListViewItem.ListViewSubItem()); BuildStepList.Items.Add(Item); }
private void NewStepButton_Click(object sender, EventArgs e) { BuildStep NewStep = new BuildStep(Guid.NewGuid(), BuildStepList.Items.Count, "Untitled Step", "Running Untitled Step...", 1, null, null, null, null, true); NewStep.Description = "Untitled Task"; NewStep.EstimatedDuration = 1; BuildStepWindow NewStepWindow = new BuildStepWindow(NewStep, TargetNames, BaseDirectory, Variables); if(NewStepWindow.ShowDialog() == DialogResult.OK) { AddTask(NewStep); } }