private void sendCMOVERQMenuItem_Click(object sender, EventArgs e) { if ((string)queryLevelComboBox.SelectedItem == "Patient_Root") { selectedQueryRootSop = patientRootQRMoveSOP; } else if ((string)queryLevelComboBox.SelectedItem == "Study_Root") { selectedQueryRootSop = studyRootQRMoveSOP; } if (splitContainer1.Panel1.Controls.Contains(configurationTablePanel)) { splitContainer1.Panel1.Controls.Remove(configurationTablePanel); } if (splitContainer1.Panel1.Controls.Contains(queryResultPanel)) { splitContainer1.Panel1.Controls.Remove(queryResultPanel); } if (splitContainer1.Panel1.Controls.Contains(panelPatGrid)) { splitContainer1.Panel1.Controls.Remove(panelPatGrid); } splitContainer1.Panel1.Controls.Add(clearLogButton); splitContainer1.Panel1.Controls.Add(userControlActivityLogging); userControlActivityLogging.Dock = DockStyle.Fill; buttonLog.Text = "Show Query Result"; SelectMode mode = new SelectMode(); mode.MoveDestination = aeTitScuText.Text; if (mode.ShowDialog() == DialogResult.OK) { moveDest = mode.MoveDestination; listenPort = mode.LocalPortCMove; } //Check for Move as Storage SCP if (moveDest.Trim() == aeTitScuText.Text.Trim()) { scpStoreDicomThread = new SCUStoreDicomThread("QR_SCU_STORE_SUBOPERATION"); scpStoreDicomThread.Initialize(threadManager); userControlActivityLogging.Attach(scpStoreDicomThread); //String resultsBaseName = "QR_SCU_STORE_SUBOPERATION_" + System.DateTime.Now.ToString("yyyyMMddHHmmss", System.Globalization.CultureInfo.InvariantCulture); scpStoreDicomThread.Options.Identifier = "QR_SCU_STORE_SUBOPERATION"; scpStoreDicomThread.Options.AutoValidate = false; //scpStoreDicomThread.Options.LogThreadStartingAndStoppingInParent = false; //scpStoreDicomThread.Options.LogWaitingForCompletionChildThreads = false; // Load the Emulator session //this.scpStoreDicomThread.Options.LoadFromFile(Path.Combine(Application.StartupPath, "Store_SCP.ses")); scpStoreDicomThread.Options.LocalAeTitle = aeTitScuText.Text; scpStoreDicomThread.Options.LocalPort = ushort.Parse(listenPort); scpStoreDicomThread.Options.ResultsDirectory = scuDicomThread.Options.ResultsDirectory; scpStoreDicomThread.Options.DataDirectory = scuDicomThread.Options.ResultsDirectory; scpStoreDicomThread.Start(); isStoreThreadRunning = true; } Thread.Sleep(500); //Run background thread backgroundWorkerRetreive.RunWorkerAsync(); statusLabel.Text = "Wait for Move results..."; queryLevelComboBox.Enabled = false; patientIdTextBox.Enabled = false; patientNameTextBox.Enabled = false; toolStripButtonReSet.Enabled = false; buttonLog.Enabled = false; }
private void sendCMOVERQMenuItem_Click(object sender, EventArgs e) { if ((string)queryLevelComboBox.SelectedItem == "Patient_Root") { selectedQueryRootSop = patientRootQRMoveSOP; } else if ((string)queryLevelComboBox.SelectedItem == "Study_Root") { selectedQueryRootSop = studyRootQRMoveSOP; } if (splitContainer1.Panel1.Controls.Contains(configurationTablePanel)) { splitContainer1.Panel1.Controls.Remove(configurationTablePanel); } if (splitContainer1.Panel1.Controls.Contains(queryResultPanel)) { splitContainer1.Panel1.Controls.Remove(queryResultPanel); } if (splitContainer1.Panel1.Controls.Contains(panelPatGrid)) splitContainer1.Panel1.Controls.Remove(panelPatGrid); splitContainer1.Panel1.Controls.Add(clearLogButton); splitContainer1.Panel1.Controls.Add(userControlActivityLogging); userControlActivityLogging.Dock = DockStyle.Fill; buttonLog.Text = "Show Query Result"; SelectMode mode = new SelectMode(); mode.MoveDestination = aeTitScuText.Text; if (mode.ShowDialog() == DialogResult.OK) { moveDest = mode.MoveDestination; listenPort = mode.LocalPortCMove; } //Check for Move as Storage SCP if (moveDest.Trim() == aeTitScuText.Text.Trim()) { scpStoreDicomThread = new SCUStoreDicomThread("QR_SCU_STORE_SUBOPERATION"); scpStoreDicomThread.Initialize(threadManager); userControlActivityLogging.Attach(scpStoreDicomThread); //String resultsBaseName = "QR_SCU_STORE_SUBOPERATION_" + System.DateTime.Now.ToString("yyyyMMddHHmmss", System.Globalization.CultureInfo.InvariantCulture); scpStoreDicomThread.Options.Identifier = "QR_SCU_STORE_SUBOPERATION"; scpStoreDicomThread.Options.AutoValidate = false; //scpStoreDicomThread.Options.LogThreadStartingAndStoppingInParent = false; //scpStoreDicomThread.Options.LogWaitingForCompletionChildThreads = false; // Load the Emulator session //this.scpStoreDicomThread.Options.LoadFromFile(Path.Combine(Application.StartupPath, "Store_SCP.ses")); scpStoreDicomThread.Options.LocalAeTitle = aeTitScuText.Text; scpStoreDicomThread.Options.LocalPort = ushort.Parse(listenPort); scpStoreDicomThread.Options.ResultsDirectory = scuDicomThread.Options.ResultsDirectory; scpStoreDicomThread.Options.DataDirectory = scuDicomThread.Options.ResultsDirectory; scpStoreDicomThread.Start(); isStoreThreadRunning = true; } Thread.Sleep(500); //Run background thread backgroundWorkerRetreive.RunWorkerAsync(); statusLabel.Text = "Wait for Move results..."; queryLevelComboBox.Enabled = false; patientIdTextBox.Enabled = false; patientNameTextBox.Enabled = false; toolStripButtonReSet.Enabled = false; buttonLog.Enabled = false; }