private void Refresh() { Dictionary <string, object> information = new Dictionary <string, object>(); targetFeatureLayer.SafeProcess(() => { string fileName = targetFeatureLayer.ShapePathFilename.Replace('/', '\\'); information.Add("File Name", fileName); information.Add("File Size", string.Format("{0} bytes", new FileInfo(targetFeatureLayer.ShapePathFilename).Length)); string indexPathFileName = targetFeatureLayer.IndexPathFilename.Replace('/', '\\'); information.Add("Index File", indexPathFileName); information.Add("ShapeFile Type", targetFeatureLayer.GetShapeFileType().ToString()); information.Add("Layer Name", targetFeatureLayer.Name); information.Add("Columns Count", targetFeatureLayer.QueryTools.GetColumns().Count.ToString()); information.Add("Rows Count", targetFeatureLayer.GetRecordCount().ToString()); if (targetFeatureLayer.HasBoundingBox) { RectangleShape boundingBox = targetFeatureLayer.GetBoundingBox(); information.Add("Upper Left X:", boundingBox.UpperLeftPoint.X.ToString("N4")); information.Add("Upper Left Y:", boundingBox.UpperLeftPoint.Y.ToString("N4")); information.Add("Lower Right X:", boundingBox.LowerRightPoint.X.ToString("N4")); information.Add("Lower Right Y:", boundingBox.LowerRightPoint.Y.ToString("N4")); } else { information.Add("Upper Left X:", double.NaN.ToString()); information.Add("Upper Left Y:", double.NaN.ToString()); information.Add("Lower Right X:", double.NaN.ToString()); information.Add("Lower Right Y:", double.NaN.ToString()); } if (!targetFeatureLayer.Name.Equals("TempLayer")) { information.Add("Encoding", GetAllEncodings()); selectedEncoding = targetFeatureLayer.Encoding; targetFeatureLayer.SafeProcess(() => { columns.Add(PleaseSelectText, PleaseSelectText); foreach (var item in targetFeatureLayer.FeatureSource.GetColumns()) { columns.Add(item.ColumnName, targetFeatureLayer.FeatureSource.GetColumnAlias(item.ColumnName)); } information.Add("Feature ID Column", columns); if (string.IsNullOrEmpty(FeatureIDColumn) && columns.Count > 0) { FeatureIDColumnAlias = columns.FirstOrDefault(); } if (!string.IsNullOrEmpty(FeatureIDColumn) && columns.Count > 0) { FeatureIDColumnAlias = columns.FirstOrDefault(c => c.Key == FeatureIDColumn); } }); } }); LayerInformation = information; }