Example #1
0
        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);
            }
        }
Example #2
0
        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);
            }
        }