コード例 #1
0
ファイル: DicomScu.cs プロジェクト: top501/DVTK-1
        private void LogTransaction()
        {
            DicomThread dicomThread = (DicomThread)DvtkHighLevelInterface.Common.Threads.Thread.CurrentThread;

            if (dicomThread == null)
            {
                return;
            }

            if (_currentDicomTransaction == null)
            {
                return;
            }

            // save the transaction
            ActorsTransaction actorsTransaction = new ActorsTransaction(_transactionNumber,
                                                                        _dicomClient.ActorName,             // from actor
                                                                        _dicomClient.ParentActor.ActorName, // to actor
                                                                        _currentDicomTransaction,
                                                                        this.Options.ResultsFileNameOnly,
                                                                        this.Options.ResultsFullFileName,
                                                                        (uint)dicomThread.NrOfErrors,
                                                                        (uint)dicomThread.NrOfWarnings);

            // save the transaction in the Actor log
            _dicomClient.ParentActor.ActorsTransactionLog.Add(actorsTransaction);

            // publish the transaction event to any interested parties
            _dicomClient.PublishTransactionAvailableEvent(_dicomClient.ActorName, actorsTransaction);

            // remove any messages from the dicom thread
            dicomThread.ClearMessages();

            _currentDicomTransaction = null;
        }
コード例 #2
0
        private void LogTransaction()
        {
            DicomThread dicomThread = (DicomThread)DvtkHighLevelInterface.Common.Threads.Thread.CurrentThread;

            if (dicomThread == null)
            {
                return;
            }

            if (_currentDicomTransaction == null)
            {
                return;
            }

            // get the next transaction number - needed to sort the
            // transactions correctly
            int transactionNumber = TransactionNumber.GetNextTransactionNumber();

            // save the transaction
            ActorsTransaction actorsTransaction = new ActorsTransaction(transactionNumber,
                                                                        ActorName,             // from actor
                                                                        ParentActor.ActorName, // to actor
                                                                        _currentDicomTransaction,
                                                                        dicomThread.Options.ResultsFileNameOnly,
                                                                        dicomThread.Options.ResultsFullFileName,
                                                                        (uint)dicomThread.NrOfErrors,
                                                                        (uint)dicomThread.NrOfWarnings);

            // save the transaction in the Actor log
            ParentActor.ActorsTransactionLog.Add(actorsTransaction);

            // publish the transaction event to any interested parties
            PublishTransactionAvailableEvent(ActorName, actorsTransaction);

            // remove any messages from the dicom thread
            dicomThread.ClearMessages();

            _currentDicomTransaction = null;
        }