Ejemplo n.º 1
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";
        }
Ejemplo n.º 2
0
        // May only be called from UpdateTabContents.
        private void TCM_UpdateTabDetailedValidation()
        {
            this.TabControlIssues.TabPages.Clear();
            this.TabControlIssues.Controls.Add(this.AddIssue);
            this.TabControlIssues.Controls.Add(this.RemoveIssue);
            this.TabControlIssues.Visible = false ;
            this.PictureBoxMaximizeResultTab.Visible = true ;
            this.PictureBoxMinResultsTab.Visible = false;
            this.TabValidationResults.Controls.Add(this.PanelResultsManagerTiltle);
            this.TabValidationResults.Controls.Add(this.TabControlIssues);

            if (_TCM_CountForControlsChange == 0)
            {
                _TCM_UpdateCount++;

                DvtkApplicationLayer.Result result = userControlSessionTree.GetSelectedTag() as DvtkApplicationLayer.Result;
                if (result != null)
                {
                    String selectedText = GetSelectedUserNode().Text;
                    string theHtmlFileNameOnly = "";
                    if (selectedText.StartsWith("Detail_"))
                    {
                        if(selectedText.IndexOf(result.DetailFile) != -1)
                        {
                            if (selectedText.IndexOf(result.DetailFile) != -1)
                            {
                                theHtmlFileNameOnly = result.DetailFile.ToLower().Replace(".xml", ".html");
                            }
                            else
                            {
                                foreach ( string resultName in result.SubDetailResultFiles)
                                {
                                    if(resultName != "")
                                    {
                                        if(selectedText.IndexOf(resultName) != -1)
                                        {
                                            theHtmlFileNameOnly = resultName.ToLower().Replace(".xml", ".html");
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            foreach ( string resultName in result.SubDetailResultFiles)
                            {
                                if(selectedText.IndexOf(resultName) != -1)
                                {
                                    theHtmlFileNameOnly = resultName.ToLower().Replace(".xml", ".html");
                                    break;
                                }
                            }
                        }
                    }
                    else
                    {
                        if(selectedText.IndexOf(result.SummaryFile) != -1)
                        {
                            if (selectedText.IndexOf(result.SummaryFile) != -1)
                            {
                                theHtmlFileNameOnly = result.SummaryFile.ToLower().Replace(".xml", ".html");
                            }
                            else
                            {
                                foreach ( string resultName in result.SubSummaryResultFiles)
                                {
                                    if(resultName != "")
                                    {
                                        if(selectedText.IndexOf(resultName) != -1)
                                        {
                                            theHtmlFileNameOnly = resultName.ToLower().Replace(".xml", ".html");
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            foreach ( string resultName in result.SubSummaryResultFiles)
                            {
                                if(selectedText.IndexOf(resultName) != -1)
                                {
                                    theHtmlFileNameOnly = resultName.ToLower().Replace(".xml", ".html");
                                    break;
                                }
                            }
                        }
                    }

                    string theHtmlFullFileName = Path.Combine(result.ParentSession.ResultsRootDirectory, theHtmlFileNameOnly);
                    string theXmlFullFileName = Path.Combine(result.ParentSession.ResultsRootDirectory, theHtmlFileNameOnly.Replace(".html" , ".xml"));

                    // Show the HTML file.
                    // The actual conversion from XML to HTML will be performed in the WebDescriptionView_BeforeNavigate2 method.
                    webBrowserValResult.Dispose();
                    this.webBrowserValResult = new System.Windows.Forms.WebBrowser();
                    this.webBrowserValResult.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.webBrowserValResult.Location = new System.Drawing.Point(0, 0);
                    this.webBrowserValResult.MinimumSize = new System.Drawing.Size(20, 20);
                    this.webBrowserValResult.Name = "webBrowserValResult";
                    this.webBrowserValResult.Size = new System.Drawing.Size(749, 669);
                    this.webBrowserValResult.TabIndex = 0;
                    this.webBrowserValResult.CanGoForwardChanged += new System.EventHandler(this.webBrowserValResult_CanGoForwardChanged);
                    this.webBrowserValResult.CanGoBackChanged += new System.EventHandler(this.webBrowserValResult_CanGoBackChanged);
                    this.webBrowserValResult.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.webBrowserValResult_Navigating);
                    this.webBrowserValResult.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowserValResult_DocumentCompleted);
                    this.webBrowserValResult.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.webBrowserValResult_Navigated);

                    this.WebBrowserPanel.Controls.Add(this.webBrowserValResult);

                    _TCM_ValidationResultsBrowser = new ValidationResultsManager(webBrowserValResult);
                    //GC.Collect();
                    _TCM_ValidationResultsBrowser.ShowHtml(theXmlFullFileName);
                }

                _TCM_UpdateCount--;
            }
        }
Ejemplo n.º 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!!!
        }