Skip to content

Commit 62ba582

Browse files
committed
Moving some very verbose debug messages to the new trace method which can easily be disabled.
1 parent e2d487e commit 62ba582

106 files changed

Lines changed: 2118 additions & 1554 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/compile.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
<!DOCTYPE html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
8+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
89
<meta name="description" content="MapWindow is an Open Source GIS desktop application. On this page is explained how to compile MapWindow and MapWinGIS">
910
<meta name="author" content="Paul Meems">
1011
<link rel="icon" href="../../favicon.ico">

src/MW5.Api/Concrete/SpatialReference.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class SpatialReference: ISpatialReference
1313

1414
public SpatialReference()
1515
{
16-
Logger.Current.Debug("In SpatialReference");
16+
Logger.Current.Trace("In SpatialReference");
1717
_projection = new GeoProjection();
1818
}
1919

src/MW5.Api/Map/BoundMapControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class BoundMapControl : MapControl, IMap
1818

1919
public BoundMapControl()
2020
{
21-
Logger.Current.Debug("In BoundMapControl");
21+
Logger.Current.Trace("In BoundMapControl");
2222
MapCursorChanged += BoundMapControl_MapCursorChanged;
2323
}
2424

src/MW5.Data/Helpers/TileCacheHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static class TileCacheHelper
2525
/// </summary>
2626
public static void InitDatabase(string filename, TilesMaxAge maxAge)
2727
{
28-
Logger.Current.Debug("In TileCacheHelper.InitDatabase()");
28+
Logger.Current.Trace("In TileCacheHelper.InitDatabase()");
2929
if (_initialized)
3030
{
3131
return;

src/MW5.Data/Repository/DataRepository.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class DataRepository : IRepository
3333

3434
public DataRepository(IGeoDatabaseService databaseService, IFileDialogService fileDialogService)
3535
{
36-
Logger.Current.Debug("In DataRepository");
36+
Logger.Current.Trace("In DataRepository");
3737
if (databaseService == null) throw new ArgumentNullException("databaseService");
3838

3939
_databaseService = databaseService;
@@ -93,7 +93,7 @@ public IEnumerable<TmsProvider> DefaultTmsProviders
9393

9494
public void AddFolderLink()
9595
{
96-
Logger.Current.Debug("In AddFolderLink");
96+
Logger.Current.Trace("In AddFolderLink");
9797
string path;
9898
if (_fileDialogService.ChooseFolder(string.Empty, out path))
9999
{
@@ -126,7 +126,7 @@ public void RemoveFolderLink(string path, bool silent)
126126

127127
public void AddConnectionWithPrompt(GeoDatabaseType? databaseType = null)
128128
{
129-
Logger.Current.Debug("In AddConnectionWithPrompt");
129+
Logger.Current.Trace("In AddConnectionWithPrompt");
130130
var connection = _databaseService.PromptUserForConnection(databaseType);
131131
if (connection != null)
132132
{
@@ -136,7 +136,7 @@ public void AddConnectionWithPrompt(GeoDatabaseType? databaseType = null)
136136

137137
public void AddConnection(DatabaseConnection connection)
138138
{
139-
Logger.Current.Debug("In AddConnection");
139+
Logger.Current.Trace("In AddConnection");
140140
if (connection == null)
141141
{
142142
throw new ArgumentNullException("connection");
@@ -195,7 +195,7 @@ public void ClearWmsServers()
195195

196196
private void AddDefautlTmsProviders(IAppContext context)
197197
{
198-
Logger.Current.Debug("Start AddDefautlTmsProviders");
198+
Logger.Current.Trace("Start AddDefautlTmsProviders");
199199
foreach (var p in context.Map.Tiles.Providers.Where(p => !p.Custom))
200200
{
201201
if (p.Name.StartsWithIgnoreCase("google"))
@@ -216,7 +216,7 @@ private void AddDefautlTmsProviders(IAppContext context)
216216

217217
_defaultTmsProviders.Add(provider);
218218
}
219-
Logger.Current.Debug("End AddDefautlTmsProviders");
219+
Logger.Current.Trace("End AddDefautlTmsProviders");
220220
}
221221

222222
private void AddRootFolders()
@@ -262,7 +262,7 @@ private bool HasFolder(string path)
262262

263263
private void Init()
264264
{
265-
Logger.Current.Debug("Start DataRepository.Init()");
265+
Logger.Current.Trace("Start DataRepository.Init()");
266266
_folders = new List<string>();
267267

268268
ExpandedFolders = new List<string>();
@@ -284,7 +284,7 @@ private void Init()
284284
new RepositoryGroup(TmsProvider.DefaultGroupId, "Default"),
285285
new RepositoryGroup(TmsProvider.CustomGroupId, "Custom")
286286
};
287-
Logger.Current.Debug("End DataRepository.Init()");
287+
Logger.Current.Trace("End DataRepository.Init()");
288288
}
289289
}
290290
}

src/MW5.Data/Services/GeoDatabaseService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ public class GeoDatabaseService: IGeoDatabaseService
1414

1515
public GeoDatabaseService(IAppContext context)
1616
{
17-
Logger.Current.Debug("In GeoDatabaseService");
17+
Logger.Current.Trace("In GeoDatabaseService");
1818
if (context == null) throw new ArgumentNullException("context");
1919
_context = context;
2020
}
2121

2222
public void ImportLayer()
2323
{
24-
Logger.Current.Debug("In GeoDatabaseService.ImportLayer()");
24+
Logger.Current.Trace("In GeoDatabaseService.ImportLayer()");
2525
_context.Container.Run<ImportLayerPresenter>();
2626
}
2727

2828
public DatabaseConnection PromptUserForConnection(GeoDatabaseType? databaseType = null)
2929
{
30-
Logger.Current.Debug("In GeoDatabaseService.PromptUserForConnection()");
30+
Logger.Current.Trace("In GeoDatabaseService.PromptUserForConnection()");
3131
var p = _context.Container.GetInstance<AddConnectionPresenter>();
3232

3333
var model = new AddConnectionModel(databaseType);

src/MW5.Data/Views/AddConnectionPresenter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class AddConnectionPresenter : BasePresenter<IAddConnectionView, AddConne
2424
public AddConnectionPresenter(IAddConnectionView view, IFileDialogService fileDialog)
2525
: base(view)
2626
{
27-
Logger.Current.Debug("Start AddConnectionPresenter");
27+
Logger.Current.Trace("Start AddConnectionPresenter");
2828
if (fileDialog == null) throw new ArgumentNullException("fileDialog");
2929

3030
// PM 20160302 Added:
@@ -37,7 +37,7 @@ public AddConnectionPresenter(IAddConnectionView view, IFileDialogService fileDi
3737
view.TestConnection += TestConnection;
3838

3939
view.ConnectionChanged += OnConnectionChanged;
40-
Logger.Current.Debug("End AddConnectionPresenter");
40+
Logger.Current.Trace("End AddConnectionPresenter");
4141
}
4242

4343
public override bool ViewOkClicked()

src/MW5.Plugins/Concrete/AppConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ public void AddRecentProject(string path)
496496

497497
public void SetDefaults()
498498
{
499-
Logger.Current.Debug("Start AppConfig.SetDefaults()");
499+
Logger.Current.Trace("Start AppConfig.SetDefaults()");
500500
AnimationOnZooming = AutoToggle.Auto;
501501
BingApiKey = string.Empty;
502502
CacheRenderingData = false;
@@ -620,7 +620,7 @@ public void SetDefaults()
620620
ZoomBarVerbosity = ZoomBarVerbosity.Full;
621621
ZoomBehavior = ZoomBehavior.UseTileLevels;
622622
ZoomBoxStyle = ZoomBoxStyle.Blue;
623-
Logger.Current.Debug("End AppConfig.SetDefaults()");
623+
Logger.Current.Trace("End AppConfig.SetDefaults()");
624624
}
625625

626626
[OnDeserializing]
Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
1+
// -------------------------------------------------------------------------------------------
2+
// <copyright file="IViewInternal.cs" company="MapWindow OSS Team - www.mapwindow.org">
3+
// MapWindow OSS Team - 2016
4+
// </copyright>
5+
// -------------------------------------------------------------------------------------------
6+
7+
using System;
68
using System.Windows.Forms;
79

810
namespace MW5.Plugins.Mvp
911
{
1012
public interface IViewInternal
1113
{
12-
void ShowView(IWin32Window parent = null);
13-
void Close();
14-
bool Visible { get; }
1514
event Action OkClicked;
15+
1616
ViewStyle Style { get; }
17+
18+
bool Visible { get; }
19+
1720
void BeforeClose();
21+
22+
void Close();
23+
24+
void ShowView(IWin32Window parent = null);
25+
1826
void UpdateView();
1927
}
2028

21-
public interface IViewInternal<TModel>: IViewInternal
29+
public interface IViewInternal<TModel> : IViewInternal
2230
{
23-
void InitInternal(TModel model);
2431
TModel Model { get; }
32+
33+
void InitInternal(TModel model);
2534
}
26-
}
35+
}

src/MW5.Plugins/PluginManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ internal class PluginManager : IPluginManager
4444
/// </summary>
4545
public PluginManager(IApplicationContainer container, MainPlugin mainPlugin)
4646
{
47-
Logger.Current.Debug("In PluginManager");
47+
Logger.Current.Trace("In PluginManager");
4848
if (container == null) throw new ArgumentNullException("container");
4949
if (mainPlugin == null) throw new ArgumentNullException("mainPlugin");
5050

0 commit comments

Comments
 (0)