Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <remarks>
        /// The <see cref="IFeatureLayer.FeatureClass"/> attribute is set to the given <see cref="IFeatureLayer2"/>.
        /// </remarks>
        /// <param name="featureClass"></param>
        /// <param name="featureLayer"></param>
        public Feature(IFeatureClass featureClass, IFeatureLayer2 featureLayer)
        {
            featureLayer.FeatureClass = featureClass;

            this._featureClass = featureClass;
            this._featureLayer = featureLayer;

            _isFeatureLayer = true;

            this._esriLayer = featureLayer as ILayer2;
            _featureName    = this._esriLayer.Name;

            _fields = new ObservableCollection <Field>(GetFields().OrderByDescending(f => f.IsSuitableForMCDA).ThenBy(l => l.FieldName));
        }
Beispiel #2
0
        public Feature(ESRI.ArcGIS.Carto.ILayer2 layer)
        {
            this._esriLayer = layer;
            _featureName    = layer.Name;

            var featureLayer = layer as ESRI.ArcGIS.Carto.IFeatureLayer2;

            if (featureLayer == null)
            {
                _isFeatureLayer = false;
                _fields         = new ObservableCollection <Field>();
            }
            else
            {
                _isFeatureLayer    = true;
                this._featureLayer = featureLayer;
                _fields            = new ObservableCollection <Field>(GetFields().OrderByDescending(f => f.IsSuitableForMCDA).ThenBy(l => l.FieldName));
            }
        }