private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { String resultsFileBaseName = "QR_SCU_" + System.DateTime.Now.ToString("yyyyMMddHHmmss", System.Globalization.CultureInfo.InvariantCulture); scuDicomThread = new SCUDicomThread(); SetQueryAttributes(); scuDicomThread.Initialize(threadManager); userControlActivityLogging.Attach(scuDicomThread); scuDicomThread.Options.Identifier = resultsFileBaseName; //Load Session file scuDicomThread.Options.LoadFromFile(sesFile); scuDicomThread.Options.DataDirectory = scuDicomThread.Options.ResultsDirectory; //Set UI Value SetConfiguration(); scuDicomThread.Options.SaveToFile(sesFile); scuDicomThread.Start(); scuDicomThread.WaitForCompletion(); }
/// <summary> /// Create SCUDicomThread just to load data on to the configuration UI /// </summary> private void LoadSessionData() { SCUDicomThread thread = new SCUDicomThread(); thread.Initialize(threadManager); thread.Options.LoadFromFile(sesFile); aeTitScuText.Text = thread.Options.LocalAeTitle; aeTitScpText.Text = thread.Options.RemoteAeTitle; sutIPAddText.Text = thread.Options.RemoteHostName; configPortNoText.Text = thread.Options.RemotePort.ToString(); //Get the IP Address of the current machine string strHostName = Dns.GetHostName(); IPHostEntry ipEntry = Dns.GetHostEntry(strHostName); IPAddress[] addr = ipEntry.AddressList; ipAddLocalText.Text = addr[0].ToString(); ipAddLocalText.ReadOnly = true; }