示例#1
0
        public ErrorSurfaceProperty(XmlNode nodProperty, Surface surf)
        {
            Name = nodProperty.SelectSingleNode("Name").InnerText;

            XmlNode nodUni = nodProperty.SelectSingleNode("UniformValue");
            XmlNode nodAss = nodProperty.SelectSingleNode("AssociatedSurface");
            XmlNode nodFIS = nodProperty.SelectSingleNode("FISRuleFile");

            if (nodUni is XmlNode)
            {
                UniformValue = decimal.Parse(nodUni.InnerText, CultureInfo.InvariantCulture);
            }
            else if (surf is DEMSurvey)
            {
                DEMSurvey dem = ((DEMSurvey)surf);

                if (nodFIS is XmlNode)
                {
                    FileInfo fisFile = ProjectManager.Project.GetAbsolutePath(nodFIS.InnerText);
                    FISRuleFile = new ErrorCalculation.FIS.FISLibraryItem(fisFile.FullName, ErrorCalculation.FIS.FISLibrary.FISLibraryItemTypes.Project);

                    foreach (XmlNode nodInput in nodProperty.SelectNodes("FISInputs/Input"))
                    {
                        AssocSurface assoc = dem.AssocSurfaces.First <AssocSurface>(x => string.Compare(nodInput.SelectSingleNode("AssociatedSurface").InnerText, x.Name, true) == 0);
                        FISInputs.Add(new FISInput(nodInput.SelectSingleNode("Name").InnerText, assoc));
                    }
                }
            }
        }
示例#2
0
        public void CloneToProject(string errSurfName, DirectoryInfo destinationDir)
        {
            if (FISRuleFile == null)
            {
                return;
            }

            // Copies the FIS rule file (and metadata as XML if exists) to the project folder
            // and creaetes a clone copy FIS Library Item so that the GCD project can reference the local copy.
            // CAUTION - SET THE PRIVATE PROPERTY TO BYPASS RESETTING THE FIS INPUTS
            _FISRuleFile = FISRuleFile.Copy(errSurfName, destinationDir);
        }