Пример #1
0
        public void Ticket1232_1_1()
        {
            ThreadManager threadManager1 = new ThreadManager();
            ThreadManager threadManager2 = new ThreadManager();

            HliForm hliForm = new HliForm();

            EchoSCP echoSCP = new EchoSCP("SCP_Association");

            echoSCP.Initialize(threadManager1);

            Config.SetOptions(echoSCP, "Ticket1232_1_1", "SCP");
            echoSCP.Options.AutoValidate = false;

            hliForm.Attach(echoSCP);

            echoSCP.Start();

            System.Threading.Thread.Sleep(2000);

            for (int index = 0; index < 10; index++)
            {
                DicomThread_NUnit.EchoSCU echoSCU = new DicomThread_NUnit.EchoSCU();

                echoSCU.Initialize(threadManager2);

                Config.SetOptions(echoSCU, "Ticket1232_1_1", "SCU_" + index.ToString());
                echoSCU.Options.AutoValidate = false;

                hliForm.Attach(echoSCU);

                echoSCU.Start();

                System.Threading.Thread.Sleep(500);
            }

            threadManager2.WaitForCompletionThreads();

            echoSCP.Stop();
            echoSCP.WaitForCompletion();

            Assert.That(echoSCP.NrOfErrors + echoSCP.NrOfWarnings, Is.EqualTo(0));
        }
Пример #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="hliForm">The HLIForm instance that uses this internal form.</param>
        public HliInternalForm(HliForm hliForm)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.hliForm = hliForm;

            // Create the handlers used by other threads in an Invoke call.
            this.closeHandler = new CloseDelegate(HandleClose);
            this.showAndContinueHandler = new ShowAndContinueDelegate(HandleShowAndContinue);
            this.setStopButtonTextHandler = new SetStopButtonTextDelegate(HandleSetStopButtonText);
            this.setTextHandler = new SetTextDelegate(HandleSetText);

            lock(hliForm.LockObject)
            {
                this.isAvailable = true;
            }
        }
Пример #3
0
        public void Ticket1293_2_1()
        {
            ThreadManager threadManager = new ThreadManager();

            Ticket1293MainDicomThread ticket1293MainDicomThread = new Ticket1293MainDicomThread("1.2.840.10008.1.2.1");

            ticket1293MainDicomThread.Initialize(threadManager);

            Config.SetOptions(ticket1293MainDicomThread, "Ticket1293", "Main 1.2.840.10008.1.2.1");

            HliForm hliForm = new HliForm();

            hliForm.Attach(ticket1293MainDicomThread);

            ticket1293MainDicomThread.Start();

            ticket1293MainDicomThread.WaitForCompletion();

            Assert.That(ticket1293MainDicomThread.NrOfErrors + ticket1293MainDicomThread.NrOfWarnings, Is.EqualTo(0));
        }
Пример #4
0
        public void Ticket1293_4_1()
        {
            ThreadManager threadManager = new ThreadManager();

            Ticket1293MainDicomThread ticket1293MainDicomThread = new Ticket1293MainDicomThread("1.2.840.10008.5.1.4.1.1.7");

            ticket1293MainDicomThread.Initialize(threadManager);

            Config.SetOptions(ticket1293MainDicomThread, "Ticket1293", "Main 1.2.840.10008.5.1.4.1.1.7");
            ticket1293MainDicomThread.Options.LoadDefinitionFile(Path.Combine(Paths.DefinitionsDirectoryFullPath, "PatientRootQueryRetrieve-FIND.def"));

            HliForm hliForm = new HliForm();

            hliForm.Attach(ticket1293MainDicomThread);

            ticket1293MainDicomThread.Start();

            ticket1293MainDicomThread.WaitForCompletion();

            Assert.That(ticket1293MainDicomThread.NrOfErrors + ticket1293MainDicomThread.NrOfWarnings, Is.EqualTo(0));
        }