public DICOMSniffer() { // // Required for Windows Form Designer support // InitializeComponent(); // Provide the Style sheet to the DvtkWebBrowser user control this.dvtkSummaryWebBrowserSniffer.XmlStyleSheetFullFileName = Application.StartupPath + "\\DVT_RESULTS.xslt"; this.dvtkSummaryWebBrowserSniffer.BackwardFormwardEnabledStateChangeEvent +=new DvtkApplicationLayer.UserInterfaces.DvtkWebBrowserNew.BackwardFormwardEnabledStateChangeEventHandler(dvtkSummaryWebBrowserSniffer_BackwardFormwardEnabledStateChangeEvent); this.dvtkDetailWebBrowserSniffer.XmlStyleSheetFullFileName = Application.StartupPath + "\\DVT_RESULTS.xslt"; this.dvtkDetailWebBrowserSniffer.BackwardFormwardEnabledStateChangeEvent += new DvtkApplicationLayer.UserInterfaces.DvtkWebBrowserNew.BackwardFormwardEnabledStateChangeEventHandler(dvtkDetailWebBrowserSniffer_BackwardFormwardEnabledStateChangeEvent); analysisDlg = new Analysis(); // Subscribe to Dvtk Activity report handler //activityReportEventHandler = new Dvtk.Events.ActivityReportEventHandler(OnActivityReportEvent); minProgressHandler = new SetMinimumProgressBarDelegate(SetMinimumInProgressBar); maxProgressHandler = new SetMaximumProgressBarDelegate(SetMaximumInProgressBar); performProgressHandler = new PerformProgressDelegate(PerformStepInProgressBar); incrementStepInProgressHandler = new IncrementStepInProgressDelegate(IncrementStepInProgressBar); updateUIControlsHandler = new UpdateUIControlsDelegate(UpdateUIControls); addConnectionHandler = new AddConnectionDelegate(AddConnectionToList); selectConnectionHandler = new SelectConnectionDelegate(SelectConnectionFromList); totalPhysicalMemoryAvailable = computePhysicalMemoryAvailable(); }
public StorageSCUEmulator() { // // Required for Windows Form Designer support // InitializeComponent(); InitializeBackgoundWorker(); this.dvtkWebBrowserSCUEmulator.XmlStyleSheetFullFileName = applDirectory + "\\DVT_RESULTS.xslt"; this.dvtkWebBrowserSCUEmulator.BackwardFormwardEnabledStateChangeEvent +=new DvtkApplicationLayer.UserInterfaces.DvtkWebBrowserNew.BackwardFormwardEnabledStateChangeEventHandler(dvtkWebBrowserSCUEmulator_BackwardFormwardEnabledStateChangeEvent); this.dvtkWebBrowserSCUEmulator.ErrorWarningEnabledStateChangeEvent += new DvtkWebBrowserNew.ErrorWarningEnabledStateChangeEventHandler(dvtkWebBrowserSCUEmulator_ErrorWarningEnabledStateChangeEvent); selectedTS.Add("1.2.840.10008.1.2"); selectedTS.Add("1.2.840.10008.1.2.1"); selectedTS.Add("1.2.840.10008.1.2.2"); // // Set the .Net thread name for debugging purposes. // System.Threading.Thread.CurrentThread.Name = "Storage SCU Emulator"; this.threadsStateChangeEventHandler = new ThreadManager.ThreadsStateChangeEventHandler(this.HandleThreadsStateChangeEvent); updateUIControlsHandler = new UpdateUIControlsDelegate(UpdateUIControls); updateUIControlsFromBGThreadHandler = new UpdateUIControlsFromBGThreadDelegate(UpdateUIControlsFromBGThread); this.threadManager = new ThreadManager(); this.threadManager.ThreadsStateChangeEvent += this.threadsStateChangeEventHandler; // // Stored files options. // this.fileGroups = new FileGroups("Storage SCU Emulator"); this.validationResultsFileGroup = new ValidationResultsFileGroup(); this.validationResultsFileGroup.DefaultFolder = "Results"; this.fileGroups.Add(validationResultsFileGroup); this.fileGroups.CreateDirectories(); this.fileGroups.CheckIsConfigured("\"Stored Files\\Options...\" menu item"); // Set Storage thread StoreScu storageScu = new StoreScu(); storageScu.Initialize(this.threadManager); this.storageOptions = storageScu.Options; this.storageOptions.LoadFromFile(Path.Combine(applDirectory, "StorageSCUEmulator.ses")); this.storageOptions.StorageMode = Dvtk.Sessions.StorageMode.AsMediaOnly; this.storageOptions.ResultsDirectory = validationResultsFileGroup.Directory; this.storageOptions.DataDirectory = validationResultsFileGroup.Directory; //Environment.CurrentDirectory = this.storageOptions.ResultsDirectory; //Set the Commit thread CommitScu commitScu = new CommitScu(this); commitScu.Initialize(this.threadManager); this.storageCommitSCUOptions = commitScu.Options; this.storageCommitSCUOptions.LoadFromFile(Path.Combine(applDirectory, "CommitSCUEmulator.ses")); this.storageCommitSCUOptions.ResultsDirectory = validationResultsFileGroup.Directory; this.storageCommitSCUOptions.DataDirectory = validationResultsFileGroup.Directory; // Make sure the session files contain the same information as the Stored Files user settings. SaveToSessionFiles(this.storageOptions, this.storageCommitSCUOptions); this.storageCommitItems = new ReferencedSopItemCollection(); }