Esempio n. 1
0
        protected virtual void OnStatusUpdate(string info)
        {
            ExecutionStatusInfo = info;

            if (Status != PrintStatus.Failure)
            {
                LogManager.Instance.Info("Print Job {0} Status {1}: {2}", SOPInstanceUID.UID.Split('.').Last(), Status, info);
            }
            else
            {
                LogManager.Instance.Error("Print Job {0} Status {1}: {2}", SOPInstanceUID.UID.Split('.').Last(), Status, info);
            }

            if (StatusUpdate != null)
            {
                var args = new PrintStatusEventArgs((ushort)Status, info, FilmSessionLabel);
                StatusUpdate(this, args);
            }
        }
Esempio n. 2
0
        private void OnPrintJobStatusUpdate(object sender, PrintStatusEventArgs e)
        {
            var printJob = sender as PrintJob;

            if (_sendEventReports)
            {
                var reportRequest = new DicomNEventReportRequest(
                    printJob.SOPClassUID,
                    printJob.SOPInstanceUID,
                    e.EventTypeId);

                var ds = new DicomDataset();
                ds.Add(DicomTag.ExecutionStatusInfo, e.ExecutionStatusInfo);
                ds.Add(DicomTag.FilmSessionLabel, e.FilmSessionLabel);
                ds.Add(DicomTag.PrinterName, AETitle);

                reportRequest.Dataset = ds;
                this.SendRequest(reportRequest);
            }
        }