예제 #1
0
 void _DicomGrid_BeforeAddElement(object sender, BeforeAddElementEventArgs e)
 {
     if (e.Element.DicomElement.Tag == DicomTag.PixelData)
     {
         e.Cancel = true;
     }
 }
예제 #2
0
 void OnBeforeElementAdd(object sender, BeforeAddElementEventArgs e)
 {
     if (OnCheckProperty != null)
     {
         OnCheckProperty(e);
     }
 }
예제 #3
0
 private void dicomPropertyGrid_BeforeAddElement(object sender, BeforeAddElementEventArgs e)
 {
     try
     {
         e.Element.Attributes.Add(new DisplayNameAttribute("Value"));
     }
     catch (Exception exception)
     {
         Messager.ShowError(this, exception);
     }
 }
예제 #4
0
        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));
                }
            }
        }
예제 #5
0
 void _EditableDicom_BeforeAddElement(object sender, BeforeAddElementEventArgs e)
 {
     e.Element.Attributes.Add(new ReadOnlyAttribute(true));
 }