public void loadProjectData(string strProjectToLoad)
        {
            btSaveProjectMetadata.Enabled = false;
            // Check to see if we are loading over a currently open and modified project
            CheckForUnSavedDataAndPromptUserToSave();


            UserProfile up = UserProfile.GetUserProfile();

            this.strPathToProjectFiles              = Path.GetFullPath(up.ProjectFilesPath);
            this.strCurrentProject                  = strProjectToLoad;
            this.strFullPathToCurrentProject        = Path.GetFullPath(Path.Combine(strPathToProjectFiles, strCurrentProject));
            this.strFullPathToCurrentProjectXmlFile = Path.GetFullPath(Path.Combine(strFullPathToCurrentProject, strCurrentProject + ".xml"));

            utils.authentic.loadXmlFileInTargetAuthenticView(axAuthentic_Project,
                                                             strFullPathToCurrentProjectXmlFile,
                                                             obpCurrentPaths.ProjectSchemaPath,
                                                             obpCurrentPaths.SpsProjectPath);
            axAuthentic_Project.SetUnmodified();
            setCurrentProjectsFindingIdValue();
            setCurrentProjectNumberValue();
            lbUnsavedData.Visible = false;
            // Check if the current file breaks the schema but don't show MessageBox
            new utils.xml.xsdVerification(strFullPathToCurrentProjectXmlFile, obpCurrentPaths.ProjectSchemaPath, lbXmlBreaksXsdSchema, false);
            unsavedDataExists             = false;
            btSaveProjectMetadata.Enabled = true;
        }
Esempio n. 2
0
        public void loadProjectData(string strProjectToLoad)
        {
            checkForUnSavedDataAndPromptForSave();
            UserProfile up = UserProfile.GetUserProfile();

            this.strPathToProjectFiles       = up.ProjectFilesPath;
            this.strCurrentProject           = strProjectToLoad;
            this.strFullPathToCurrentProject = Path.GetFullPath(Path.Combine(strPathToProjectFiles, strCurrentProject));
            this.strFullPathToCurrentProjectXmlFile_ReportContents = Path.GetFullPath(Path.Combine(strFullPathToCurrentProject, strCurrentProject + "_ReportContents.xml"));
            checkIfReportContentsFileExists();
            utils.authentic.loadXmlFileInTargetAuthenticView(axAuthentic_ExecutiveSummary,
                                                             this.strFullPathToCurrentProjectXmlFile_ReportContents,
                                                             obpCurrentPaths.ProjectSchemaPath,
                                                             obpCurrentPaths.SpsExecutiveSummaryPath);
            axAuthentic_ExecutiveSummary.SetUnmodified();
            lbUnsavedData.Visible = false;
            loadPlugInReportContentTemplates();

            // Verify file against schema but don't show MessageBox
            new utils.xml.xsdVerification(strFullPathToCurrentProjectXmlFile_ReportContents, obpCurrentPaths.ProjectSchemaPath, lbXmlBreaksXsdSchema, false);
        }
        public void loadRecommendationsXmlFileIntoAuthenticEditor()
        {
            string recommendationsDBPath = Path.GetFullPath(Path.Combine(upCurrentUser.ProjectFilesPath,
                                                                         ConfigurationManager.AppSettings["recommendationsDatabase"]));;

            checkForUnSavedDataAndPromptForSave();

            if (!Directory.Exists(Path.GetDirectoryName(recommendationsDBPath)))
            {
                Directory.CreateDirectory(Path.GetDirectoryName(recommendationsDBPath));
            }

            utils.authentic.loadXmlFileInTargetAuthenticView(axAuthentic_Recomendations,
                                                             recommendationsDBPath,
                                                             obpPaths.RecommendationSchemaPath,
                                                             obpPaths.SpsRecommendationsDbPath);
            axAuthentic_Recomendations.SetUnmodified();
            lbUnsavedData.Visible = false;
        }
Esempio n. 4
0
        private void lbTargetsInCurrentProject_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (lbTargetsInCurrentProject.SelectedItem != null)
            {
                axAuthentic_Targets.Visible = true;
                strFullPathToSelectedTarget = Path.GetFullPath(Path.Combine(strFullPathToCurrentProject, lbTargetsInCurrentProject.SelectedItem.ToString()));

                string strSelectedTarget = lbTargetsInCurrentProject.SelectedItem.ToString();
                string strXmlFileToLoad  = Path.GetFileNameWithoutExtension(strSelectedTarget) + ".xml";
                this.strPathToTargetXmlFile = Path.GetFullPath(Path.Combine(strFullPathToCurrentProject, Path.Combine(strSelectedTarget, strXmlFileToLoad)));
                utils.authentic.loadXmlFileInTargetAuthenticView(axAuthentic_Targets, strPathToTargetXmlFile, obpPaths.ProjectSchemaPath, obpPaths.SpsTargetTasksPath);
                axAuthentic_Targets.SetUnmodified();
                lbUnsavedData.Visible  = false;
                unsavedDataExists      = false;
                txtRenameTarget.Text   = strSelectedTarget;
                btRenameTarget.Enabled = true;
                // Check if the current file breaks the schema but don't show MessageBox
                new utils.xml.xsdVerification(strPathToTargetXmlFile, obpPaths.ProjectSchemaPath, lbXmlBreaksXsdSchema, false);
            }
        }