void _DicomGrid_BeforeAddElement(object sender, BeforeAddElementEventArgs e) { if (e.Element.DicomElement.Tag == DicomTag.PixelData) { e.Cancel = true; } }
void OnBeforeElementAdd(object sender, BeforeAddElementEventArgs e) { if (OnCheckProperty != null) { OnCheckProperty(e); } }
private void dicomPropertyGrid_BeforeAddElement(object sender, BeforeAddElementEventArgs e) { try { e.Element.Attributes.Add(new DisplayNameAttribute("Value")); } catch (Exception exception) { Messager.ShowError(this, exception); } }
private void propertyGridDataSet_BeforeAddElement(object sender, BeforeAddElementEventArgs e) { if (CellHasImage()) { if (e.Element.DicomElement.Tag == DicomTag.PatientID && e.Element.Value != null) { SetUserTag(0, MedicalViewerTagAlignment.TopLeft, "PID: " + e.Element.Value); } if (e.Element.DicomElement.Tag == DicomTag.PatientName && e.Element.Value != null) { SetUserTag(1, MedicalViewerTagAlignment.TopLeft, e.Element.Value); } } if (_DataSet != null) { if (_DataSet.IsVolatileElement(e.Element.DicomElement)) { e.Element.Attributes.Add(new ReadOnlyAttribute(true)); } } }
void _EditableDicom_BeforeAddElement(object sender, BeforeAddElementEventArgs e) { e.Element.Attributes.Add(new ReadOnlyAttribute(true)); }