static void end(string uid, string title, IPAddress address, int port) { MppsServiceSCU mpps = new MppsServiceSCU(); mpps.Syntaxes.Add(Syntax.ExplicitVrLittleEndian); Association association = new Association(); association.AddService(mpps); if (association.Open(title, address, port)) { DataSet dicom = GetDataSet(@"..\..\end.dcm"); mpps.End(uid, dicom); System.Console.WriteLine("end done!"); } else { System.Console.WriteLine("\ncan't Open."); } //System.Console.WriteLine("before Close!"); association.Close(); //System.Console.WriteLine("after Close!"); }
public static void End(string uid, ApplicationEntity host) { MppsServiceSCU mpps = new MppsServiceSCU(); mpps.Syntaxes.Add(Syntax.ExplicitVrLittleEndian); Association association = new Association(); association.AddService(mpps); if (association.Open(host)) { DataSet dicom = DataSetTest.GetDataSet(Path.Combine(Tools.RootFolder, @"EK\Capture\Dicom\DicomToolKit\Test\Data\Mpps\end.dcm")); mpps.End(uid, dicom); //System.Console.WriteLine("end done!"); } else { //System.Console.WriteLine("\ncan't Open."); } //System.Console.WriteLine("before Close!"); association.Close(); //System.Console.WriteLine("after Close!"); }