private void OnMpps(object sender, MppsEventArgs e) { var message = string.Empty; var hasError = true; try { var receivedDicomElements = new ReceivedDicomElements { CallingAeTitle = e.CallingAeTitle, CallingAeIpAddress = e.CallingAeIpAddress, ReceivedDateTime = DateTime.Now, Elements = e.DataSet, ImageSource = ImageSource.Mpps, ImageStatus = dicomServiceWorkerUser.OpenWhenReceived() ? ImageMemoryStatus.OpenedInWindow : ImageMemoryStatus.CachedInMemory }; message = string.Format("AeTitle : {0}, IpAddress : {1}", receivedDicomElements.CallingAeTitle, receivedDicomElements.IpAddress); OnDicomElementsReceived(receivedDicomElements); message = "Mpps successfull! -- " + message; hasError = false; } catch (Exception ex) { message = "Mpps failed! -- " + message + " " + ex.Message; } finally { dicomServiceWorkerUser.ShowMessage(message, hasError, false); } }
static void OnMpps(object sender, MppsEventArgs e) { DataSet dicom = e.DataSet; string path = String.Format("{0}.{1}.dcm", e.InstanceUid, (e.Command == 0x0140) ? "n-create" : "n-set"); dicom.Write(path); }
static void OnMpps(object sender, MppsEventArgs e) { DataSet dicom = e.DataSet; string path = String.Format("{0}.{1}.dcm", e.InstanceUid, (e.Command == 0x0140) ? "n-create" : "n-set"); FileStream ofs = new FileStream(path, FileMode.Create); dicom.Write(ofs); ofs.Flush(); ofs.Dispose(); }
private void OnMpps(object sender, MppsEventArgs e) { if (this.InvokeRequired) { this.Invoke(new MppsEventHandler(OnMpps), new object[] { sender, e }); } else { try { NewBrowser(e.DataSet); } catch (Exception ex) { MessageBox.Show(Logging.Log(ex)); } } }
private static void OnMpps(object sender, MppsEventArgs e) { System.Console.Write("m"); }