Index: Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs =================================================================== diff -u -r98b126b6d45b128483be32b5d76285ddfbe5655b -rb16dadaa41c7f66c4948627472c6595155acf538 --- Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision 98b126b6d45b128483be32b5d76285ddfbe5655b) +++ Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision b16dadaa41c7f66c4948627472c6595155acf538) @@ -43,7 +43,7 @@ /// /// This class describes a map control with configured projection and function mode. /// - public class MapControl : Control, IMapControl + public class MapControl : UserControl, IMapControl { private const int updateTimerInterval = 10; private readonly ILog log = LogManager.GetLogger(typeof(MapControl)); @@ -60,14 +60,20 @@ private RdNewMouseCoordinatesMapExtension mouseCoordinatesMapExtension; private MapDataCollection data; private ImageBasedMapData backgroundMapData; - + private TableLayoutPanel tableLayoutPanel1; + private CheckBox checkBox1; + private CheckBox checkBox2; + private CheckBox checkBox3; + private CheckBox checkBox4; private Timer updateTimer; /// /// Creates a new instance of . /// public MapControl() { + InitializeComponent(); + InitializeMap(); TogglePanning(); @@ -652,5 +658,96 @@ } #endregion + + private void InitializeComponent() + { + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.checkBox2 = new System.Windows.Forms.CheckBox(); + this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.checkBox4 = new System.Windows.Forms.CheckBox(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanel1.AutoSize = true; + this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent; + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 25F)); + this.tableLayoutPanel1.Controls.Add(this.checkBox1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.checkBox2, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.checkBox3, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.checkBox4, 1, 1); + this.tableLayoutPanel1.Location = new System.Drawing.Point(541, 3); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(50, 50); + this.tableLayoutPanel1.TabIndex = 0; + // + // checkBox1 + // + this.checkBox1.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox1.AutoSize = true; + this.checkBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.checkBox1.Image = global::Core.Components.DotSpatial.Forms.Properties.Resources.MapPanZoomImage; + this.checkBox1.Location = new System.Drawing.Point(3, 3); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(19, 19); + this.checkBox1.TabIndex = 0; + this.checkBox1.UseVisualStyleBackColor = true; + // + // checkBox2 + // + this.checkBox2.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox2.AutoSize = true; + this.checkBox2.Dock = System.Windows.Forms.DockStyle.Fill; + this.checkBox2.Image = global::Core.Components.DotSpatial.Forms.Properties.Resources.zoomrectangle; + this.checkBox2.Location = new System.Drawing.Point(28, 3); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.Size = new System.Drawing.Size(19, 19); + this.checkBox2.TabIndex = 1; + this.checkBox2.UseVisualStyleBackColor = true; + // + // checkBox3 + // + this.checkBox3.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox3.AutoSize = true; + this.checkBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.checkBox3.Image = global::Core.Components.DotSpatial.Forms.Properties.Resources.zoomextents; + this.checkBox3.Location = new System.Drawing.Point(3, 28); + this.checkBox3.Name = "checkBox3"; + this.checkBox3.Size = new System.Drawing.Size(19, 19); + this.checkBox3.TabIndex = 2; + this.checkBox3.UseVisualStyleBackColor = true; + // + // checkBox4 + // + this.checkBox4.Appearance = System.Windows.Forms.Appearance.Button; + this.checkBox4.AutoSize = true; + this.checkBox4.Dock = System.Windows.Forms.DockStyle.Fill; + this.checkBox4.Image = global::Core.Components.DotSpatial.Forms.Properties.Resources.map_pin; + this.checkBox4.Location = new System.Drawing.Point(28, 28); + this.checkBox4.Name = "checkBox4"; + this.checkBox4.Size = new System.Drawing.Size(19, 19); + this.checkBox4.TabIndex = 3; + this.checkBox4.UseVisualStyleBackColor = true; + // + // MapControl + // + this.Controls.Add(this.tableLayoutPanel1); + this.Name = "MapControl"; + this.Size = new System.Drawing.Size(594, 526); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } } } \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.resx =================================================================== diff -u --- Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.resx (revision 0) +++ Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.resx (revision b16dadaa41c7f66c4948627472c6595155acf538) @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r98b126b6d45b128483be32b5d76285ddfbe5655b -rb16dadaa41c7f66c4948627472c6595155acf538 --- Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 98b126b6d45b128483be32b5d76285ddfbe5655b) +++ Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision b16dadaa41c7f66c4948627472c6595155acf538) @@ -40,7 +40,7 @@ // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -82,6 +82,16 @@ } /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap map_pin { + get { + object obj = ResourceManager.GetObject("map_pin", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// /// Looks up a localized string similar to {0} De achtergrondkaart kan nu niet getoond worden.. /// internal static string MapControl_HandleBruTileInitializationException_Message_0_therefore_cannot_show_background_layer { @@ -90,5 +100,35 @@ "ackground_layer", resourceCulture); } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap MapPanZoomImage { + get { + object obj = ResourceManager.GetObject("MapPanZoomImage", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap zoomextents { + get { + object obj = ResourceManager.GetObject("zoomextents", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap zoomrectangle { + get { + object obj = ResourceManager.GetObject("zoomrectangle", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } Index: Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.resx =================================================================== diff -u -rbb84e8f229fbe284207a2ca2f4ce2244f4ce6076 -rb16dadaa41c7f66c4948627472c6595155acf538 --- Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.resx (.../Resources.resx) (revision bb84e8f229fbe284207a2ca2f4ce2244f4ce6076) +++ Core/Components/src/Core.Components.DotSpatial.Forms/Properties/Resources.resx (.../Resources.resx) (revision b16dadaa41c7f66c4948627472c6595155acf538) @@ -120,4 +120,17 @@ {0} De achtergrondkaart kan nu niet getoond worden. + + + ..\Resources\MapPanZoomImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\map-pin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\zoomextents.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\zoomrectangle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial.Forms/Resources/MapPanZoomImage.png =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial.Forms/Resources/map-pin.png =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial.Forms/Resources/zoomextents.png =================================================================== diff -u Binary files differ Index: Core/Components/src/Core.Components.DotSpatial.Forms/Resources/zoomrectangle.png =================================================================== diff -u Binary files differ