Index: Core/GIS/src/Core.GIS.SharpMap.UI/Core.GIS.SharpMap.UI.csproj =================================================================== diff -u -rbd8291af14687d29a602b64864c37f2e254459f8 -ra772c49f0c4e64a606d832165c4f55f617a6e663 --- Core/GIS/src/Core.GIS.SharpMap.UI/Core.GIS.SharpMap.UI.csproj (.../Core.GIS.SharpMap.UI.csproj) (revision bd8291af14687d29a602b64864c37f2e254459f8) +++ Core/GIS/src/Core.GIS.SharpMap.UI/Core.GIS.SharpMap.UI.csproj (.../Core.GIS.SharpMap.UI.csproj) (revision a772c49f0c4e64a606d832165c4f55f617a6e663) @@ -89,7 +89,6 @@ - Component Fisheye: Tag a772c49f0c4e64a606d832165c4f55f617a6e663 refers to a dead (removed) revision in file `Core/GIS/src/Core.GIS.SharpMap.UI/Forms/CoordinateSystemTypeEditor.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Core.Plugins.SharpMapGis.Gui.csproj =================================================================== diff -u -r3f1a2b8718a744b49b160c89df46dee6b7fb5fdd -ra772c49f0c4e64a606d832165c4f55f617a6e663 --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Core.Plugins.SharpMapGis.Gui.csproj (.../Core.Plugins.SharpMapGis.Gui.csproj) (revision 3f1a2b8718a744b49b160c89df46dee6b7fb5fdd) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Core.Plugins.SharpMapGis.Gui.csproj (.../Core.Plugins.SharpMapGis.Gui.csproj) (revision a772c49f0c4e64a606d832165c4f55f617a6e663) @@ -64,6 +64,7 @@ + @@ -138,7 +139,6 @@ Ribbon.xaml - Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/GridProperties/CoordinateSystemTypeEditor.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/GridProperties/CoordinateSystemTypeEditor.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/GridProperties/CoordinateSystemTypeEditor.cs (revision a772c49f0c4e64a606d832165c4f55f617a6e663) @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing.Design; +using System.Windows.Forms; +using Core.GIS.GeoAPI.CoordinateSystems; +using Core.GIS.SharpMap.Map; +using Core.GIS.SharpMap.UI.Forms; + +namespace Core.Plugins.SharpMapGis.Gui.Forms.GridProperties +{ + public class CoordinateSystemTypeEditor : UITypeEditor + { + public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) + { + return UITypeEditorEditStyle.Modal; + } + + [RefreshProperties(RefreshProperties.All)] + public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) + { + if (context == null || provider == null || context.Instance == null || context.Instance is MapProperties) + { + return EditValue(provider, value); + } + + var selectCoordinateSystemDialog = new SelectCoordinateSystemDialog(new List(Map.CoordinateSystemFactory.SupportedCoordinateSystems), Map.CoordinateSystemFactory.CustomCoordinateSystems); + + if (selectCoordinateSystemDialog.ShowDialog() == DialogResult.OK) + { + return selectCoordinateSystemDialog.SelectedCoordinateSystem; + } + + return value; + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/GridProperties/MapProperties.cs =================================================================== diff -u -r10b304d4b5cb2283801cdb16204baf2a42ab5967 -ra772c49f0c4e64a606d832165c4f55f617a6e663 --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/GridProperties/MapProperties.cs (.../MapProperties.cs) (revision 10b304d4b5cb2283801cdb16204baf2a42ab5967) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/GridProperties/MapProperties.cs (.../MapProperties.cs) (revision a772c49f0c4e64a606d832165c4f55f617a6e663) @@ -2,6 +2,7 @@ using System.Drawing.Design; using System.Windows.Forms; using Core.Common.Gui; +using Core.Common.Gui.Forms.MainWindow; using Core.Common.Utils.Attributes; using Core.GIS.GeoAPI.CoordinateSystems; using Core.GIS.SharpMap.CoordinateSystems.Transformations; @@ -80,5 +81,7 @@ data.ShowGrid = value; } } + + public IMainWindow Owner { get; set; } } } \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/SharpMapGisGuiPlugin.cs =================================================================== diff -u -r0aa7cf8c9a9eba3df2f5e9f90d81540fe314c36a -ra772c49f0c4e64a606d832165c4f55f617a6e663 --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/SharpMapGisGuiPlugin.cs (.../SharpMapGisGuiPlugin.cs) (revision 0aa7cf8c9a9eba3df2f5e9f90d81540fe314c36a) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/SharpMapGisGuiPlugin.cs (.../SharpMapGisGuiPlugin.cs) (revision a772c49f0c4e64a606d832165c4f55f617a6e663) @@ -14,12 +14,18 @@ using Core.Common.Gui.Forms; using Core.Common.Utils; using Core.GIS.GeoAPI.Extensions.Feature; +using Core.GIS.GeoAPI.Geometries; +using Core.GIS.SharpMap.Api.Layers; +using Core.GIS.SharpMap.Data; using Core.GIS.SharpMap.Layers; using Core.GIS.SharpMap.Map; +using Core.GIS.SharpMap.Rendering.Thematics; +using Core.GIS.SharpMap.Styles; using Core.GIS.SharpMap.UI.Forms; using Core.GIS.SharpMap.UI.Tools; using Core.GIS.SharpMap.UI.Tools.Decorations; using Core.Plugins.SharpMapGis.Gui.Forms; +using Core.Plugins.SharpMapGis.Gui.Forms.GridProperties; using Core.Plugins.SharpMapGis.Gui.Forms.MapLegendView; using Core.Plugins.SharpMapGis.Gui.NodePresenters; using PropertyInfo = Core.Common.Gui.PropertyInfo; @@ -162,7 +168,81 @@ public override IEnumerable GetPropertyInfos() { - return SharpMapGisPropertyInfoProvider.GetPropertyInfos(); + yield return new PropertyInfo + { + AfterCreate = properties => properties.Owner = gui.MainWindow + }; + yield return new PropertyInfo(); + yield return new PropertyInfo(); + yield return new PropertyInfo(); + yield return new PropertyInfo + { + AdditionalDataCheck = o => o.Style.GeometryType == typeof(IPoint) + }; + yield return new PropertyInfo + { + AdditionalDataCheck = o => o.Style.GeometryType == typeof(IPolygon) + || o.Style.GeometryType == typeof(IMultiPolygon) + }; + yield return new PropertyInfo + { + AdditionalDataCheck = o => o.Style.GeometryType == typeof(ILineString) + || o.Style.GeometryType == typeof(IMultiLineString) + }; + yield return new PropertyInfo(); + yield return new PropertyInfo + { + AdditionalDataCheck = o => o.GeometryType == typeof(IPoint) + }; + yield return new PropertyInfo + { + AdditionalDataCheck = o => o.GeometryType == typeof(IPolygon) + || o.GeometryType == typeof(IMultiPolygon) + }; + yield return new PropertyInfo + { + AdditionalDataCheck = o => o.GeometryType == typeof(ILineString) + || o.GeometryType == typeof(IMultiLineString) + }; + yield return new PropertyInfo(); + yield return new PropertyInfo + { + AdditionalDataCheck = o => + { + var themeItemVectorStyle = o.Style as VectorStyle; + + return themeItemVectorStyle != null + && themeItemVectorStyle.GeometryType == typeof(IPoint); + }, + GetObjectPropertiesData = o => o.Style + }; + yield return new PropertyInfo + { + AdditionalDataCheck = o => + { + var themeItemVectorStyle = o.Style as VectorStyle; + + return themeItemVectorStyle != null + && (themeItemVectorStyle.GeometryType == typeof(IPolygon) + || themeItemVectorStyle.GeometryType == typeof(IMultiPolygon)); + }, + GetObjectPropertiesData = o => o.Style + }; + yield return new PropertyInfo + { + AdditionalDataCheck = o => + { + var themeItemVectorStyle = o.Style as VectorStyle; + + return themeItemVectorStyle != null + && (themeItemVectorStyle.GeometryType == typeof(ILineString) + || themeItemVectorStyle.GeometryType == typeof(IMultiLineString)); + }, + GetObjectPropertiesData = o => o.Style + }; + yield return new PropertyInfo(); + yield return new PropertyInfo(); + yield return new PropertyInfo(); } public override IEnumerable GetViewInfoObjects() Fisheye: Tag a772c49f0c4e64a606d832165c4f55f617a6e663 refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/SharpMapGisPropertyInfoProvider.cs'. Fisheye: No comparison available. Pass `N' to diff?