Skip to content

Commit a389f0f

Browse files
committed
More minor changes
1 parent 981a349 commit a389f0f

16 files changed

Lines changed: 108 additions & 130 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,5 @@ src/Plugins/MW5.NtkPlugin/
167167
src/Plugins/MW5.TemplateNtk/ClassDiagram1.cd
168168
src/Plugins/MW5.TemplateNtk/
169169
src/Plugins/MW5.TopoGISPlugin/
170+
test/MW5.Test/packages/
171+
src/.nuget/

src/MW5.Tools/MW5.Tools.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
@@ -51,18 +51,23 @@
5151
<ItemGroup>
5252
<Reference Include="Syncfusion.Grid.Grouping.Windows, Version=15.3450.0.26, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
5353
<SpecificVersion>False</SpecificVersion>
54+
<Private>False</Private>
5455
</Reference>
5556
<Reference Include="Syncfusion.Grid.Windows, Version=15.3450.0.26, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
5657
<SpecificVersion>False</SpecificVersion>
58+
<Private>False</Private>
5759
</Reference>
5860
<Reference Include="Syncfusion.Grouping.Base, Version=15.3450.0.26, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
5961
<SpecificVersion>False</SpecificVersion>
62+
<Private>False</Private>
6063
</Reference>
6164
<Reference Include="Syncfusion.Shared.Base, Version=15.3450.0.26, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
6265
<SpecificVersion>False</SpecificVersion>
66+
<Private>False</Private>
6367
</Reference>
6468
<Reference Include="Syncfusion.Tools.Windows, Version=15.3450.0.26, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
6569
<SpecificVersion>False</SpecificVersion>
70+
<Private>False</Private>
6671
</Reference>
6772
<Reference Include="System" />
6873
<Reference Include="System.ComponentModel.DataAnnotations" />

src/MW5/Forms/SplashView.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.ComponentModel;
4-
using System.Data;
5-
using System.Drawing;
6-
using System.Linq;
7-
using System.Reflection;
8-
using System.Text;
9-
using System.Threading.Tasks;
1+
using System.Reflection;
102
using System.Windows.Forms;
113

124
namespace MW5.Views

src/Plugins/MW5.TemplatePlugin/CompositionRoot.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright file="CompositionRoot.cs" company="MapWindow OSS Team - www.mapwindow.org">
3-
// MapWindow OSS Team - 2015
3+
// MapWindow OSS Team - 2015 - 2017
44
// </copyright>
55
// <summary>
66
// The composition root.
@@ -25,9 +25,7 @@ internal static class CompositionRoot
2525
/// <summary>
2626
/// Composing the container
2727
/// </summary>
28-
/// <param name="container">
29-
/// The container.
30-
/// </param>
28+
/// <param name="container">The container.</param>
3129
public static void Compose(IApplicationContainer container)
3230
{
3331
}

src/Plugins/MW5.TemplatePlugin/CustomGisTool.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
using MW5.Plugins.Concrete;
1+
using MW5.Plugins.Concrete;
72
using MW5.Plugins.Enums;
83
using MW5.Plugins.Helpers;
94
using MW5.Plugins.Interfaces;
10-
using MW5.Plugins.Services;
115
using MW5.Tools.Model;
126

137
namespace MW5.Plugins.TemplatePlugin
@@ -51,6 +45,12 @@ public override bool Run(ITaskHandle task)
5145
return true;
5246
}
5347

