private void FillStudRefDetails(PartCullingModel model) { SetStudRefVisibility(model != null); StudRefGridView.DataSource = null; if (model == null) { return; } UpdateStudConnectorList(); StudRefGridView.DataSource = model.GetStudReferences().ToList(); AdjStudColumn.Visible = model != null && model.ComponentType == ModelComponentType.BrickTube; }
protected override void DeserializePartCullingModel(PartCullingModel partCullingModel, XElement element) { DeserializeBaseElement(partCullingModel, element); partCullingModel.LegacyConnectionID = element.ReadAttribute("ConnectionID", string.Empty); partCullingModel.ReferencedStuds.Clear(); if (element.HasElement(nameof(PartCullingModel.ReferencedStuds), out XElement studsElem)) { foreach (var studElem in studsElem.Elements(StudReference.NODE_NAME)) { var studRef = StudReference.FromXml(studElem); if (!string.IsNullOrEmpty(partCullingModel.LegacyConnectionID)) { studRef.ConnectionID = partCullingModel.LegacyConnectionID; } partCullingModel.ReferencedStuds.Add(studRef); } } }
protected abstract void DeserializePartCullingModel(PartCullingModel partCullingModel, XElement element);