void EditLabelButton_Click(object sender, EventArgs e) { try { if (LabelsListBox.SelectedIndex != -1) { LabelPrinting currentLabel; LabelingView labeling; currentLabel = __Configuration.Labels [LabelsListBox.SelectedIndex]; labeling = new LabelingView( ); labeling.SetLabel(currentLabel, new long[] { DicomTag.PatientName, DicomTag.PatientSex, DicomTag.PatientAge, DicomTag.PatientBirthDate, DicomTag.ReferringPhysicianName }); if (labeling.ShowDialog( ) == DialogResult.OK) { RefreshLabel(LabelsListBox.SelectedIndex); UpdateUpDownButtonState( ); OnChanged( ); } } } catch (Exception exception) { Messager.ShowError(this, exception); } }
void AddLabelButton_Click(object sender, EventArgs e) { try { LabelPrinting newLabel; LabelingView labeling; newLabel = new LabelPrinting( ); labeling = new LabelingView( ); labeling.SetLabel(newLabel, new long[] { DicomTag.PatientName, DicomTag.PatientSex, DicomTag.PatientAge, DicomTag.PatientBirthDate, DicomTag.ReferringPhysicianName }); if (labeling.ShowDialog( ) == DialogResult.OK) { AddLabel(newLabel); UpdateUpDownButtonState( ); OnChanged( ); } } catch (Exception exception) { Messager.ShowError(this, exception); } }