public PackageContext(Package package, string outputPath, List<InputResult> inputResults) { if (package == null) throw new ArgumentNullException("package"); this.Package = package; this.OutputPath = outputPath; this.InputResults = inputResults; }
private void MergeWith(Package otherPackage) { if (otherPackage != null) { this.Manifest.Items.InsertRange(0, otherPackage.Manifest.Items.Where(oa => !this.Manifest.Items.Any(a => a.Equals(oa)))); this.Inputs.InsertRange(0, otherPackage.Inputs.Where(oa => !this.Inputs.Any(a => a.Equals(oa)))); this.Actions.InsertRange(0, otherPackage.Actions.Where(oa => !this.Actions.Any(a => a.Equals(oa)))); } }
public void OpenPackage(Package package) { this.Package = Package.Open(package.GetAbsolutePath(this.RelativePath)); }
private void packageListView_SelectedIndexChanged(object sender, EventArgs e) { if (!packageListView.SelectedItems.IsNullOrEmpty()) { ListViewItem selectedItem = packageListView.SelectedItems[0]; nextButton.Enabled = false; if (selectedItem == _emptyProjectListViewItem) { packageDescriptionLabel.Text = "Choose this option to create a new, empty project."; nextButton.Text = "&OK"; nextButton.Enabled = true; } else if (selectedItem == _loadPackageListViewItem) packageDescriptionLabel.Text = "Double-click this option to load a package which isn't already in the list."; else { _selectedPackage = (Package)packageListView.SelectedItems[0].Tag; packageDescriptionLabel.Text = _selectedPackage.Description; nextButton.Text = "&Next"; nextButton.Enabled = true; } } else packageDescriptionLabel.Text = _noPackageSelectedText; }