示例#1
0
		public DICOMEditor()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			// Initialize the Dvtk library
			Dvtk.Setup.Initialize();

			_DCMdataset = new HLI.DataSet();
			_FileMetaInfo = new FileMetaInformation();

			_AttributesInfoForDataGrid = new ArrayList();
			_FMIForDataGrid = new ArrayList();
			InitializeDatasetGrid();
			InitializeFMIGrid();

			// Get the session context 
			ThreadManager threadMgr = new ThreadManager();
			_MainThread = new MainThread();
			_MainThread.Initialize(threadMgr);
	
			// Subscribe to Dvtk Activity report handler
			activityReportEventHandler = new Dvtk.Events.ActivityReportEventHandler(OnActivityReportEvent);

			// Subscribe to Sniffer Activity report handler
			activityLoggingDelegate = new appendTextToActivityLogging_ThreadSafe_Delegate(this.AppendTextToActivityLogging_ThreadSafe);

            // Provide functionality to open application with Media file or Directory
            // which contains Media files
			if(dcmFileOrDirToBeOpened != "")
			{
				DirectoryInfo userDirInfo = new DirectoryInfo(dcmFileOrDirToBeOpened.Trim());
				if(userDirInfo.Exists)
				{
                    //It's a directory contains Media files
					this.dirListBox.Path = userDirInfo.FullName;
					this.fileListBox.Path = this.dirListBox.Path;
				}
				else
				{
                    //It's a Media file
					FileInfo dcmFileInfo = new FileInfo(dcmFileOrDirToBeOpened.Trim());

					this.dirListBox.Path = dcmFileInfo.DirectoryName;
					this.fileListBox.Path = this.dirListBox.Path;
					this.fileListBox.SelectedItem = dcmFileInfo.Name;
				}				
			}
		}
示例#2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="theProject"></param>
        /// <param name="theMainForm"></param>
        public ProjectForm2(DvtkApplicationLayer.Project theProject, MainForm theMainForm)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.userControlSessionTree.projectApp = theProject;
            userControlSessionTree.ProjectForm = this;
            _ActivityReportEventHandler = new Dvtk.Events.ActivityReportEventHandler(TCM_OnActivityReportEvent);
            projectApp = theProject;
            _MainForm = theMainForm;
            ListBoxSecuritySettings.SelectedIndex = 0;
            _SopClassesManager = new SopClassesManager(this, DataGridSpecifySopClasses, ComboBoxSpecifySopClassesAeTitle, ListBoxSpecifySopClassesDefinitionFileDirectories, RichTextBoxSpecifySopClassesInfo, userControlSessionTree, ButtonSpecifySopClassesRemoveDirectory);
            _TCM_ValidationResultsBrowser = new ValidationResultsManager(webBrowserValResult);
            //_TCM_ValidationResultsManagerBrowser = new ValidationResultsManager(webBrowserResultMgr);

            // Because the webbrowser navigation is "cancelled" when browsing to an .xml file
            // first another html file has to be shown to make this work under Windows 2000.
            _TCM_ValidationResultsBrowser.ShowHtml("about:blank");
            _TCM_AppendTextToActivityLogging_ThreadSafe_Delegate = new TCM_AppendTextToActivityLogging_ThreadSafe_Delegate(this.TCM_AppendTextToActivityLogging_ThreadSafe);

            resultProjectXml  = projectApp.ProjectFileName + ".xml";
        }
示例#3
0
        public ProjectForm2(Project theProject, MainForm theMainForm)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            _ActivityReportEventHandler = new Dvtk.Events.ActivityReportEventHandler(TCM_OnActivityReportEvent);

            _Project = theProject;
            _MainForm = theMainForm;
            ListBoxSecuritySettings.SelectedIndex = 0;
            _SessionTreeViewManager = new SessionTreeViewManager(this, theProject, SessionTreeView);
            _SopClassesManager = new SopClassesManager(this, DataGridSpecifySopClasses, ComboBoxSpecifySopClassesAeTitle, ListBoxSpecifySopClassesDefinitionFileDirectories, RichTextBoxSpecifySopClassesInfo, _SessionTreeViewManager, ButtonSpecifySopClassesRemoveDirectory);
            _TCM_ValidationResultsManager = new ValidationResultsManager(WebDescriptionView);

            _TCM_ValidationResultsManager1 = new ValidationResultsManager(axWebBrowserScript);

            // Because the webbrowser navigation is "cancelled" when browsing to an .xml file
            // first another html file has to be shown to make this work under Windows 2000.
            _TCM_ValidationResultsManager.ShowHtml("about:blank");

            _TCM_AppendTextToActivityLogging_ThreadSafe_Delegate = new TCM_AppendTextToActivityLogging_ThreadSafe_Delegate(this.TCM_AppendTextToActivityLogging_ThreadSafe);

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            // MK!!!
        }
示例#4
0
        /// <summary>
        /// Conatins common initialization code, called from the other Initialize methods from
        /// this class.
        /// </summary>
        /// <example>
        ///		<b>C#</b>
        ///		<code>
        /// 			<include file='Doc\VisualBasicExamples.xml' path='Examples/Example[@name="IncludesDicomThreadScu"]' />
        /// 			<include file='Doc\VisualBasicExamples.xml' path='Examples/Example[@name="DicomThreadScu"]' />
        /// 			<include file='Doc\VisualBasicExamples.xml' path='Examples/Example[@name="Main"]' />		
        ///		</code>
        /// </example>		
        private void Initialize()
        {
            this.threadOptions = new DicomThreadOptions(this);

            this.activityReportEventHandler = new Dvtk.Events.ActivityReportEventHandler(this.HandleActivityReportEvent);
        }
示例#5
0
        public ProjectForm(Project project_data)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            // Set the callback for activity logging.
            _activity_handler = new Dvtk.Events.ActivityReportEventHandler(this.OnActivityReportEvent);

            // Set the event handler used when a process if finished executing.
            this.RunningProcessEvent += new EventHandler(FinishRunningProcessExecution);

            this.project = project_data;

            if (this.project.GetNrSessions () > 0)
            {
                this.UpdateSessionTreeView ();
                this.SessionBrowser.Select();
            }
            else
            {
                // No session file is available, this means that no session is selected.
                // Normally when selecting a session, all controls on the form are updated and
                // resized. Now we have to explicitly resize the form.
                this._active_page = ActivePage.session;
                this.UpdatePageVisibility ();
                //this.ResizeProjectForm ();
            }

            // Initialize the tablestyle for the SOPClass view. This can be done
            // only once.
            this.SOPClasses.TableStyles.Add (this.CreateTableStyle());
        }