Exemple #1
0
 public PipeClassInfo(IFeatureClass pipeClass, string lineStartUnderGroundElevString,
                      string lineEndUnderGroundElevString, string lineStartGroundElevString, string lineEndGroundElevString)
 {
     PipeClass = pipeClass;
     StartGroundElevationField = new PipeSpecialFieldInfo
     {
         Name  = lineStartGroundElevString,
         Index = pipeClass.FindField(lineStartGroundElevString)
     };
     EndGroundElevationField = new PipeSpecialFieldInfo
     {
         Name  = lineEndGroundElevString,
         Index = pipeClass.FindField(lineEndGroundElevString)
     };
     StartUnderGroundElevationField = new PipeSpecialFieldInfo
     {
         Name  = lineStartUnderGroundElevString,
         Index = pipeClass.FindField(lineStartUnderGroundElevString)
     };
     EndUnderGroundElevationField = new PipeSpecialFieldInfo
     {
         Name  = lineEndUnderGroundElevString,
         Index = pipeClass.FindField(lineEndUnderGroundElevString)
     };
 }
Exemple #2
0
 public PipeClassInfo(IFeatureClass pipeClass, string groundElevationFieldName)
 {
     PipeClass           = pipeClass;
     PointElevationField = new PipeSpecialFieldInfo()
     {
         Name  = groundElevationFieldName,
         Index = pipeClass.FindField(groundElevationFieldName)
     };
 }
Exemple #3
0
        public void SetSpecialField(string fieldName, PipeFieldType fieldType)
        {
            if (string.IsNullOrEmpty(fieldName))
            {
                return;
            }
            PipeSpecialFieldInfo info = new PipeSpecialFieldInfo()
            {
                Name  = fieldName,
                Index = _pipeClass.FindField(fieldName)
            };

            if (info.Index < 0)
            {
                info.Name = "";
            }
            switch (fieldType)
            {
            case PipeFieldType.StartGroundElevation:
                _startGroundElevationField = info;
                break;

            case PipeFieldType.StartUnderGroundElevation:
                _startUnderGroundElevationField = info;
                break;

            case PipeFieldType.EndGroundElevation:
                _endGroundElevationField = info;
                break;

            case PipeFieldType.EndUnderGroundElevation:
                _endUnderGroundElevationField = info;
                break;

            case PipeFieldType.Material:
                _materialField = info;
                break;

            case PipeFieldType.Standard:
                _standardField = info;
                break;

            case PipeFieldType.JustPoint:
                _justPointTypeField = info;
                break;

            default:
                throw new ArgumentOutOfRangeException("fieldType");
            }
        }