public override object DropData() { Dictionary <Guid, Guid> guidDictionary = new Dictionary <Guid, Guid>(); TECTypical outSystem = new TECTypical(this, guidDictionary); ModelLinkingHelper.LinkSystem(outSystem, guidDictionary); return(outSystem); }
public TECTypical(TECTypical source, Dictionary <Guid, Guid> guidDictionary = null, ObservableListDictionary <ITECObject> characteristicReference = null) : this() { if (guidDictionary != null) { guidDictionary[_guid] = source.Guid; } foreach (TECEquipment equipment in source.Equipment) { var toAdd = new TECEquipment(equipment, guidDictionary, characteristicReference); if (characteristicReference != null) { characteristicReference.AddItem(equipment, toAdd); } Equipment.Add(toAdd); } foreach (TECController controller in source.Controllers) { var toAdd = controller.CopyController(guidDictionary); if (characteristicReference != null) { characteristicReference.AddItem(controller, toAdd); } AddController(toAdd); } foreach (TECPanel panel in source.Panels) { var toAdd = new TECPanel(panel, guidDictionary); if (characteristicReference != null) { characteristicReference.AddItem(panel, toAdd); } Panels.Add(toAdd); } foreach (TECMisc misc in source.MiscCosts) { var toAdd = new TECMisc(misc); MiscCosts.Add(toAdd); } foreach (TECScopeBranch branch in source.ScopeBranches) { var toAdd = new TECScopeBranch(branch); ScopeBranches.Add(toAdd); } copyPropertiesFromLocated(source); }