bool ITypicalable.ContainsChildForProperty(string property, ITECObject item) { if (property == "Controllers" && item is TECController controller) { return(Controllers.Contains(controller)); } else if (property == "Equipment" && item is TECEquipment equipment) { return(Equipment.Contains(equipment)); } else if (property == "Panels" && item is TECPanel panel) { return(Panels.Contains(panel)); } else if (property == "MiscCosts" && item is TECMisc misc) { return(MiscCosts.Contains(misc)); } else if (property == "ScopeBranch" && item is TECScopeBranch branch) { return(ScopeBranches.Contains(branch)); } else if (property == "ProposalItems" && item is TECProposalItem propItem) { return(ProposalItems.Contains(propItem)); } else { return(this.ContainsChildForScopeProperty(property, item)); } }
///********************************************************************************** /// <summary> /// Removes a panel from the collection /// </summary> /// /// <param name="panel"> /// The panel to remove /// </param> ///********************************************************************************** public void Remove(Panel panel) { if (Panels.Contains(panel)) { TotalPrice -= panel.Price; TotalQuantity -= panel.Quantity; Panels.Remove(panel); } }