private void VerifyElement(ProjectElement element) { if ((element != Element) && (element.DocumentInfo.Type != ProjectElement.ElementType.FOLDER)) { var dependencies = Element.DocumentInfo.Project.GetDependencies(element); FileDependency.DependencyInfo depInfo = Element.ForcedDependency.FindDependency(element.DocumentInfo.Project.Settings.Name, element.Filename); if (depInfo == null) { depInfo = new FileDependency.DependencyInfo(element.DocumentInfo.Project.Settings.Name, element.Filename, false, false); } bool isDependent = false; foreach (var dependency in dependencies) { if (dependency.Filename == Element.Filename) { isDependent = true; break; } } if (!isDependent) { // not itself! DependencyItem depItem = new DependencyItem(depInfo, element.DocumentInfo.Type == ProjectElement.ElementType.ASM_SOURCE); ListViewItem item = new ListViewItem(element.DocumentInfo.Project.Settings.Name); item.SubItems.Add(element.Filename); if (Element.ForcedDependency.DependsOn(element.DocumentInfo.Project.Settings.Name, element.Filename)) { item.SubItems.Add("1"); } else { item.SubItems.Add("0"); } if (depInfo.IncludeSymbols) { item.SubItems.Add("1"); } else { item.SubItems.Add("0"); } item.Tag = depItem; listDependencies.Items.Add(item); } } }
public DependencyItem(FileDependency.DependencyInfo Info, bool CanIncludeSymbols) { DependencyInfo = Info; this.CanIncludeSymbols = CanIncludeSymbols; }
public PropCompileTarget(ProjectElement Element, StudioCore Core) { this.Element = Element; this.Core = Core; TopLevel = false; Text = "Compile Target"; InitializeComponent(); comboTargetType.Items.Add("None"); comboTargetType.Items.Add("Plain"); comboTargetType.Items.Add("PRG (cbm)"); comboTargetType.Items.Add("T64"); comboTargetType.Items.Add("8 KB Cartridge (bin)"); comboTargetType.Items.Add("8 KB Cartridge (crt)"); comboTargetType.Items.Add("16 KB Cartridge (bin)"); comboTargetType.Items.Add("16 KB Cartridge (crt)"); comboTargetType.Items.Add("D64"); comboTargetType.Items.Add("Magic Desk 64 KB Cartridge (bin)"); comboTargetType.Items.Add("Magic Desk 64 KB Cartridge (crt)"); comboTargetType.Items.Add("TAP"); comboTargetType.Items.Add("Easyflash Cartridge (bin)"); comboTargetType.Items.Add("Easyflash Cartridge (crt)"); comboTargetType.Items.Add("RGCD 64 KB Cartridge (bin)"); comboTargetType.Items.Add("RGCD 64 KB Cartridge (crt)"); comboTargetType.SelectedIndex = (int)Element.TargetType; editTargetFilename.Text = Element.TargetFilename; foreach (ProjectElement element in Element.DocumentInfo.Project.Elements) { if ((element != Element) && (element.DocumentInfo.Type != ProjectElement.ElementType.FOLDER)) { var dependencies = Element.DocumentInfo.Project.GetDependencies(element); FileDependency.DependencyInfo depInfo = Element.ForcedDependency.FindDependency(element.Filename); if (depInfo == null) { depInfo = new FileDependency.DependencyInfo(element.Filename, false, false); } bool isDependent = false; foreach (var dependency in dependencies) { if (dependency.Filename == Element.Filename) { isDependent = true; break; } } if (!isDependent) { // not itself! DependencyItem depItem = new DependencyItem(depInfo, element.DocumentInfo.Type == ProjectElement.ElementType.ASM_SOURCE); ListViewItem item = new ListViewItem(element.Filename); if (Element.ForcedDependency.DependsOn(element.Filename)) { item.SubItems.Add("1"); } else { item.SubItems.Add("0"); } if (depInfo.IncludeSymbols) { item.SubItems.Add("1"); } else { item.SubItems.Add("0"); } item.Tag = depItem; listDependencies.Items.Add(item); } } } }