Ejemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="receivedDicomMessagesFileGroup">The associated instance from which the Directory setting is used.</param>
        public PixFileGroup(ReceivedDicomMessagesFileGroup receivedDicomMessagesFileGroup) : base("Pix")
        {
            this.receivedDicomMessagesFileGroup = receivedDicomMessagesFileGroup;

            this.Wildcards.Add("*.pix");

            RemoveModeCurrentApplicationRun              = RemoveMode.Remove;
            RemoveModePreviousApplicationRuns            = RemoveMode.Remove;
            AskPermissionToRemoveCurrentApplicationRun   = false;
            AskPermissionToRemovePreviousApplicationRuns = false;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="receivedDicomMessagesFileGroup">The associated instance from which the Directory setting is used.</param>
        public PixFileGroup(ReceivedDicomMessagesFileGroup receivedDicomMessagesFileGroup)
            : base("Pix")
        {
            this.receivedDicomMessagesFileGroup = receivedDicomMessagesFileGroup;

            this.Wildcards.Add("*.pix");

            RemoveModeCurrentApplicationRun = RemoveMode.Remove;
            RemoveModePreviousApplicationRuns = RemoveMode.Remove;
            AskPermissionToRemoveCurrentApplicationRun = false;
            AskPermissionToRemovePreviousApplicationRuns = false;
        }
Ejemplo n.º 3
0
        private void StorageSCPEmulator_Load(object sender, System.EventArgs e)
        {
            toolBarButtonError.Visible = false;
            toolBarButtonWarning.Visible = false;
            toolBarButtonLeft.Visible = false;
            toolBarButtonRight.Visible = false;
            toolBarButtonAbort.Enabled = false;

            //Hide the result tab page
            tabControlStorageSCP.Controls.Remove(tabPageResults);
            tabControlStorageSCP.SelectedTab = tabPageStorageSCPConfig;

            try
            {
                // Load the Emulator session
                LoadFromSessionFiles(this.storageOptions, this.storageCommitOptions);

                //
                // Stored files options.
                //
                this.fileGroups = new FileGroups("Storage SCP Emulator");

                this.validationResultsFileGroup = new ValidationResultsFileGroup();
                this.validationResultsFileGroup.DefaultFolder = "Results";
                this.fileGroups.Add(validationResultsFileGroup);

                this.receivedDicomMessagesFileGroup = new ReceivedDicomMessagesFileGroup();
                this.receivedDicomMessagesFileGroup.DefaultFolder = "Received DICOM Messages";
                this.fileGroups.Add(receivedDicomMessagesFileGroup);

                PixFileGroup pixFileGroup = new PixFileGroup(receivedDicomMessagesFileGroup);
                this.fileGroups.Add(pixFileGroup);

                this.fileGroups.CreateDirectories();

                this.fileGroups.CheckIsConfigured("\"Stored Files\\Options...\" menu item");

                this.storageOptions.ResultsDirectory = validationResultsFileGroup.Directory;
                this.storageOptions.DataDirectory = receivedDicomMessagesFileGroup.Directory;

                this.storageCommitOptions.ResultsDirectory = validationResultsFileGroup.Directory;
                this.storageCommitOptions.DataDirectory = receivedDicomMessagesFileGroup.Directory;

                // Make sure the session files contain the same information as the Stored Files user settings.
                SaveToSessionFiles(this.storageOptions, this.storageCommitOptions);

                sopClassesUserControlStoreSCP.UpdateDataGrid(this.storageOptions.DvtkScriptSession);

                this.storageOptions.StorageMode = Dvtk.Sessions.StorageMode.AsMedia;

                textBoxSCPAETitle.Text = this.storageOptions.LocalAeTitle;
                textBoxSCPPort.Text = this.storageOptions.LocalPort.ToString();
                textBoxImplClassUID.Text = this.storageOptions.DvtkScriptSession.DvtSystemSettings.ImplementationClassUid;
                textBoxImplVersion.Text = this.storageOptions.DvtkScriptSession.DvtSystemSettings.ImplementationVersionName;

                textBoxCommitSCPAETitle.Text = this.storageCommitOptions.LocalAeTitle;
                textBoxCommitSCPPort.Text = this.storageCommitOptions.LocalPort.ToString();

                textBoxStorageCommitPort.Text = this.storageCommitOptions.RemotePort.ToString();
                textBoxStorageCommitIPAdd.Text = this.storageCommitOptions.RemoteHostName;
                textBoxStorageCommitAETitle.Text = this.storageCommitOptions.RemoteAeTitle;

                numericCommitSCP.Value = this.storageCommitOptions.DvtkScriptSession.DvtSystemSettings.MaximumLengthReceived;
                numericStorageSCP.Value = this.storageOptions.DvtkScriptSession.DvtSystemSettings.MaximumLengthReceived;

                this.eventDelay = uint.Parse(textBoxDelay.Text);
            }
            catch (Exception except)
            {
                string msg = string.Format("Exception:{0}\n", except.Message);
                MessageBox.Show(this, "Application error:" +msg, "Error",MessageBoxButtons.OK, MessageBoxIcon.Error );
                this.Close();
                return;
            }
        }