Index: Core/Components/src/Core.Components.DotSpatial/BaseMap.cs =================================================================== diff -u --- Core/Components/src/Core.Components.DotSpatial/BaseMap.cs (revision 0) +++ Core/Components/src/Core.Components.DotSpatial/BaseMap.cs (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Windows.Forms; +using Core.Components.DotSpatial.Properties; +using DotSpatial.Controls; +using log4net; + +namespace Core.Components.DotSpatial +{ + public sealed class BaseMap : Control + { + private ICollection data; + + public ICollection Data + { + get + { + return data; + } + set + { + data = value; + if (data != null) + { + LoadData(); + } + } + } + + private static readonly ILog log = LogManager.GetLogger(typeof(BaseMap)); + private Map map; + + public BaseMap() + { + InitializeMapView(); + } + + /// + /// Initialize the for the + /// + private void InitializeMapView() + { + data = new List(); + map = new Map + { + Dock = DockStyle.Fill, + FunctionMode = FunctionMode.Pan, + }; + Controls.Add(map); + } + + /// + /// Loads the data from the files given in and shows them on the + /// + private void LoadData() + { + try + { + foreach (string fileName in data) + { + map.AddLayer(fileName); + } + } + catch (ApplicationException applicationException) + { + log.Error(Resources.BaseMap_LoadData_Cannot_open_file_extension); + } + catch (FileNotFoundException fileException) + { + log.ErrorFormat(Resources.BaseMap_LoadData_File_loading_failded__The_file__0__could_not_be_found, fileException.FileName); + } + } + } +} \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj =================================================================== diff -u -rb496c527d9bbcf3b768f94d2aa06f9439ac4a6cf -ra76df67ff1bcdceeb8297286983072a14dd1229e --- Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision b496c527d9bbcf3b768f94d2aa06f9439ac4a6cf) +++ Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -32,10 +32,26 @@ AllRules.ruleset + + ..\..\..\..\packages\DotSpatial.Controls.1.7\lib\net40-Client\DotSpatial.Controls.dll + True + ..\..\..\..\packages\DotSpatial.Data.1.7\lib\net40-Client\DotSpatial.Data.dll True + + ..\..\..\..\packages\DotSpatial.Data.Forms.1.7\lib\net40-Client\DotSpatial.Data.Forms.dll + True + + + ..\..\..\..\packages\DotSpatial.Extensions.1.7\lib\net40-Client\DotSpatial.Extensions.dll + True + + + ..\..\..\..\packages\DotSpatial.Modeling.Forms.1.7\lib\net40-Client\DotSpatial.Modeling.Forms.dll + True + ..\..\..\..\packages\DotSpatial.Mono.1.7\lib\net40-Client\DotSpatial.Mono.dll True @@ -44,22 +60,47 @@ ..\..\..\..\packages\DotSpatial.Projections.1.7\lib\net40-Client\DotSpatial.Projections.dll True + + ..\..\..\..\packages\DotSpatial.Projections.Forms.1.7\lib\net40-Client\DotSpatial.Projections.Forms.dll + True + ..\..\..\..\packages\DotSpatial.Serialization.1.7\lib\net40-Client\DotSpatial.Serialization.dll True + + ..\..\..\..\packages\DotSpatial.Symbology.1.7\lib\net40-Client\DotSpatial.Symbology.dll + True + + + ..\..\..\..\packages\DotSpatial.Symbology.Forms.1.7\lib\net40-Client\DotSpatial.Symbology.Forms.dll + True + ..\..\..\..\packages\DotSpatial.Topology.1.7\lib\net40-Client\DotSpatial.Topology.dll True + + ..\..\..\..\packages\log4net.2.0.4\lib\net40-full\log4net.dll + True + + Properties\GlobalAssembly.cs + + Component + + + True + True + Resources.resx + @@ -69,7 +110,83 @@ + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Het bestand {0} kon niet worden gevonden. + + + Bestand is niet compleet. + + + + ..\Resources\DR10_cross_sections.shp;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_cross_sections.dbf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\dr10_cross_sections.prj;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_cross_sections.sbn;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_cross_sections.sbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_cross_sections.shx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_cross_sections.shp.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\DR10_dammen_caissons.shp;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dammen_caissons.dbf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\dr10_dammen_caissons.prj;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dammen_caissons.sbn;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dammen_caissons.sbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dammen_caissons.shx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dammen_caissons.shp.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\DR10_dijkvakgebieden.shp;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dijkvakgebieden.dbf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dijkvakgebieden.prj;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dijkvakgebieden.sbn;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dijkvakgebieden.sbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dijkvakgebieden.shx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_dijkvakgebieden.shp.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + Kan bestand met deze extensie niet openen. + + \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_cross_sections.dbf =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_cross_sections.sbn =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_cross_sections.sbx =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_cross_sections.shp =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_cross_sections.shp.xml =================================================================== diff -u --- Core/Components/src/Core.Components.DotSpatial/Resources/DR10_cross_sections.shp.xml (revision 0) +++ Core/Components/src/Core.Components.DotSpatial/Resources/DR10_cross_sections.shp.xml (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1,2 @@ + +20120831085620001.0TRUECalculateGridConvergenceAngle DR10_cross_sections HoekNoord GEOGRAPHIC NONECalculateGridConvergenceAngle DR10_cross_sections HoekNoord GEOGRAPHIC NONECalculateField DR10_cross_sections HoekNoord GetAzimuthPolyline(!Shape!) PYTHON "import math\ndef GetAzimuthPolyline(shape):\n radian = 0.25\n degrees = radian\n return degrees"CalculateField DR10_cross_sections HoekNoord GetAzimuthPolyline( !Shape!) PYTHON "import math\ndef GetAzimuthPolyline(shape):\n radian = math.atan((201357 - 201039)/(515430 - 515470))\n degrees = radian * 180 / math.pi\n return degrees"CalculateField DR10_cross_sections HoekNoord GetAzimuthPolyline( !Shape!) PYTHON "import math\ndef GetAzimuthPolyline(shape):\n radian = shape.length\n degrees = radian\n return degrees"CalculateField DR10_cross_sections HoekNoord GetAzimuthPolyline(!Shape!) PYTHON_9.3 "import math\ndef GetAzimuthPolyline(shape):\n radian = shape.lastpoint.X\n degrees = radian\n return degrees"CalculateField DR10_cross_sections HoekNoord GetAzimuthPolyline( !Shape!) PYTHON_9.3 "import math\ndef GetAzimuthPolyline(shape):\n radian = math.atan((shape.lastpoint.x - shape.firstpoint.x)/(shape.lastpoint.y - shape.firstpoint.y))\n degrees = radian * 180 / math.pi\n return degrees"CalculateField DR10_cross_sections HoekNoord GetAzimuthPolyline( !Shape!) PYTHON_9.3 "import math\ndef GetAzimuthPolyline(shape):\n radian = math.atan((shape.lastpoint.x - shape.firstpoint.x)/(shape.lastpoint.y - shape.firstpoint.y))\n degrees = radian * 180 / math.pi\n return degrees"CalculateField DR10_cross_sections SEGMENT_ID ""'segment_" + [PROFIELNAA]" VB #CalculateField DR10_cross_sections SEGMENT_ID ""segment_" + [PROFIELNAA]" VB #CalculateField DR10_cross_sections NAAM_MSTAB "[NAAM_MSTAB] + "_p"" VB # Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_cross_sections.shx =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dammen_caissons.dbf =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dammen_caissons.sbn =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dammen_caissons.sbx =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dammen_caissons.shp =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dammen_caissons.shp.xml =================================================================== diff -u --- Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dammen_caissons.shp.xml (revision 0) +++ Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dammen_caissons.shp.xml (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1,2 @@ + +20130208161246001.0TRUEfile://\\D00347\D$\GIS DAM\20130208 Ringtoets dataset WGS DR10 Piping\dataset piping\DR10_dammen_caissonsLocal Area Network Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dammen_caissons.shx =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.dbf =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.prj =================================================================== diff -u --- Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.prj (revision 0) +++ Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.prj (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1 @@ +PROJCS["RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Double_Stereographic"],PARAMETER["False_Easting",155000.0],PARAMETER["False_Northing",463000.0],PARAMETER["Central_Meridian",5.38763888888889],PARAMETER["Scale_Factor",0.9999079],PARAMETER["Latitude_Of_Origin",52.15616055555555],UNIT["Meter",1.0]] \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.sbn =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.sbx =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.shp =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.shp.xml =================================================================== diff -u --- Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.shp.xml (revision 0) +++ Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.shp.xml (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1,2 @@ + +20120830150142001.0FALSEDR10_dijkvakgebieden0020.000file://\\D00347\D$\Ringtoets dataset WGS DR10 Piping\dataset piping\DR10_dijkvakgebieden.shpLocal Area NetworkProjectedGCS_AmersfoortLinear Unit: Meter (1.000000)RD_New<ProjectedCoordinateSystem xsi:type='typens:ProjectedCoordinateSystem' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/10.0'><WKT>PROJCS[&quot;RD_New&quot;,GEOGCS[&quot;GCS_Amersfoort&quot;,DATUM[&quot;D_Amersfoort&quot;,SPHEROID[&quot;Bessel_1841&quot;,6377397.155,299.1528128]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]],PROJECTION[&quot;Double_Stereographic&quot;],PARAMETER[&quot;False_Easting&quot;,155000.0],PARAMETER[&quot;False_Northing&quot;,463000.0],PARAMETER[&quot;Central_Meridian&quot;,5.38763888888889],PARAMETER[&quot;Scale_Factor&quot;,0.9999079],PARAMETER[&quot;Latitude_Of_Origin&quot;,52.15616055555555],UNIT[&quot;Meter&quot;,1.0],AUTHORITY[&quot;EPSG&quot;,28992]]</WKT><XOrigin>-30515500</XOrigin><YOrigin>-30279500</YOrigin><XYScale>146716411.36275291</XYScale><ZOrigin>-100000</ZOrigin><ZScale>10000</ZScale><MOrigin>-100000</MOrigin><MScale>10000</MScale><XYTolerance>0.001</XYTolerance><ZTolerance>0.001</ZTolerance><MTolerance>0.001</MTolerance><HighPrecision>true</HighPrecision><WKID>28992</WKID></ProjectedCoordinateSystem>Buffer DR10_vakindeling_piping "D:\Ringtoets dataset WGS DR10 Piping\dataset piping\DR10_dijkvakgebieden.shp" "1000 Meters" RIGHT FLAT NONE #20120830150142002012083015014200Microsoft Windows XP Version 5.1 (Build 2600) Service Pack 3; ESRI ArcGIS 10.0.3.3600DR10_dijkvakgebiedenShapefile0.000datasetEPSG7.4.10SimpleFALSE0FALSEFALSEDR10_dijkvakgebiedenFeature Class0FIDFIDOID400Internal feature number.ESRISequential unique whole numbers that are automatically generated.ShapeShapeGeometry000Feature geometry.ESRICoordinates defining the features.FID_1FID_1Integer990OBJECTIDOBJECTIDDouble10100FID_2FID_2Integer990IdIdInteger660dwarsprofidwarsprofiString1000PROFIELNAAPROFIELNAAString1700SEGMENT_IDSEGMENT_IDString2600SOILGEOMETSOILGEOMETString1900PROBABILITPROBABILITInteger990CALCULATIOCALCULATIOString1400BUFF_DISTBUFF_DISTDouble190020120830 Index: Core/Components/src/Core.Components.DotSpatial/Resources/DR10_dijkvakgebieden.shx =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial/Resources/dr10_cross_sections.prj =================================================================== diff -u --- Core/Components/src/Core.Components.DotSpatial/Resources/dr10_cross_sections.prj (revision 0) +++ Core/Components/src/Core.Components.DotSpatial/Resources/dr10_cross_sections.prj (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1 @@ +PROJCS["RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Double_Stereographic"],PARAMETER["False_Easting",155000.0],PARAMETER["False_Northing",463000.0],PARAMETER["Central_Meridian",5.38763888888889],PARAMETER["Scale_Factor",0.9999079],PARAMETER["Latitude_Of_Origin",52.15616055555555],UNIT["Meter",1.0]] \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial/Resources/dr10_dammen_caissons.prj =================================================================== diff -u --- Core/Components/src/Core.Components.DotSpatial/Resources/dr10_dammen_caissons.prj (revision 0) +++ Core/Components/src/Core.Components.DotSpatial/Resources/dr10_dammen_caissons.prj (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1 @@ +PROJCS["RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Double_Stereographic"],PARAMETER["False_Easting",155000.0],PARAMETER["False_Northing",463000.0],PARAMETER["Central_Meridian",5.38763888888889],PARAMETER["Scale_Factor",0.9999079],PARAMETER["Latitude_Of_Origin",52.15616055555555],UNIT["Meter",1.0]] \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial/packages.config =================================================================== diff -u -rb496c527d9bbcf3b768f94d2aa06f9439ac4a6cf -ra76df67ff1bcdceeb8297286983072a14dd1229e --- Core/Components/src/Core.Components.DotSpatial/packages.config (.../packages.config) (revision b496c527d9bbcf3b768f94d2aa06f9439ac4a6cf) +++ Core/Components/src/Core.Components.DotSpatial/packages.config (.../packages.config) (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -1,8 +1,16 @@  + + + + + + + + \ No newline at end of file Index: Core/Components/test/Core.Components.DotSpatial.Test/BaseMapTest.cs =================================================================== diff -u --- Core/Components/test/Core.Components.DotSpatial.Test/BaseMapTest.cs (revision 0) +++ Core/Components/test/Core.Components.DotSpatial.Test/BaseMapTest.cs (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1,72 @@ +using System; +using System.Collections.ObjectModel; +using System.Windows.Forms; +using Core.Common.TestUtil; +using Core.Components.DotSpatial.Properties; +using DotSpatial.Controls; +using NUnit.Framework; +using Rhino.Mocks; + +namespace Core.Components.DotSpatial.Test +{ + [TestFixture] + public class BaseMapTest + { + [Test] + public void DefaultConstructor_PropertiesSet() + { + // Setup + var mocks = new MockRepository(); + var map = mocks.StrictMock(); + mocks.ReplayAll(); + + // Call + var baseMap = new BaseMap(); + + // Assert + Assert.IsInstanceOf(baseMap); + Assert.IsNotNull(baseMap.Data); + Assert.IsNotNull(map); + mocks.VerifyAll(); + } + + [Test] + public void Data_NotNull_DataSet() + { + // Setup + var map = new BaseMap(); + var fileData = new Collection { "1", "2", "3" }; + + // Call + map.Data = fileData; + + //Assert + CollectionAssert.AreEqual(fileData, map.Data); + } + + [Test] + public void Data_NotKnownFileType_HandlesApplicationExceptionAndWriteLog() + { + // Setup + var map = new BaseMap(); + + // Call / Assert + Action action = () => map.Data = new Collection { "test" }; + TestHelper.AssertLogMessageIsGenerated(action, Resources.BaseMap_LoadData_Cannot_open_file_extension); + } + + [Test] + public void Data_FileNotFound_HandlesFileNotFoundExceptionAndWriteLog() + { + // Setup + var map = new BaseMap(); + var fileName = "test.shp"; + var completeFilePath = string.Format("{0}\\{1}", Environment.CurrentDirectory, fileName); + var expectedLog = string.Format(Resources.BaseMap_LoadData_File_loading_failded__The_file__0__could_not_be_found, completeFilePath); + + // Call / Assert + Action action = () => map.Data = new Collection { fileName }; + TestHelper.AssertLogMessageIsGenerated(action, expectedLog); + } + } +} \ No newline at end of file Index: Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj =================================================================== diff -u -rb496c527d9bbcf3b768f94d2aa06f9439ac4a6cf -ra76df67ff1bcdceeb8297286983072a14dd1229e --- Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj (.../Core.Components.DotSpatial.Test.csproj) (revision b496c527d9bbcf3b768f94d2aa06f9439ac4a6cf) +++ Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj (.../Core.Components.DotSpatial.Test.csproj) (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -39,10 +39,26 @@ MinimumRecommendedRules.ruleset + + ..\..\..\..\packages\DotSpatial.Controls.1.7\lib\net40-Client\DotSpatial.Controls.dll + True + ..\..\..\..\packages\DotSpatial.Data.1.7\lib\net40-Client\DotSpatial.Data.dll True + + ..\..\..\..\packages\DotSpatial.Data.Forms.1.7\lib\net40-Client\DotSpatial.Data.Forms.dll + True + + + ..\..\..\..\packages\DotSpatial.Extensions.1.7\lib\net40-Client\DotSpatial.Extensions.dll + True + + + ..\..\..\..\packages\DotSpatial.Modeling.Forms.1.7\lib\net40-Client\DotSpatial.Modeling.Forms.dll + True + ..\..\..\..\packages\DotSpatial.Mono.1.7\lib\net40-Client\DotSpatial.Mono.dll True @@ -51,10 +67,22 @@ ..\..\..\..\packages\DotSpatial.Projections.1.7\lib\net40-Client\DotSpatial.Projections.dll True + + ..\..\..\..\packages\DotSpatial.Projections.Forms.1.7\lib\net40-Client\DotSpatial.Projections.Forms.dll + True + ..\..\..\..\packages\DotSpatial.Serialization.1.7\lib\net40-Client\DotSpatial.Serialization.dll True + + ..\..\..\..\packages\DotSpatial.Symbology.1.7\lib\net40-Client\DotSpatial.Symbology.dll + True + + + ..\..\..\..\packages\DotSpatial.Symbology.Forms.1.7\lib\net40-Client\DotSpatial.Symbology.Forms.dll + True + ..\..\..\..\packages\DotSpatial.Topology.1.7\lib\net40-Client\DotSpatial.Topology.dll True @@ -63,22 +91,62 @@ ..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll True + + ..\..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll + True + + + + + True + True + TestResources.resx + + + {D749EE4C-CE50-4C17-BF01-9A953028C126} + Core.Common.TestUtil + {aa47e858-a2a7-470e-8b2d-c76ae8ed9ccd} Core.Components.DotSpatial - False + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + ResXFileCodeGenerator + TestResources.Designer.cs + + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\DR10_segments.shp;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_segments.prj;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_segments.sbn;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_segments.sbx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_segments.shx;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\DR10_segments.shp.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + \ No newline at end of file Index: Core/Components/test/Core.Components.DotSpatial.Test/Resources/DR10_segments.prj =================================================================== diff -u --- Core/Components/test/Core.Components.DotSpatial.Test/Resources/DR10_segments.prj (revision 0) +++ Core/Components/test/Core.Components.DotSpatial.Test/Resources/DR10_segments.prj (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1 @@ +PROJCS["RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Double_Stereographic"],PARAMETER["False_Easting",155000.0],PARAMETER["False_Northing",463000.0],PARAMETER["Central_Meridian",5.38763888888889],PARAMETER["Scale_Factor",0.9999079],PARAMETER["Latitude_Of_Origin",52.15616055555555],UNIT["Meter",1.0]] \ No newline at end of file Index: Core/Components/test/Core.Components.DotSpatial.Test/Resources/DR10_segments.sbn =================================================================== diff -u Binary files differ Index: Core/Components/test/Core.Components.DotSpatial.Test/Resources/DR10_segments.sbx =================================================================== diff -u Binary files differ Index: Core/Components/test/Core.Components.DotSpatial.Test/Resources/DR10_segments.shp =================================================================== diff -u Binary files differ Index: Core/Components/test/Core.Components.DotSpatial.Test/Resources/DR10_segments.shp.xml =================================================================== diff -u --- Core/Components/test/Core.Components.DotSpatial.Test/Resources/DR10_segments.shp.xml (revision 0) +++ Core/Components/test/Core.Components.DotSpatial.Test/Resources/DR10_segments.shp.xml (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1,2 @@ + +20140521142317001.0TRUECalculateField DR10_segments CALCULATIO "Stability" VB #CalculateField DR10_segments CALCULATIO "Stability" VB # Index: Core/Components/test/Core.Components.DotSpatial.Test/Resources/DR10_segments.shx =================================================================== diff -u Binary files differ Index: Core/Components/test/Core.Components.DotSpatial.Test/packages.config =================================================================== diff -u -rb496c527d9bbcf3b768f94d2aa06f9439ac4a6cf -ra76df67ff1bcdceeb8297286983072a14dd1229e --- Core/Components/test/Core.Components.DotSpatial.Test/packages.config (.../packages.config) (revision b496c527d9bbcf3b768f94d2aa06f9439ac4a6cf) +++ Core/Components/test/Core.Components.DotSpatial.Test/packages.config (.../packages.config) (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -1,9 +1,17 @@  + + + + + + + + \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.DotSpatial/Commands/OpenMapViewCommand.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.DotSpatial/Commands/OpenMapViewCommand.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.DotSpatial/Commands/OpenMapViewCommand.cs (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -0,0 +1,40 @@ +using System.Collections.ObjectModel; +using Core.Common.Gui; +using Core.Plugins.DotSpatial.Forms; + +namespace Core.Plugins.DotSpatial.Commands +{ + /// + /// This class describes the command for opening a with some random data. + /// + public class OpenMapViewCommand : IGuiCommand + { + public bool Enabled + { + get + { + return true; + } + } + + public bool Checked + { + get + { + return false; + } + } + + public void Execute(params object[] arguments) + { + Gui.DocumentViewsResolver.OpenViewForData(new Collection + { + "Resources/DR10_dijkvakgebieden.shp", + "Resources/DR10_cross_sections.shp", + "Resources/DR10_dammen_caissons.shp" + }); + } + + public IGui Gui { get; set; } + } +} Index: Core/Plugins/src/Core.Plugins.DotSpatial/Core.Plugins.DotSpatial.csproj =================================================================== diff -u -rfbd9fd3d39fe4fb3440776db6feeebe06bf44e0f -ra76df67ff1bcdceeb8297286983072a14dd1229e --- Core/Plugins/src/Core.Plugins.DotSpatial/Core.Plugins.DotSpatial.csproj (.../Core.Plugins.DotSpatial.csproj) (revision fbd9fd3d39fe4fb3440776db6feeebe06bf44e0f) +++ Core/Plugins/src/Core.Plugins.DotSpatial/Core.Plugins.DotSpatial.csproj (.../Core.Plugins.DotSpatial.csproj) (revision a76df67ff1bcdceeb8297286983072a14dd1229e) @@ -32,10 +32,26 @@ AllRules.ruleset + + ..\..\..\..\packages\DotSpatial.Controls.1.7\lib\net40-Client\DotSpatial.Controls.dll + True + ..\..\..\..\packages\DotSpatial.Data.1.7\lib\net40-Client\DotSpatial.Data.dll True + + ..\..\..\..\packages\DotSpatial.Data.Forms.1.7\lib\net40-Client\DotSpatial.Data.Forms.dll + True + + + ..\..\..\..\packages\DotSpatial.Extensions.1.7\lib\net40-Client\DotSpatial.Extensions.dll + True + + + ..\..\..\..\packages\DotSpatial.Modeling.Forms.1.7\lib\net40-Client\DotSpatial.Modeling.Forms.dll + True + ..\..\..\..\packages\DotSpatial.Mono.1.7\lib\net40-Client\DotSpatial.Mono.dll True @@ -44,10 +60,22 @@ ..\..\..\..\packages\DotSpatial.Projections.1.7\lib\net40-Client\DotSpatial.Projections.dll True + + ..\..\..\..\packages\DotSpatial.Projections.Forms.1.7\lib\net40-Client\DotSpatial.Projections.Forms.dll + True + ..\..\..\..\packages\DotSpatial.Serialization.1.7\lib\net40-Client\DotSpatial.Serialization.dll True + + ..\..\..\..\packages\DotSpatial.Symbology.1.7\lib\net40-Client\DotSpatial.Symbology.dll + True + + + ..\..\..\..\packages\DotSpatial.Symbology.Forms.1.7\lib\net40-Client\DotSpatial.Symbology.Forms.dll + True + ..\..\..\..\packages\DotSpatial.Topology.1.7\lib\net40-Client\DotSpatial.Topology.dll True @@ -80,9 +108,16 @@ Properties\GlobalAssembly.cs + + UserControl + + + MapDataView.cs + MapRibbon.xaml + True @@ -130,6 +165,7 @@ +