48+
/// <summary>
49+
/// A method called after the main IGisTool.Run method is successfully finished.
50+
/// Is executed on the UI thread. Typically used to save output datasources.
51+
/// Default implementation automatically handles values assigned to OutputLayerInfo.Result.
52+
/// </summary>
53+
/// <returns></returns>
5454
public override bool AfterRun()
5555
{
5656
Log.Info("Custom tool was executed successfully");

src/Plugins/MW5.TemplatePlugin/InitPlugin.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright file="InitPlugin.cs" company="MapWindow OSS Team - www.mapwindow.org">
3-
// MapWindow OSS Team - 2015
3+
// MapWindow OSS Team - 2015 - 2017
44
// </copyright>
55
// <summary>
66
// The initialization of the plugin.
@@ -25,35 +25,36 @@ namespace MW5.Plugins.TemplatePlugin
2525
#endregion
2626

2727
/// <summary>
28-
/// The template plugin.
28+
/// The template plugin.
2929
/// </summary>
30-
[MapWindowPlugin]
30+
/// <seealso cref="MW5.Plugins.Concrete.BasePlugin" />
31+
[MapWindowPlugin(loadOnStartUp: false)]
3132
public class InitPlugin : BasePlugin
3233
{
3334
#region Fields
3435

3536
/// <summary>
36-
/// The context of the application, holding the menu, layers, project, etc.
37+
/// The context of the application, holding the menu, layers, project, etc.
3738
/// </summary>
3839
private IAppContext _context;
3940

4041
/// <summary>
41-
/// The reference to the map listener class, is used in the constructor
42+
/// The reference to the map listener class, is used in the constructor
4243
/// </summary>
4344
private MapListener _mapListener;
4445

4546
/// <summary>
46-
/// The reference to the menu generator class, is used in the constructor
47+
/// The reference to the menu generator class, is used in the constructor
4748
/// </summary>
4849
private MenuGenerator _menuGenerator;
4950

5051
/// <summary>
51-
/// The reference to the menu listener class, is used in the constructor
52+
/// The reference to the menu listener class, is used in the constructor
5253
/// </summary>
5354
private MenuListener _menuListener;
5455

5556
/// <summary>
56-
/// The reference to the sample dock user control, is used in the constructor
57+
/// The reference to the sample dock user control, is used in the constructor
5758
/// </summary>
5859
private SampleDockWindow _sampleDockWindow;
5960

@@ -64,6 +65,7 @@ public class InitPlugin : BasePlugin
6465
/// <summary>
6566
/// Set up container for dependency injection:
6667
/// </summary>
68+
/// <param name="container">The container.</param>
6769
protected override void RegisterServices(IApplicationContainer container)
6870
{
6971
CompositionRoot.Compose(container);
@@ -72,9 +74,7 @@ protected override void RegisterServices(IApplicationContainer container)
7274
/// <summary>
7375
/// The initialize method, called when the plug-in is loaded
7476
/// </summary>
75-
/// <param name="context">
76-
/// The application context.
77-
/// </param>
77+
/// <param name="context">The application context.</param>
7878
public override void Initialize(IAppContext context)
7979
{
8080
// Save to local properties:

src/Plugins/MW5.TemplatePlugin/MW5.TemplatePlugin.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
4747
</PropertyGroup>
4848
<ItemGroup>
49-
<Reference Include="Syncfusion.Shared.Base, Version=14.1450.0.46, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
49+
<Reference Include="Syncfusion.Shared.Base, Version=15.3450.0.26, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
5050
<SpecificVersion>False</SpecificVersion>
5151
</Reference>
52-
<Reference Include="Syncfusion.Tools.Windows, Version=14.1450.0.46, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
52+
<Reference Include="Syncfusion.Tools.Windows, Version=15.3450.0.26, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
5353
<SpecificVersion>False</SpecificVersion>
5454
</Reference>
5555
<Reference Include="System" />

src/Plugins/MW5.TemplatePlugin/MapListener.cs

Lines changed: 21 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright file="MapListener.cs" company="MapWindow OSS Team - www.mapwindow.org">
3-
// MapWindow OSS Team - 2015
3+
// MapWindow OSS Team - 2015 - 2017
44
// </copyright>
55
// <summary>
66
// The map listener.
@@ -23,14 +23,14 @@ namespace MW5.Plugins.TemplatePlugin
2323
#endregion
2424

2525
/// <summary>
26-
/// The map listener.
26+
/// The map listener.
2727
/// </summary>
2828
public class MapListener
2929
{
3030
#region Fields
3131

3232
/// <summary>
33-
/// The context of the application, holding the menu, layers, project, etc.
33+
/// The context of the application, holding the menu, layers, project, etc.
3434
/// </summary>
3535
private readonly IAppContext _context;
3636

@@ -44,33 +44,17 @@ public class MapListener
4444
#region Constructors and Destructors
4545

4646
/// <summary>
47-
/// Initializes a new instance of the <see cref="MapListener"/> class.
47+
/// Initializes a new instance of the <see cref="MapListener" /> class.
4848
/// </summary>
49-
/// <param name="context">
50-
/// The application context.
51-
/// </param>
52-
/// <param name="plugin">
53-
/// The plugin.
54-
/// </param>
55-
/// <param name="sampleDockWindow">
56-
/// Reference to the sample dock window
57-
/// </param>
49+
/// <param name="context">The application context.</param>
50+
/// <param name="plugin">The plugin.</param>
51+
/// <param name="sampleDockWindow">Reference to the sample dock window</param>
5852
public MapListener(IAppContext context, InitPlugin plugin, SampleDockWindow sampleDockWindow)
5953
{
60-
if (context == null)
61-
{
62-
throw new ArgumentNullException("context");
63-
}
64-
65-
if (plugin == null)
66-
{
67-
throw new ArgumentNullException("plugin");
68-
}
69-
70-
if (sampleDockWindow == null)
71-
{
72-
throw new ArgumentNullException("sampleDockWindow");
73-
}
54+
// Check input:
55+
if (context == null) throw new ArgumentNullException("context");
56+
if (plugin == null) throw new ArgumentNullException("plugin");
57+
if (sampleDockWindow == null) throw new ArgumentNullException("sampleDockWindow");
7458

7559
// Save local references:
7660
_context = context;
@@ -80,9 +64,9 @@ public MapListener(IAppContext context, InitPlugin plugin, SampleDockWindow samp
8064
Debug.WriteLine("Number of loaded layers; " + _context.Layers.Count);
8165

8266
// Create event handlers:
83-
plugin.ExtentsChanged += this.PluginOnExtentsChanged;
84-
plugin.ChooseLayer += this.PluginOnChooseLayer;
85-
plugin.LayerSelected += this.PluginOnLayerSelected;
67+
plugin.ExtentsChanged += PluginOnExtentsChanged;
68+
plugin.ChooseLayer += PluginOnChooseLayer;
69+
plugin.LayerSelected += PluginOnLayerSelected;
8670
}
8771

8872
#endregion
@@ -92,12 +76,8 @@ public MapListener(IAppContext context, InitPlugin plugin, SampleDockWindow samp
9276
/// <summary>
9377
/// The plugin on choose layer.
9478
/// </summary>
95-
/// <param name="map">
96-
/// The map.
97-
/// </param>
98-
/// <param name="e">
99-
/// The e.
100-
/// </param>
79+
/// <param name="map">The map.</param>
80+
/// <param name="e">The ChooseLayer EventArgs.</param>
10181
private void PluginOnChooseLayer(IMuteMap map, ChooseLayerEventArgs e)
10282
{
10383
if (e.LayerHandle == -1)
@@ -113,12 +93,8 @@ private void PluginOnChooseLayer(IMuteMap map, ChooseLayerEventArgs e)
11393
/// <summary>
11494
/// The extents changed event handler
11595
/// </summary>
116-
/// <param name="map">
117-
/// The map.
118-
/// </param>
119-
/// <param name="e">
120-
/// The event arguments
121-
/// </param>
96+
/// <param name="map">The map.</param>
97+
/// <param name="e">The event arguments</param>
12298
private void PluginOnExtentsChanged(IMuteMap map, EventArgs e)
12399
{
124100
_sampleDockWindow.Write("MapListener.PluginOnExtentsChanged", map.Extents.ToString());
@@ -127,20 +103,16 @@ private void PluginOnExtentsChanged(IMuteMap map, EventArgs e)
127103
/// <summary>
128104
/// The layer selected event handler
129105
/// </summary>
130-
/// <param name="legend">
131-
/// The legend.
132-
/// </param>
133-
/// <param name="e">
134-
/// The layer event arguments
135-
/// </param>
106+
/// <param name="legend">The legend.</param>
107+
/// <param name="e">The layer event arguments</param>
136108
private void PluginOnLayerSelected(IMuteLegend legend, LayerEventArgs e)
137109
{
138110
if (e.LayerHandle == -1)
139111
{
140112
return;
141113
}
142114

143-
string filename = _context.Layers.ItemByHandle(e.LayerHandle).Filename;
115+
var filename = _context.Layers.ItemByHandle(e.LayerHandle).Filename;
144116
if (File.Exists(filename))
145117
{
146118
filename = Path.GetFileName(filename);

src/Plugins/MW5.TemplatePlugin/Menu/MenuCommands.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright file="MenuCommands.cs" company="MapWindow OSS Team - www.mapwindow.org">
3-
// MapWindow OSS Team - 2015
3+
// MapWindow OSS Team - 2015 - 2017
44
// </copyright>
55
// <summary>
66
// The menu commands.
@@ -26,11 +26,9 @@ public class MenuCommands : CommandProviderBase
2626
#region Constructors and Destructors
2727

2828
/// <summary>
29-
/// Initializes a new instance of the <see cref="MenuCommands"/> class.
29+
/// Initializes a new instance of the <see cref="MenuCommands" /> class.
3030
/// </summary>
31-
/// <param name="identity">
32-
/// The identity.
33-
/// </param>
31+
/// <param name="identity">The identity.</param>
3432
public MenuCommands(PluginIdentity identity)
3533
: base(identity)
3634
{
@@ -44,7 +42,7 @@ public MenuCommands(PluginIdentity identity)
4442
/// The commands of the toolbar buttons.
4543
/// </summary>
4644
/// <returns>
47-
/// The <see cref="MenuCommand"/> as an IEnumerable
45+
/// The <see cref="MenuCommand" /> as an IEnumerable
4846
/// </returns>
4947
public override IEnumerable<MenuCommand> GetCommands()
5048
{

0 commit comments

Comments
 (0)