Example #1
0
 internal void InitColumns()
 {
     columnEntities = new Collection <ColumnEntity>();
     if (SelectedFeatureLayer != null)
     {
         SelectedFeatureLayer.SafeProcess(() =>
         {
             var columns = SelectedFeatureLayer.FeatureSource.GetColumns();
             foreach (var column in columns)
             {
                 string editedName = column.ColumnName;
                 if (column.ColumnName.Contains("."))
                 {
                     int index  = column.ColumnName.IndexOf(".") + 1;
                     editedName = column.ColumnName.Substring(index, column.ColumnName.Length - index);
                 }
                 ColumnEntity entity     = new ColumnEntity();
                 entity.MaxLength        = column.MaxLength;
                 entity.ColumnName       = column.ColumnName;
                 entity.EditedColumnName = editedName;
                 entity.ColumnType       = column.TypeName;
                 entity.IsChecked        = true;
                 columnEntities.Add(entity);
             }
         });
     }
 }
        private IEnumerable <FeatureSourceColumn> GetColumns()
        {
            Collection <FeatureSourceColumn> results = new Collection <FeatureSourceColumn>();

            SelectedFeatureLayer.SafeProcess(() =>
            {
                SelectedFeatureLayer.FeatureSource.GetColumns().ForEach(c => results.Add(c));
            });

            return(results);
        }
Example #3
0
        private IEnumerable <FeatureSourceColumn> GetColumnsOfSelectedLayer()
        {
            Collection <FeatureSourceColumn> columns = new Collection <FeatureSourceColumn>();

            SelectedFeatureLayer.SafeProcess(() =>
            {
                columns = SelectedFeatureLayer.FeatureSource.GetColumns();
            });
            //SelectedFeatureLayer.Open();
            //var columns = SelectedFeatureLayer.FeatureSource.GetColumns();
            //SelectedFeatureLayer.Close();

            return(columns);
        }
        private IEnumerable <FeatureSourceColumn> GetColumns()
        {
            Collection <FeatureSourceColumn> results = new Collection <FeatureSourceColumn>();

            SelectedFeatureLayer.SafeProcess(() =>
            {
                results = SelectedFeatureLayer.FeatureSource.GetColumns();
            });
            //SelectedFeatureLayer.Open();
            //var results = SelectedFeatureLayer.FeatureSource.GetColumns();
            //SelectedFeatureLayer.Close();

            return(results);
        }