예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
        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();
        }
예제 #4
0
파일: Main.cs 프로젝트: 1059444127/Dicom-4
 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));
         }
     }
 }
예제 #5
0
 private static void OnMpps(object sender, MppsEventArgs e)
 {
     System.Console.Write("m");
 }