Index: src/DeltaShell/DeltaShell.Plugins.SharpMapGis.Gui/Forms/GridProperties/VectorLayerProperties.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a --- src/DeltaShell/DeltaShell.Plugins.SharpMapGis.Gui/Forms/GridProperties/VectorLayerProperties.cs (.../VectorLayerProperties.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ src/DeltaShell/DeltaShell.Plugins.SharpMapGis.Gui/Forms/GridProperties/VectorLayerProperties.cs (.../VectorLayerProperties.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) @@ -17,35 +17,35 @@ private const int MaximumAllowedSize = 999999; private const int MinimumAllowedSize = 0; - [DynamicReadOnlyValidationMethod] - public bool OnIsLayerNameReadOnly(string propertyName) - { - return data.NameIsReadOnly; - } - - [DynamicVisibleValidationMethod] - public bool IsPropertyVisible(string propertyName) - { - return data.Theme == null; - } - [ResourcesCategory(typeof(Resources), "Categories_General")] [ResourcesDisplayName(typeof(Resources), "Common_Name_DisplayName")] [ResourcesDescription(typeof(Resources), "VectorLayerProperties_Name_Description")] [DynamicReadOnly] public string Name { - get { return data.Name; } - set { data.Name = value; } + get + { + return data.Name; + } + set + { + data.Name = value; + } } [ResourcesCategory(typeof(Resources), "Categories_General")] [DisplayName("Opacity")] [Description("Defines the layer opacity, expressed as a value between 0.0 and 1.0. A value of 0.0 indicates fully transparent, whereas a value of 1.0 indicates fully opaque.")] public float Opacity { - get { return data.Opacity; } - set { data.Opacity = (float)Math.Min(1.0, Math.Max(0.0, value)); } + get + { + return data.Opacity; + } + set + { + data.Opacity = (float) Math.Min(1.0, Math.Max(0.0, value)); + } } [DynamicVisible] @@ -54,9 +54,12 @@ [ResourcesDescription(typeof(Resources), "VectorLayerProperties_LineColor_Description")] public Color LineColor { - get { return data.Style.Line.Color; } - set + get { + return data.Style.Line.Color; + } + set + { var style = data.Style; style.Line = new Pen(value, style.Line.Width); data.Style = style; @@ -70,8 +73,14 @@ [ResourcesDescription(typeof(Resources), "VectorLayerProperties_LineWidth_Description")] public float LineWidth { - get { return data.Style.Line.Width; } - set { data.Style.Line = new Pen(data.Style.Line.Color, MathUtils.ClipValue(value, MinimumAllowedSize, MaximumAllowedSize)); } + get + { + return data.Style.Line.Width; + } + set + { + data.Style.Line = new Pen(data.Style.Line.Color, MathUtils.ClipValue(value, MinimumAllowedSize, MaximumAllowedSize)); + } } [DynamicVisible] @@ -80,8 +89,14 @@ [ResourcesDescription(typeof(Resources), "VectorLayerProperties_OutlineColor_Description")] public Color OutlineColor { - get { return data.Style.Outline.Color; } - set { data.Style.Outline = new Pen(value, data.Style.Outline.Width); } + get + { + return data.Style.Outline.Color; + } + set + { + data.Style.Outline = new Pen(value, data.Style.Outline.Width); + } } [DynamicVisible] @@ -91,8 +106,14 @@ [ResourcesDescription(typeof(Resources), "VectorLayerProperties_OutlineWidth_Description")] public float OutlineWidth { - get { return data.Style.Outline.Width; } - set { data.Style.Outline = new Pen(data.Style.Outline.Color, MathUtils.ClipValue(value, MinimumAllowedSize, MaximumAllowedSize)); } + get + { + return data.Style.Outline.Width; + } + set + { + data.Style.Outline = new Pen(data.Style.Outline.Color, MathUtils.ClipValue(value, MinimumAllowedSize, MaximumAllowedSize)); + } } [DynamicVisible] @@ -101,8 +122,14 @@ [ResourcesDescription(typeof(Resources), "VectorLayerProperties_FillColor_Description")] public Color FillColor { - get { return ((SolidBrush) data.Style.Fill).Color; } - set { data.Style.Fill = new SolidBrush(value); } + get + { + return ((SolidBrush) data.Style.Fill).Color; + } + set + { + data.Style.Fill = new SolidBrush(value); + } } [DynamicVisible] @@ -111,8 +138,14 @@ [ResourcesDescription(typeof(Resources), "PointStyleProperties_Symbol_Description")] public Bitmap Symbol { - get { return data.Style.Symbol; } - set { data.Style.Symbol = value; } + get + { + return data.Style.Symbol; + } + set + { + data.Style.Symbol = value; + } } [DynamicVisible] @@ -121,28 +154,58 @@ [ResourcesDescription(typeof(Resources), "VectorLayerProperties_SymbolScale_Description")] public float SymbolScale { - get { return data.Style.SymbolScale; } - set { data.Style.SymbolScale = value; } + get + { + return data.Style.SymbolScale; + } + set + { + data.Style.SymbolScale = value; + } } [Category("Coordinates")] [DisplayName("Map coordinate system")] [Description("Coordinate system (geographic or projected) on which the map is represented.")] public ICoordinateTransformation MapCoordinateSystem { - get { return data.CoordinateTransformation; } - set { data.CoordinateTransformation = value; } + get + { + return data.CoordinateTransformation; + } + set + { + data.CoordinateTransformation = value; + } } [Category("Coordinates")] [DisplayName("Layer contents coordinate system")] [Description("Coordinate system (geographic or projected) in which the objects contained in the selected layer are declared.")] public ICoordinateSystem LayerCoordinateSystem { - get { return data.CoordinateSystem; } - set { data.CoordinateSystem = value; } + get + { + return data.CoordinateSystem; + } + set + { + data.CoordinateSystem = value; + } } + [DynamicReadOnlyValidationMethod] + public bool OnIsLayerNameReadOnly(string propertyName) + { + return data.NameIsReadOnly; + } + + [DynamicVisibleValidationMethod] + public bool IsPropertyVisible(string propertyName) + { + return data.Theme == null; + } + /* [Category("Default Style")] TODO: When this gets re-enabled, add displayname and description public int FillTransparency