[mapguide-commits] r8735 - in trunk/Tools/Maestro: LocalConfigure Maestro Maestro.AddIn.ExtendedObjectModels Maestro.AddIn.FdoToolbox Maestro.AddIn.Local Maestro.AddIn.Rest Maestro.AddIn.Scripting Maestro.AddInManager Maestro.Base Maestro.Base/Editor Maestro.Base/Services Maestro.Base/UI Maestro.Editors Maestro.Editors/Common/Expression Maestro.Editors/Diff Maestro.Editors/FeatureSource/Preview Maestro.Editors/FeatureSource/Providers/Odbc/SubEditors Maestro.Editors/Fusion/MapEditors Maestro.Editors/Generic/XmlEditor Maestro.Editors/LayerDefinition/Vector Maestro.Editors/LayerDefinition/Vector/StyleEditors Maestro.Editors/LoadProcedure Maestro.Editors/MapDefinition Maestro.LiveMapEditor Maestro.Login Maestro.MapViewer Maestro.Packaging Maestro.Shared.UI MaestroAPITestRunner MaestroAPITests MaestroFsPreview MgCooker MgCooker.Cmd MpuCalc OSGeo.FDO.Expressions OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI/Feature OSGeo.MapGuide.MaestroAPI/Mapping OSGeo.MapGuide.MaestroAPI/Schema OSGeo.MapGui de.MaestroAPI/SchemaOverrides OSGeo.MapGuide.MaestroAPI.Http OSGeo.MapGuide.MaestroAPI.Local OSGeo.MapGuide.MaestroAPI.Native OSGeo.MapGuide.MaestroAPI.Tests OSGeo.MapGuide.ObjectModel.Tests OSGeo.MapGuide.ObjectModels OSGeo.MapGuide.ObjectModels/Properties OSGeo.MapGuide.ObjectModels/RuntimeMap/v3_0_0 OSGeo.MapGuide.ObjectModels/WatermarkDefinition Properties ProviderTemplate RtMapInspector SignMapGuideApi Thirdparty/SharpDevelop
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Aug 10 05:54:47 PDT 2015
Author: jng
Date: 2015-08-10 05:54:47 -0700 (Mon, 10 Aug 2015)
New Revision: 8735
Added:
trunk/Tools/Maestro/Properties/CodeAnalysisRules.cs
Modified:
trunk/Tools/Maestro/LocalConfigure/LocalConfigure.csproj
trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj
trunk/Tools/Maestro/Maestro.AddIn.FdoToolbox/Maestro.AddIn.FdoToolbox.csproj
trunk/Tools/Maestro/Maestro.AddIn.Local/Maestro.AddIn.Local.csproj
trunk/Tools/Maestro/Maestro.AddIn.Rest/Maestro.AddIn.Rest.csproj
trunk/Tools/Maestro/Maestro.AddIn.Scripting/Maestro.AddIn.Scripting.csproj
trunk/Tools/Maestro/Maestro.AddInManager/Maestro.AddInManager.csproj
trunk/Tools/Maestro/Maestro.Base/Editor/EditorContentBase.cs
trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj
trunk/Tools/Maestro/Maestro.Base/MaestroPaths.cs
trunk/Tools/Maestro/Maestro.Base/Services/IDragDropHandler.cs
trunk/Tools/Maestro/Maestro.Base/UI/ResourcePropertiesDialog.cs
trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs
trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorerDragDropHandler.cs
trunk/Tools/Maestro/Maestro.Editors/Common/Expression/FdoExpressionCompletionDataProvider.cs
trunk/Tools/Maestro/Maestro.Editors/Diff/XmlCompareUtil.cs
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.cs
trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/SubEditors/UnmanagedCtrl.cs
trunk/Tools/Maestro/Maestro.Editors/Fusion/MapEditors/EditorFactory.cs
trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/XmlEditorOptions.cs
trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/FeaturePreviewRender.cs
trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.cs
trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs
trunk/Tools/Maestro/Maestro.Editors/LoadProcedure/LoadProcedureEditorCtrl.cs
trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
trunk/Tools/Maestro/Maestro.Editors/MapDefinition/LiveMapEditorLegend.cs
trunk/Tools/Maestro/Maestro.Editors/RepositoryIcons.cs
trunk/Tools/Maestro/Maestro.LiveMapEditor/Maestro.LiveMapEditor.csproj
trunk/Tools/Maestro/Maestro.Login/Maestro.Login.csproj
trunk/Tools/Maestro/Maestro.MapViewer/LegendPresenter.cs
trunk/Tools/Maestro/Maestro.MapViewer/Maestro.MapViewer.csproj
trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs
trunk/Tools/Maestro/Maestro.Packaging/Maestro.Packaging.csproj
trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs
trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs
trunk/Tools/Maestro/Maestro.Shared.UI/Maestro.Shared.UI.csproj
trunk/Tools/Maestro/Maestro.Shared.UI/TabFactory.cs
trunk/Tools/Maestro/Maestro.Shared.UI/WaitCursor.cs
trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs
trunk/Tools/Maestro/Maestro/Maestro.csproj
trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner.csproj
trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner64.csproj
trunk/Tools/Maestro/MaestroAPITests/MaestroAPITests.csproj
trunk/Tools/Maestro/MaestroAPITests/TestControl.cs
trunk/Tools/Maestro/MaestroFsPreview/MaestroFsPreview.csproj
trunk/Tools/Maestro/MgCooker.Cmd/MgCooker.Cmd.csproj
trunk/Tools/Maestro/MgCooker/MgCooker.csproj
trunk/Tools/Maestro/MpuCalc/MpuCalc.csproj
trunk/Tools/Maestro/OSGeo.FDO.Expressions/FdoTerminalNames.cs
trunk/Tools/Maestro/OSGeo.FDO.Expressions/OSGeo.FDO.Expressions.csproj
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/OSGeo.MapGuide.MaestroAPI.Http.csproj
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/OSGeo.MapGuide.MaestroAPI.Local.csproj
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/OSGeo.MapGuide.MaestroAPI.Native32-2.2.0.csproj
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/OSGeo.MapGuide.MaestroAPI.Tests.csproj
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ConnectionProviderRegistry.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/CredentialWriter.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Enums.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Feature/FeatureBase.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/RasterWmsItem.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SiteVersion.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs
trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/OSGeo.MapGuide.ObjectModels.Tests.csproj
trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/TileSetAbstractTests.cs
trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/OSGeo.MapGuide.ObjectModels.csproj
trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs
trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Properties/AssemblyInfo.cs
trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs
trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/RuntimeMap/v3_0_0/RuntimeMapImpl.cs
trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/WatermarkCollectionUtil.cs
trunk/Tools/Maestro/Properties/GlobalAssemblyInfo.cs
trunk/Tools/Maestro/ProviderTemplate/ProviderTemplate.csproj
trunk/Tools/Maestro/RtMapInspector/RtMapInspector.csproj
trunk/Tools/Maestro/SignMapGuideApi/SignMapGuideApi.csproj
trunk/Tools/Maestro/Thirdparty/SharpDevelop/GlobalAssemblyInfo.cs
Log:
#2565: More RES code styling fixes.
Also add a global CodeAnalysisRules.cs to define global RES diagnostic suppression rules.
Modified: trunk/Tools/Maestro/LocalConfigure/LocalConfigure.csproj
===================================================================
--- trunk/Tools/Maestro/LocalConfigure/LocalConfigure.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/LocalConfigure/LocalConfigure.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -60,6 +60,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
Modified: trunk/Tools/Maestro/Maestro/Maestro.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro/Maestro.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro/Maestro.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -120,6 +120,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.AddIn.ExtendedObjectModels/Maestro.AddIn.ExtendedObjectModels.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -64,6 +64,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.AddIn.FdoToolbox/Maestro.AddIn.FdoToolbox.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.FdoToolbox/Maestro.AddIn.FdoToolbox.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.AddIn.FdoToolbox/Maestro.AddIn.FdoToolbox.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -62,6 +62,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.AddIn.Local/Maestro.AddIn.Local.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Local/Maestro.AddIn.Local.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.AddIn.Local/Maestro.AddIn.Local.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -90,6 +90,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.AddIn.Rest/Maestro.AddIn.Rest.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Rest/Maestro.AddIn.Rest.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.AddIn.Rest/Maestro.AddIn.Rest.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -54,6 +54,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.AddIn.Scripting/Maestro.AddIn.Scripting.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.AddIn.Scripting/Maestro.AddIn.Scripting.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.AddIn.Scripting/Maestro.AddIn.Scripting.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -71,6 +71,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.AddInManager/Maestro.AddInManager.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.AddInManager/Maestro.AddInManager.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.AddInManager/Maestro.AddInManager.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -63,6 +63,9 @@
</Reference>
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.Base/Editor/EditorContentBase.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/EditorContentBase.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/EditorContentBase.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -338,7 +338,7 @@
/// </summary>
public bool IsNew
{
- get { return _svc != null ? _svc.IsNew : true; } //Mono
+ get { return _svc == null || _svc.IsNew; } //Mono
}
/// <summary>
Modified: trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -73,6 +73,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.Base/MaestroPaths.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/MaestroPaths.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Base/MaestroPaths.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -29,7 +29,7 @@
/// <summary>
/// Contains path information
/// </summary>
- public class MaestroPaths
+ public static class MaestroPaths
{
/// <summary>
/// The name of the application
Modified: trunk/Tools/Maestro/Maestro.Base/Services/IDragDropHandler.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Services/IDragDropHandler.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Base/Services/IDragDropHandler.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -52,7 +52,7 @@
bool HandleDrop(IServerConnection conn, string file, string folderId);
}
- internal class HandlerUtil
+ internal static class HandlerUtil
{
public static bool ExtensionInList(string[] extensions, string fileExtension)
{
Modified: trunk/Tools/Maestro/Maestro.Base/UI/ResourcePropertiesDialog.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/ResourcePropertiesDialog.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Base/UI/ResourcePropertiesDialog.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -659,28 +659,42 @@
{
ResourceSecurityTypeUsersUser u = new ResourceSecurityTypeUsersUser();
u.Name = (lvi.Tag as UserListUser).Name;
- if (lvi.ImageIndex == RWUSER)
- u.Permissions = PermissionsType.rw;
- else if (lvi.ImageIndex == ROUSER)
- u.Permissions = PermissionsType.r;
- else if (lvi.ImageIndex == NOUSER)
- u.Permissions = PermissionsType.n;
- else
- continue;
+ switch (lvi.ImageIndex)
+ {
+ case RWUSER:
+ u.Permissions = PermissionsType.rw;
+ break;
+ case ROUSER:
+ u.Permissions = PermissionsType.r;
+ break;
+ case NOUSER:
+ u.Permissions = PermissionsType.n;
+ break;
+ default:
+ continue;
+ }
+
users.Add(u);
}
else if (lvi.Tag as GroupListGroup != null && lvi.ImageIndex != IHGROUP)
{
ResourceSecurityTypeGroupsGroup g = new ResourceSecurityTypeGroupsGroup();
g.Name = (lvi.Tag as GroupListGroup).Name;
- if (lvi.ImageIndex == RWGROUP)
- g.Permissions = PermissionsType.rw;
- else if (lvi.ImageIndex == ROGROUP)
- g.Permissions = PermissionsType.r;
- else if (lvi.ImageIndex == NOGROUP)
- g.Permissions = PermissionsType.n;
- else
- continue;
+ switch (lvi.ImageIndex)
+ {
+ case RWGROUP:
+ g.Permissions = PermissionsType.rw;
+ break;
+ case ROGROUP:
+ g.Permissions = PermissionsType.r;
+ break;
+ case NOGROUP:
+ g.Permissions = PermissionsType.n;
+ break;
+ default:
+ continue;
+ }
+
groups.Add(g);
}
}
Modified: trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorer.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -674,7 +674,7 @@
parent = test;
test = test + parts[partIndex - 1] + "/";
- matches = data.Where(x => x.ResourceId.ResourceId.StartsWith(test)).Count();
+ matches = data.Count(x => x.ResourceId.ResourceId.StartsWith(test));
if (matches > 0 && matches != data.Length)
break;
@@ -719,7 +719,7 @@
break;
test = test + parts[partIndex];
- matches = data.Where(x => x.ResourceId.StartsWith(test)).Count();
+ matches = data.Count(x => x.ResourceId.StartsWith(test));
}
return parent;
}
Modified: trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorerDragDropHandler.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorerDragDropHandler.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Base/UI/SiteExplorerDragDropHandler.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -32,7 +32,7 @@
namespace Maestro.Base.UI
{
- internal sealed class SiteExplorerDragDropHandler
+ internal static class SiteExplorerDragDropHandler
{
internal static void OnDragEnter(ISiteExplorer sender, DragEventArgs e)
{
Modified: trunk/Tools/Maestro/Maestro.Editors/Common/Expression/FdoExpressionCompletionDataProvider.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Common/Expression/FdoExpressionCompletionDataProvider.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/Common/Expression/FdoExpressionCompletionDataProvider.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -256,32 +256,30 @@
private Descriptor CreateFdoConditionDescriptor(string cond)
{
- if (cond == "Null") //NOXLATE
+ switch (cond)
{
- return new Descriptor()
- {
- Name = cond.ToString().ToUpper(),
- Description = "[property] NULL" //NOXLATE
- };
+ case "Null":
+ return new Descriptor()
+ {
+ Name = cond.ToString().ToUpper(),
+ Description = "[property] NULL" //NOXLATE
+ };
+ case "In":
+ return new Descriptor()
+ {
+ Name = cond.ToString().ToUpper(),
+ Description = "[property] IN ([value1], [value2], ..., [valueN])", //NOXLATE
+ AppendText = " ([value1], [value2])" //NOXLATE
+ };
+ case "Like":
+ return new Descriptor()
+ {
+ Name = cond.ToString().ToUpper(),
+ Description = "[property] LIKE [string value]", //NOXLATE
+ AppendText = " [string value]" //NOXLATE
+ };
}
- else if (cond == "In") //NOXLATE
- {
- return new Descriptor()
- {
- Name = cond.ToString().ToUpper(),
- Description = "[property] IN ([value1], [value2], ..., [valueN])", //NOXLATE
- AppendText = " ([value1], [value2])" //NOXLATE
- };
- }
- else if (cond == "Like") //NOXLATE
- {
- return new Descriptor()
- {
- Name = cond.ToString().ToUpper(),
- Description = "[property] LIKE [string value]", //NOXLATE
- AppendText = " [string value]" //NOXLATE
- };
- }
+
return null; //Handled by operators
}
@@ -375,53 +373,59 @@
{
var desc = new Descriptor();
desc.Name = prop.Name;
-
- if (prop.Type == PropertyDefinitionType.Geometry)
+ switch (prop.Type)
{
- var g = (GeometricPropertyDefinition)prop;
- desc.Description = string.Format(Strings.FsPreview_GeometryPropertyNodeTooltip,
- g.Name,
- g.Description,
- g.GeometryTypesToString(),
- g.IsReadOnly,
- g.HasElevation,
- g.HasMeasure,
- g.SpatialContextAssociation,
- Environment.NewLine);
+ case PropertyDefinitionType.Geometry:
+ {
+ var g = (GeometricPropertyDefinition)prop;
+ desc.Description = string.Format(Strings.FsPreview_GeometryPropertyNodeTooltip,
+ g.Name,
+ g.Description,
+ g.GeometryTypesToString(),
+ g.IsReadOnly,
+ g.HasElevation,
+ g.HasMeasure,
+ g.SpatialContextAssociation,
+ Environment.NewLine);
+ }
+ break;
+ case PropertyDefinitionType.Data:
+ {
+ var d = (DataPropertyDefinition)prop;
+ desc.Description = string.Format(Strings.FsPreview_DataPropertyNodeTooltip,
+ d.Name,
+ d.Description,
+ d.DataType.ToString(),
+ d.IsNullable,
+ d.IsReadOnly,
+ d.Length,
+ d.Precision,
+ d.Scale,
+ Environment.NewLine);
+ }
+ break;
+ case PropertyDefinitionType.Raster:
+ {
+ var r = (RasterPropertyDefinition)prop;
+ desc.Description = string.Format(Strings.FsPreview_RasterPropertyNodeTooltip,
+ r.Name,
+ r.Description,
+ r.IsNullable,
+ r.DefaultImageXSize,
+ r.DefaultImageYSize,
+ r.SpatialContextAssociation,
+ Environment.NewLine);
+ }
+ break;
+ default:
+ {
+ desc.Description = string.Format(Strings.FsPreview_GenericPropertyTooltip,
+ prop.Name,
+ prop.Type.ToString(),
+ Environment.NewLine);
+ }
+ break;
}
- else if (prop.Type == PropertyDefinitionType.Data)
- {
- var d = (DataPropertyDefinition)prop;
- desc.Description = string.Format(Strings.FsPreview_DataPropertyNodeTooltip,
- d.Name,
- d.Description,
- d.DataType.ToString(),
- d.IsNullable,
- d.IsReadOnly,
- d.Length,
- d.Precision,
- d.Scale,
- Environment.NewLine);
- }
- else if (prop.Type == PropertyDefinitionType.Raster)
- {
- var r = (RasterPropertyDefinition)prop;
- desc.Description = string.Format(Strings.FsPreview_RasterPropertyNodeTooltip,
- r.Name,
- r.Description,
- r.IsNullable,
- r.DefaultImageXSize,
- r.DefaultImageYSize,
- r.SpatialContextAssociation,
- Environment.NewLine);
- }
- else
- {
- desc.Description = string.Format(Strings.FsPreview_GenericPropertyTooltip,
- prop.Name,
- prop.Type.ToString(),
- Environment.NewLine);
- }
return desc;
}
Modified: trunk/Tools/Maestro/Maestro.Editors/Diff/XmlCompareUtil.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Diff/XmlCompareUtil.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/Diff/XmlCompareUtil.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -55,7 +55,7 @@
/// <summary>
/// A helper utility that performs the necessary preparation of two resoures for XML comparison
/// </summary>
- public class XmlCompareUtil
+ public static class XmlCompareUtil
{
/// <summary>
/// Prepares the source and target resource content for XML comparison
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Preview/LocalFeatureSourcePreviewCtrl.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -171,58 +171,64 @@
var propNode = new TreeNode(prop.Name);
propNode.Text = prop.Name;
propNode.Tag = prop;
-
- if (prop.Type == PropertyDefinitionType.Geometry)
+ switch (prop.Type)
{
- var g = (GeometricPropertyDefinition)prop;
- propNode.ImageIndex = propNode.SelectedImageIndex = IDX_GEOMETRY;
- propNode.ToolTipText = string.Format(Strings.FsPreview_GeometryPropertyNodeTooltip,
- g.Name,
- g.Description,
- g.GeometryTypesToString(),
- g.IsReadOnly,
- g.HasElevation,
- g.HasMeasure,
- g.SpatialContextAssociation,
- Environment.NewLine);
- }
- else if (prop.Type == PropertyDefinitionType.Data)
- {
- var d = (DataPropertyDefinition)prop;
- if (cls.IdentityProperties.Contains((DataPropertyDefinition)prop))
- propNode.ImageIndex = propNode.SelectedImageIndex = IDX_IDENTITY;
- else
- propNode.ImageIndex = propNode.SelectedImageIndex = IDX_PROP;
+ case PropertyDefinitionType.Geometry:
+ {
+ var g = (GeometricPropertyDefinition)prop;
+ propNode.ImageIndex = propNode.SelectedImageIndex = IDX_GEOMETRY;
+ propNode.ToolTipText = string.Format(Strings.FsPreview_GeometryPropertyNodeTooltip,
+ g.Name,
+ g.Description,
+ g.GeometryTypesToString(),
+ g.IsReadOnly,
+ g.HasElevation,
+ g.HasMeasure,
+ g.SpatialContextAssociation,
+ Environment.NewLine);
+ }
+ break;
+ case PropertyDefinitionType.Data:
+ {
+ var d = (DataPropertyDefinition)prop;
+ if (cls.IdentityProperties.Contains((DataPropertyDefinition)prop))
+ propNode.ImageIndex = propNode.SelectedImageIndex = IDX_IDENTITY;
+ else
+ propNode.ImageIndex = propNode.SelectedImageIndex = IDX_PROP;
- propNode.ToolTipText = string.Format(Strings.FsPreview_DataPropertyNodeTooltip,
- d.Name,
- d.Description,
- d.DataType.ToString(),
- d.IsNullable,
- d.IsReadOnly,
- d.Length,
- d.Precision,
- d.Scale,
- Environment.NewLine);
- }
- else if (prop.Type == PropertyDefinitionType.Raster)
- {
- var r = (RasterPropertyDefinition)prop;
- propNode.ImageIndex = propNode.SelectedImageIndex = IDX_RASTER;
+ propNode.ToolTipText = string.Format(Strings.FsPreview_DataPropertyNodeTooltip,
+ d.Name,
+ d.Description,
+ d.DataType.ToString(),
+ d.IsNullable,
+ d.IsReadOnly,
+ d.Length,
+ d.Precision,
+ d.Scale,
+ Environment.NewLine);
+ }
+ break;
+ case PropertyDefinitionType.Raster:
+ {
+ var r = (RasterPropertyDefinition)prop;
+ propNode.ImageIndex = propNode.SelectedImageIndex = IDX_RASTER;
- propNode.ToolTipText = string.Format(Strings.FsPreview_RasterPropertyNodeTooltip,
- r.Name,
- r.Description,
- r.IsNullable,
- r.DefaultImageXSize,
- r.DefaultImageYSize,
- r.SpatialContextAssociation,
- Environment.NewLine);
+ propNode.ToolTipText = string.Format(Strings.FsPreview_RasterPropertyNodeTooltip,
+ r.Name,
+ r.Description,
+ r.IsNullable,
+ r.DefaultImageXSize,
+ r.DefaultImageYSize,
+ r.SpatialContextAssociation,
+ Environment.NewLine);
+ }
+ break;
+ default:
+ {
+ propNode.ImageIndex = propNode.SelectedImageIndex = IDX_PROP;
+ }
+ break;
}
- else
- {
- propNode.ImageIndex = propNode.SelectedImageIndex = IDX_PROP;
- }
classNode.Nodes.Add(propNode);
}
Modified: trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/SubEditors/UnmanagedCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/SubEditors/UnmanagedCtrl.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/FeatureSource/Providers/Odbc/SubEditors/UnmanagedCtrl.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -161,7 +161,7 @@
public event EventHandler RequestDocumentReset;
}
- internal class OdbcDriverNames
+ internal static class OdbcDriverNames
{
//These aren't localizable
public const string OdbcDriverAccess = "{Microsoft Access Driver (*.mdb)}";
Modified: trunk/Tools/Maestro/Maestro.Editors/Fusion/MapEditors/EditorFactory.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Fusion/MapEditors/EditorFactory.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/Fusion/MapEditors/EditorFactory.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -27,7 +27,7 @@
namespace Maestro.Editors.Fusion.MapEditors
{
- internal class EditorFactory
+ internal static class EditorFactory
{
private const string G_NORMAL_MAP = "G_NORMAL_MAP"; //NOXLATE
private const string G_SATELLITE_MAP = "G_SATELLITE_MAP"; //NOXLATE
@@ -95,10 +95,7 @@
yield return new EditorInvoker()
{
Name = Strings.CmsGeneric,
- Action = () =>
- {
- return group.CreateGenericEntry();
- }
+ Action = group.CreateGenericEntry
};
yield return new EditorInvoker()
{
Modified: trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/XmlEditorOptions.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/XmlEditorOptions.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/XmlEditorOptions.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -37,7 +37,7 @@
/// <summary>
/// Options for the generic XML editor
/// </summary>
- public class XmlEditorOptions
+ public static class XmlEditorOptions
{
static XmlEditorOptions()
{
Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/FeaturePreviewRender.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/FeaturePreviewRender.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/FeaturePreviewRender.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -30,7 +30,7 @@
namespace Maestro.Editors.LayerDefinition.Vector
{
- internal class FeaturePreviewRender
+ internal static class FeaturePreviewRender
{
private static ImageStylePicker.NamedImage[] m_fillImages = null;
private static ImageStylePicker.NamedImage[] m_lineStyles = null;
Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/StyleEditors/PointFeatureStyleEditor.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -242,98 +242,105 @@
SizeUnits.SelectedValue = m_item.Symbol.Unit;
SizeContext.SelectedValue = m_item.Symbol.SizeContext.ToString();
-
- // specifics
- if (m_item.Symbol.Type == PointSymbolType.Mark)
+ switch (m_item.Symbol.Type)
{
- MaintainAspectRatio.Checked = m_item.Symbol.MaintainAspect;
- double d;
- if (double.TryParse(m_item.Symbol.InsertionPointX, NumberStyles.Float, CultureInfo.InvariantCulture, out d))
- ReferenceX.Text = d.ToString(System.Threading.Thread.CurrentThread.CurrentUICulture);
- else
- ReferenceX.Text = m_item.Symbol.InsertionPointX;
+ case PointSymbolType.Mark:
+ {
+ MaintainAspectRatio.Checked = m_item.Symbol.MaintainAspect;
+ double d;
+ if (double.TryParse(m_item.Symbol.InsertionPointX, NumberStyles.Float, CultureInfo.InvariantCulture, out d))
+ ReferenceX.Text = d.ToString(System.Threading.Thread.CurrentThread.CurrentUICulture);
+ else
+ ReferenceX.Text = m_item.Symbol.InsertionPointX;
- if (double.TryParse(m_item.Symbol.InsertionPointY, NumberStyles.Float, CultureInfo.InvariantCulture, out d))
- ReferenceY.Text = d.ToString(System.Threading.Thread.CurrentThread.CurrentUICulture);
- else
- ReferenceY.Text = m_item.Symbol.InsertionPointY;
+ if (double.TryParse(m_item.Symbol.InsertionPointY, NumberStyles.Float, CultureInfo.InvariantCulture, out d))
+ ReferenceY.Text = d.ToString(System.Threading.Thread.CurrentThread.CurrentUICulture);
+ else
+ ReferenceY.Text = m_item.Symbol.InsertionPointY;
- IMarkSymbol t = (IMarkSymbol)m_item.Symbol;
- Symbol.SelectedValue = t.Shape.ToString();
+ IMarkSymbol t = (IMarkSymbol)m_item.Symbol;
+ Symbol.SelectedValue = t.Shape.ToString();
- fillStyleEditor.displayFill.Checked = t.Fill != null;
- if (t.Fill != null)
- {
- fillStyleEditor.foregroundColor.ColorExpression = t.Fill.ForegroundColor;
- fillStyleEditor.backgroundColor.ColorExpression = t.Fill.BackgroundColor;
- fillStyleEditor.fillCombo.SelectedValue = t.Fill.FillPattern;
- if (fillStyleEditor.fillCombo.SelectedItem == null && fillStyleEditor.fillCombo.Items.Count > 0)
- fillStyleEditor.fillCombo.SelectedIndex = fillStyleEditor.fillCombo.FindString(t.Fill.FillPattern);
- }
+ fillStyleEditor.displayFill.Checked = t.Fill != null;
+ if (t.Fill != null)
+ {
+ fillStyleEditor.foregroundColor.ColorExpression = t.Fill.ForegroundColor;
+ fillStyleEditor.backgroundColor.ColorExpression = t.Fill.BackgroundColor;
+ fillStyleEditor.fillCombo.SelectedValue = t.Fill.FillPattern;
+ if (fillStyleEditor.fillCombo.SelectedItem == null && fillStyleEditor.fillCombo.Items.Count > 0)
+ fillStyleEditor.fillCombo.SelectedIndex = fillStyleEditor.fillCombo.FindString(t.Fill.FillPattern);
+ }
- lineStyleEditor.displayLine.Checked = t.Edge != null;
- if (t.Edge != null)
- {
- lineStyleEditor.fillCombo.SelectedValue = t.Edge.LineStyle;
- if (lineStyleEditor.fillCombo.SelectedItem == null && lineStyleEditor.fillCombo.Items.Count > 0)
- lineStyleEditor.fillCombo.SelectedIndex = lineStyleEditor.fillCombo.FindString(t.Edge.LineStyle);
+ lineStyleEditor.displayLine.Checked = t.Edge != null;
+ if (t.Edge != null)
+ {
+ lineStyleEditor.fillCombo.SelectedValue = t.Edge.LineStyle;
+ if (lineStyleEditor.fillCombo.SelectedItem == null && lineStyleEditor.fillCombo.Items.Count > 0)
+ lineStyleEditor.fillCombo.SelectedIndex = lineStyleEditor.fillCombo.FindString(t.Edge.LineStyle);
- lineStyleEditor.colorCombo.ColorExpression = t.Edge.Color;
- lineStyleEditor.thicknessCombo.Text = t.Edge.Thickness;
- }
+ lineStyleEditor.colorCombo.ColorExpression = t.Edge.Color;
+ lineStyleEditor.thicknessCombo.Text = t.Edge.Thickness;
+ }
- setUIForMarkSymbol(true);
- }
- else if (m_item.Symbol.Type == PointSymbolType.Font)
- {
- IFontSymbol f = (IFontSymbol)m_item.Symbol;
+ setUIForMarkSymbol(true);
+ }
+ break;
+ case PointSymbolType.Font:
+ {
+ IFontSymbol f = (IFontSymbol)m_item.Symbol;
- // TODO: Dislike this hard coding, but with association from 'Shape' the 'Font...' string cannot be found or set from the Symbol combobox
- Symbol.SelectedIndex = 6; //Font
+ // TODO: Dislike this hard coding, but with association from 'Shape' the 'Font...' string cannot be found or set from the Symbol combobox
+ Symbol.SelectedIndex = 6; //Font
- fontCombo.SelectedIndex = fontCombo.FindString(f.FontName);
- if (string.Compare(fontCombo.Text, f.FontName, true) == 0)
- fontCombo.Text = f.FontName;
+ fontCombo.SelectedIndex = fontCombo.FindString(f.FontName);
+ if (string.Compare(fontCombo.Text, f.FontName, true) == 0)
+ fontCombo.Text = f.FontName;
- comboBoxCharacter.SelectedIndex = comboBoxCharacter.FindString(f.Character);
- if (comboBoxCharacter.Text != f.Character)
- comboBoxCharacter.Text = f.Character;
+ comboBoxCharacter.SelectedIndex = comboBoxCharacter.FindString(f.Character);
+ if (comboBoxCharacter.Text != f.Character)
+ comboBoxCharacter.Text = f.Character;
- FontBoldButton.Checked = f.Bold.HasValue && f.Bold.Value;
- FontItalicButton.Checked = f.Italic.HasValue && f.Italic.Value;
- FontUnderlineButton.Checked = f.Underlined.HasValue && f.Underlined.Value;
+ FontBoldButton.Checked = f.Bold.HasValue && f.Bold.Value;
+ FontItalicButton.Checked = f.Italic.HasValue && f.Italic.Value;
+ FontUnderlineButton.Checked = f.Underlined.HasValue && f.Underlined.Value;
- if (string.IsNullOrEmpty(f.ForegroundColor))
- colorFontForeground.CurrentColor = Color.Black;
- else
- colorFontForeground.CurrentColor = Utility.ParseHTMLColor(f.ForegroundColor);
+ if (string.IsNullOrEmpty(f.ForegroundColor))
+ colorFontForeground.CurrentColor = Color.Black;
+ else
+ colorFontForeground.CurrentColor = Utility.ParseHTMLColor(f.ForegroundColor);
- setUIForMarkSymbol(false);
- }
- else if (m_item.Symbol.Type == PointSymbolType.W2D)
- {
- // TODO: Dislike this hard coding, but with association from 'Shape' the 'Font...' string cannot be found or set from the Symbol combobox
- Symbol.SelectedIndex = 7; //Symbol
- var sym = (IW2DSymbol)m_item.Symbol;
+ setUIForMarkSymbol(false);
+ }
+ break;
+ case PointSymbolType.W2D:
+ {
+ // TODO: Dislike this hard coding, but with association from 'Shape' the 'Font...' string cannot be found or set from the Symbol combobox
+ Symbol.SelectedIndex = 7; //Symbol
+ var sym = (IW2DSymbol)m_item.Symbol;
- chkW2DFillColor.Checked = (sym.FillColor != null);
- chkW2DLineColor.Checked = (sym.LineColor != null);
- chkW2DTextColor.Checked = (sym.TextColor != null);
+ chkW2DFillColor.Checked = (sym.FillColor != null);
+ chkW2DLineColor.Checked = (sym.LineColor != null);
+ chkW2DTextColor.Checked = (sym.TextColor != null);
- if (chkW2DFillColor.Checked)
- cmbW2DFillColor.CurrentColor = Utility.ParseHTMLColor(sym.FillColor);
+ if (chkW2DFillColor.Checked)
+ cmbW2DFillColor.CurrentColor = Utility.ParseHTMLColor(sym.FillColor);
- if (chkW2DLineColor.Checked)
- cmbW2DLineColor.CurrentColor = Utility.ParseHTMLColor(sym.LineColor);
+ if (chkW2DLineColor.Checked)
+ cmbW2DLineColor.CurrentColor = Utility.ParseHTMLColor(sym.LineColor);
- if (chkW2DTextColor.Checked)
- cmbW2DTextColor.CurrentColor = Utility.ParseHTMLColor(sym.TextColor);
+ if (chkW2DTextColor.Checked)
+ cmbW2DTextColor.CurrentColor = Utility.ParseHTMLColor(sym.TextColor);
- setUIForMarkSymbol(false);
+ setUIForMarkSymbol(false);
+ }
+ break;
+ default:
+ {
+ //TODO: Fix this
+ MessageBox.Show(this, Strings.SymbolTypeNotSupported, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+ break;
}
- else
- //TODO: Fix this
- MessageBox.Show(this, Strings.SymbolTypeNotSupported, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
UpdatePreviewResult();
}
@@ -1108,13 +1115,19 @@
{
if (m_inUpdate)
return;
+ switch (m_item.Symbol.Type)
+ {
+ case PointSymbolType.Mark:
+ ((IMarkSymbol)m_item.Symbol).SizeContext = (SizeContextType)Enum.Parse((typeof(SizeContextType)), (string)SizeContext.SelectedValue);
+ break;
+ case PointSymbolType.Font:
+ ((IFontSymbol)m_item.Symbol).SizeContext = (SizeContextType)Enum.Parse((typeof(SizeContextType)), (string)SizeContext.SelectedValue);
+ break;
+ case PointSymbolType.W2D:
+ ((IW2DSymbol)m_item.Symbol).SizeContext = (SizeContextType)Enum.Parse((typeof(SizeContextType)), (string)SizeContext.SelectedValue);
+ break;
+ }
- if (m_item.Symbol.Type == PointSymbolType.Mark)
- ((IMarkSymbol)m_item.Symbol).SizeContext = (SizeContextType)Enum.Parse((typeof(SizeContextType)), (string)SizeContext.SelectedValue);
- else if (m_item.Symbol.Type == PointSymbolType.Font)
- ((IFontSymbol)m_item.Symbol).SizeContext = (SizeContextType)Enum.Parse((typeof(SizeContextType)), (string)SizeContext.SelectedValue);
- else if (m_item.Symbol.Type == PointSymbolType.W2D)
- ((IW2DSymbol)m_item.Symbol).SizeContext = (SizeContextType)Enum.Parse((typeof(SizeContextType)), (string)SizeContext.SelectedValue);
UpdatePreviewResult();
if (Changed != null)
Changed(this, new EventArgs());
@@ -1538,14 +1551,19 @@
{
if (m_inUpdate || HeightText.SelectedIndex != -1)
return;
+ switch (m_item.Symbol.Type)
+ {
+ case PointSymbolType.Mark:
+ m_item.Symbol.SizeY = HeightText.Text;
+ break;
+ case PointSymbolType.Font:
+ m_item.Symbol.SizeY = HeightText.Text;
+ break;
+ case PointSymbolType.W2D:
+ m_item.Symbol.SizeY = HeightText.Text;
+ break;
+ }
- //TODO: Validate
- if (m_item.Symbol.Type == PointSymbolType.Mark)
- m_item.Symbol.SizeY = HeightText.Text;
- else if (m_item.Symbol.Type == PointSymbolType.Font)
- m_item.Symbol.SizeY = HeightText.Text;
- else if (m_item.Symbol.Type == PointSymbolType.W2D)
- m_item.Symbol.SizeY = HeightText.Text;
UpdatePreviewResult();
if (Changed != null)
Changed(this, new EventArgs());
@@ -1555,14 +1573,19 @@
{
if (m_inUpdate || RotationBox.SelectedIndex != -1)
return;
+ switch (m_item.Symbol.Type)
+ {
+ case PointSymbolType.Mark:
+ m_item.Symbol.Rotation = RotationBox.Text;
+ break;
+ case PointSymbolType.Font:
+ m_item.Symbol.Rotation = RotationBox.Text;
+ break;
+ case PointSymbolType.W2D:
+ m_item.Symbol.Rotation = RotationBox.Text;
+ break;
+ }
- //TODO: Validate
- if (m_item.Symbol.Type == PointSymbolType.Mark)
- m_item.Symbol.Rotation = RotationBox.Text;
- else if (m_item.Symbol.Type == PointSymbolType.Font)
- m_item.Symbol.Rotation = RotationBox.Text;
- else if (m_item.Symbol.Type == PointSymbolType.W2D)
- m_item.Symbol.Rotation = RotationBox.Text;
UpdatePreviewResult();
if (Changed != null)
Changed(this, new EventArgs());
Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerSettingsSectionCtrl.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -454,33 +454,21 @@
{
if (_init)
return;
-
- if (string.IsNullOrEmpty(txtHyperlink.Text))
- _vl.Url = null;
- else
- _vl.Url = txtHyperlink.Text;
+ _vl.Url = string.IsNullOrEmpty(txtHyperlink.Text) ? null : txtHyperlink.Text;
}
private void txtFilter_TextChanged(object sender, EventArgs e)
{
if (_init)
return;
-
- if (string.IsNullOrEmpty(txtFilter.Text))
- _vl.Filter = null;
- else
- _vl.Filter = txtFilter.Text;
+ _vl.Filter = string.IsNullOrEmpty(txtFilter.Text) ? null : txtFilter.Text;
}
private void txtTooltip_TextChanged(object sender, EventArgs e)
{
if (_init)
return;
-
- if (string.IsNullOrEmpty(txtTooltip.Text))
- _vl.ToolTip = null;
- else
- _vl.ToolTip = txtTooltip.Text;
+ _vl.ToolTip = string.IsNullOrEmpty(txtTooltip.Text) ? null : txtTooltip.Text;
}
private void btnGoToFeatureSource_Click(object sender, EventArgs e)
Modified: trunk/Tools/Maestro/Maestro.Editors/LoadProcedure/LoadProcedureEditorCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LoadProcedure/LoadProcedureEditorCtrl.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/LoadProcedure/LoadProcedureEditorCtrl.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -59,35 +59,39 @@
service.RegisterCustomNotifier(this);
CollapsiblePanel tp = null;
-
- if (_lp.SubType.Type == LoadType.Sdf)
+ switch (_lp.SubType.Type)
{
- var trans = new SdfTransformationCtrl();
- trans.Bind(service);
- tp = trans;
+ case LoadType.Sdf:
+ {
+ var trans = new SdfTransformationCtrl();
+ trans.Bind(service);
+ tp = trans;
+ }
+ break;
+ case LoadType.Shp:
+ {
+ var trans = new ShpTransformationCtrl();
+ trans.Bind(service);
+ tp = trans;
+ }
+ break;
+ case LoadType.Dwf:
+ {
+ var trans = new DwfTransformationCtrl();
+ trans.Bind(service);
+ tp = trans;
+ }
+ break;
+ case LoadType.Sqlite:
+ {
+ var trans = new SqliteTransformationCtrl();
+ trans.Bind(service);
+ tp = trans;
+ }
+ break;
+ default:
+ throw new NotSupportedException();
}
- else if (_lp.SubType.Type == LoadType.Shp)
- {
- var trans = new ShpTransformationCtrl();
- trans.Bind(service);
- tp = trans;
- }
- else if (_lp.SubType.Type == LoadType.Dwf)
- {
- var trans = new DwfTransformationCtrl();
- trans.Bind(service);
- tp = trans;
- }
- else if (_lp.SubType.Type == LoadType.Sqlite)
- {
- var trans = new SqliteTransformationCtrl();
- trans.Bind(service);
- tp = trans;
- }
- else
- {
- throw new NotSupportedException();
- }
var input = new InputFilesCtrl();
input.Bind(service);
Modified: trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/Maestro.Editors.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -74,6 +74,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.Editors/MapDefinition/LiveMapEditorLegend.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/MapDefinition/LiveMapEditorLegend.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/MapDefinition/LiveMapEditorLegend.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -321,24 +321,15 @@
{
if (layer != null)
{
- if (groupMeta.Name != layer.GroupName)
- e.Effect = DragDropEffects.Copy;
- else
- e.Effect = DragDropEffects.None;
+ e.Effect = groupMeta.Name != layer.GroupName ? DragDropEffects.Copy : DragDropEffects.None;
}
else if (group != null)
{
- if (groupMeta.Name != group.GroupName)
- e.Effect = DragDropEffects.Copy;
- else
- e.Effect = DragDropEffects.None;
+ e.Effect = groupMeta.Name != group.GroupName ? DragDropEffects.Copy : DragDropEffects.None;
}
else if (res != null)
{
- if (groupMeta != null)
- e.Effect = DragDropEffects.Copy;
- else
- e.Effect = DragDropEffects.None;
+ e.Effect = groupMeta != null ? DragDropEffects.Copy : DragDropEffects.None;
}
else
{
Modified: trunk/Tools/Maestro/Maestro.Editors/RepositoryIcons.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/RepositoryIcons.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Editors/RepositoryIcons.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -28,7 +28,7 @@
/// <summary>
/// Image list helper class for components that display or interact with Repository resources
/// </summary>
- public class RepositoryIcons
+ public static class RepositoryIcons
{
/// <summary>
/// Icon for resource types
Modified: trunk/Tools/Maestro/Maestro.LiveMapEditor/Maestro.LiveMapEditor.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.LiveMapEditor/Maestro.LiveMapEditor.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.LiveMapEditor/Maestro.LiveMapEditor.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -54,6 +54,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.Login/Maestro.Login.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Login/Maestro.Login.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Login/Maestro.Login.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -63,6 +63,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.MapViewer/LegendPresenter.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.MapViewer/LegendPresenter.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.MapViewer/LegendPresenter.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -1178,7 +1178,7 @@
{
base.IsGroup = false;
this.Layer = layer;
- this.IsSelectable = (layer != null) ? layer.Selectable : false;
+ this.IsSelectable = (layer != null) && layer.Selectable;
this.DrawSelectabilityIcon = (layer != null && bInitiallySelectable);
this.WasInitiallySelectable = bInitiallySelectable;
this.LayerDefinitionContent = null;
Modified: trunk/Tools/Maestro/Maestro.MapViewer/Maestro.MapViewer.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.MapViewer/Maestro.MapViewer.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.MapViewer/Maestro.MapViewer.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -47,6 +47,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -2525,37 +2525,43 @@
}
else
{
- if (this.ActiveTool == MapActiveTool.Select)
+ switch (this.ActiveTool)
{
- var mapPt1 = ScreenToMapUnits(e.X - this.PointPixelBuffer, e.Y - this.PointPixelBuffer);
- var mapPt2 = ScreenToMapUnits(e.X + this.PointPixelBuffer, e.Y + this.PointPixelBuffer);
+ case MapActiveTool.Select:
+ {
+ var mapPt1 = ScreenToMapUnits(e.X - this.PointPixelBuffer, e.Y - this.PointPixelBuffer);
+ var mapPt2 = ScreenToMapUnits(e.X + this.PointPixelBuffer, e.Y + this.PointPixelBuffer);
- var env = ObjectFactory.CreateEnvelope(
- Math.Min(mapPt1.X, mapPt2.X),
- Math.Min(mapPt1.Y, mapPt2.Y),
- Math.Max(mapPt1.X, mapPt2.X),
- Math.Max(mapPt1.Y, mapPt2.Y));
+ var env = ObjectFactory.CreateEnvelope(
+ Math.Min(mapPt1.X, mapPt2.X),
+ Math.Min(mapPt1.Y, mapPt2.Y),
+ Math.Max(mapPt1.X, mapPt2.X),
+ Math.Max(mapPt1.Y, mapPt2.Y));
- SelectByWkt(MakeWktPolygon(env.MinX, env.MinY, env.MaxX, env.MaxY), 1);
+ SelectByWkt(MakeWktPolygon(env.MinX, env.MinY, env.MaxX, env.MaxY), 1);
+ }
+ break;
+ case MapActiveTool.ZoomIn:
+ {
+ if (!isDragging)
+ {
+ var mapPt = ScreenToMapUnits(e.X, e.Y);
+ var scale = _map.ViewScale;
+ ZoomToView(mapPt.X, mapPt.Y, scale * ZoomInFactor, true);
+ }
+ }
+ break;
+ case MapActiveTool.ZoomOut:
+ {
+ if (!isDragging)
+ {
+ var mapPt = ScreenToMapUnits(e.X, e.Y);
+ var scale = _map.ViewScale;
+ ZoomToView(mapPt.X, mapPt.Y, scale * ZoomOutFactor, true);
+ }
+ }
+ break;
}
- else if (this.ActiveTool == MapActiveTool.ZoomIn)
- {
- if (!isDragging)
- {
- var mapPt = ScreenToMapUnits(e.X, e.Y);
- var scale = _map.ViewScale;
- ZoomToView(mapPt.X, mapPt.Y, scale * ZoomInFactor, true);
- }
- }
- else if (this.ActiveTool == MapActiveTool.ZoomOut)
- {
- if (!isDragging)
- {
- var mapPt = ScreenToMapUnits(e.X, e.Y);
- var scale = _map.ViewScale;
- ZoomToView(mapPt.X, mapPt.Y, scale * ZoomOutFactor, true);
- }
- }
}
}
@@ -2712,61 +2718,66 @@
if (isDragging)
{
isDragging = false;
-
- if (this.ActiveTool == MapActiveTool.Pan)
+ switch (this.ActiveTool)
{
- //FIXME: This is not perfect. The view will be slightly off of where you released the mouse button
+ case MapActiveTool.Pan:
+ {
+ //FIXME: This is not perfect. The view will be slightly off of where you released the mouse button
- //System.Diagnostics.Trace.TraceInformation("Dragged screen distance (" + translate.X + ", " + translate.Y + ")");
+ //System.Diagnostics.Trace.TraceInformation("Dragged screen distance (" + translate.X + ", " + translate.Y + ")");
- int dx = e.X - dragStart.X;
- int dy = e.Y - dragStart.Y;
+ int dx = e.X - dragStart.X;
+ int dy = e.Y - dragStart.Y;
- var centerScreen = new Point(this.Location.X + (this.Width / 2), this.Location.Y + (this.Height / 2));
+ var centerScreen = new Point(this.Location.X + (this.Width / 2), this.Location.Y + (this.Height / 2));
- centerScreen.X -= translate.X;
- centerScreen.Y -= translate.Y;
+ centerScreen.X -= translate.X;
+ centerScreen.Y -= translate.Y;
- var pt = _map.ViewCenter;
- var coord = ScreenToMapUnits(centerScreen.X, centerScreen.Y);
+ var pt = _map.ViewCenter;
+ var coord = ScreenToMapUnits(centerScreen.X, centerScreen.Y);
- double mdx = coord.X - pt.X;
- double mdy = coord.Y - pt.Y;
+ double mdx = coord.X - pt.X;
+ double mdy = coord.Y - pt.Y;
- ZoomToView(coord.X, coord.Y, _map.ViewScale, true);
- Trace.TraceInformation("END PANNING");
- }
- else if (this.ActiveTool == MapActiveTool.Select)
- {
- var mapPt = ScreenToMapUnits(e.X, e.Y);
- var mapDragPt = ScreenToMapUnits(dragStart.X, dragStart.Y);
- var env = ObjectFactory.CreateEnvelope(
- Math.Min(mapPt.X, mapDragPt.X),
- Math.Min(mapPt.Y, mapDragPt.Y),
- Math.Max(mapPt.X, mapDragPt.X),
- Math.Max(mapPt.Y, mapDragPt.Y));
- SelectByWkt(MakeWktPolygon(env.MinX, env.MinY, env.MaxX, env.MaxY), -1);
- }
- else if (this.ActiveTool == MapActiveTool.ZoomIn)
- {
- var mapPt = ScreenToMapUnits(e.X, e.Y);
- var mapDragPt = ScreenToMapUnits(dragStart.X, dragStart.Y);
+ ZoomToView(coord.X, coord.Y, _map.ViewScale, true);
+ Trace.TraceInformation("END PANNING");
+ }
+ break;
+ case MapActiveTool.Select:
+ {
+ var mapPt = ScreenToMapUnits(e.X, e.Y);
+ var mapDragPt = ScreenToMapUnits(dragStart.X, dragStart.Y);
+ var env = ObjectFactory.CreateEnvelope(
+ Math.Min(mapPt.X, mapDragPt.X),
+ Math.Min(mapPt.Y, mapDragPt.Y),
+ Math.Max(mapPt.X, mapDragPt.X),
+ Math.Max(mapPt.Y, mapDragPt.Y));
+ SelectByWkt(MakeWktPolygon(env.MinX, env.MinY, env.MaxX, env.MaxY), -1);
+ }
+ break;
+ case MapActiveTool.ZoomIn:
+ {
+ var mapPt = ScreenToMapUnits(e.X, e.Y);
+ var mapDragPt = ScreenToMapUnits(dragStart.X, dragStart.Y);
- PointF ll;
- PointF ur;
+ PointF ll;
+ PointF ur;
- if (mapPt.X <= mapDragPt.X && mapPt.Y <= mapDragPt.Y)
- {
- ll = mapPt;
- ur = mapDragPt;
- }
- else
- {
- ll = mapDragPt;
- ur = mapPt;
- }
+ if (mapPt.X <= mapDragPt.X && mapPt.Y <= mapDragPt.Y)
+ {
+ ll = mapPt;
+ ur = mapDragPt;
+ }
+ else
+ {
+ ll = mapDragPt;
+ ur = mapPt;
+ }
- ZoomToExtents(ll.X, ll.Y, ur.X, ur.Y);
+ ZoomToExtents(ll.X, ll.Y, ur.X, ur.Y);
+ }
+ break;
}
}
}
Modified: trunk/Tools/Maestro/Maestro.Packaging/Maestro.Packaging.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/Maestro.Packaging.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Packaging/Maestro.Packaging.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -69,6 +69,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -421,7 +421,7 @@
break;
test = test + parts[partIndex];
- matches = data.Where(x => x.StartsWith(test)).Count();
+ matches = data.Count(x => x.StartsWith(test));
}
return parent;
}
Modified: trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -313,52 +313,62 @@
this.TotalProgress.Value = (int)Math.Max(Math.Min((int)lv, this.TotalProgress.Maximum), this.TotalProgress.Minimum);
}
- if (type == ProgressType.Uploading)
+ switch (type)
{
- HideTotal();
- if (pg == total)
- {
- OperationLabel.Text = Strings.ProgressWaitingForServer;
- CurrentProgress.Style = ProgressBarStyle.Marquee;
- }
- else
- {
- OperationLabel.Text = string.Format(Strings.ProgressUploading, ((double)pg / 1024), ((double)total / 1024));
- this.Refresh();
- }
+ case ProgressType.Uploading:
+ {
+ HideTotal();
+ if (pg == total)
+ {
+ OperationLabel.Text = Strings.ProgressWaitingForServer;
+ CurrentProgress.Style = ProgressBarStyle.Marquee;
+ }
+ else
+ {
+ OperationLabel.Text = string.Format(Strings.ProgressUploading, ((double)pg / 1024), ((double)total / 1024));
+ this.Refresh();
+ }
+ }
+ break;
+ case ProgressType.ListingFiles:
+ {
+ HideTotal();
+ OperationLabel.Text = Strings.ProgressReadingPackage;
+ CurrentProgress.Style = ProgressBarStyle.Marquee;
+ }
+ break;
+ case ProgressType.Compressing:
+ {
+ OperationLabel.Text = Strings.ProgressCompressing;
+ }
+ break;
+ case ProgressType.MovingResources:
+ {
+ OperationLabel.Text = Strings.ProgressUpdatingReferences;
+ }
+ break;
+ case ProgressType.PreparingFolder:
+ {
+ OperationLabel.Text = resource;
+ }
+ break;
+ case ProgressType.SetResource:
+ {
+ CurrentProgress.Style = ProgressBarStyle.Continuous;
+ CurrentProgress.Maximum = 100;
+ CurrentProgress.Value = Convert.ToInt32(Math.Min(100.0, pg));
+ OperationLabel.Text = string.Format(Strings.ProgressSetResource, resource, pg);
+ }
+ break;
+ case ProgressType.SetResourceData:
+ {
+ CurrentProgress.Style = ProgressBarStyle.Continuous;
+ CurrentProgress.Maximum = 100;
+ CurrentProgress.Value = Convert.ToInt32(Math.Min(100.0, pg));
+ OperationLabel.Text = string.Format(Strings.ProgressSetResourceData, resource, pg);
+ }
+ break;
}
- else if (type == ProgressType.ListingFiles)
- {
- HideTotal();
- OperationLabel.Text = Strings.ProgressReadingPackage;
- CurrentProgress.Style = ProgressBarStyle.Marquee;
- }
- else if (type == ProgressType.Compressing)
- {
- OperationLabel.Text = Strings.ProgressCompressing;
- }
- else if (type == ProgressType.MovingResources)
- {
- OperationLabel.Text = Strings.ProgressUpdatingReferences;
- }
- else if (type == ProgressType.PreparingFolder)
- {
- OperationLabel.Text = resource;
- }
- else if (type == ProgressType.SetResource)
- {
- CurrentProgress.Style = ProgressBarStyle.Continuous;
- CurrentProgress.Maximum = 100;
- CurrentProgress.Value = Convert.ToInt32(Math.Min(100.0, pg));
- OperationLabel.Text = string.Format(Strings.ProgressSetResource, resource, pg);
- }
- else if (type == ProgressType.SetResourceData)
- {
- CurrentProgress.Style = ProgressBarStyle.Continuous;
- CurrentProgress.Maximum = 100;
- CurrentProgress.Value = Convert.ToInt32(Math.Min(100.0, pg));
- OperationLabel.Text = string.Format(Strings.ProgressSetResourceData, resource, pg);
- }
}
}
Modified: trunk/Tools/Maestro/Maestro.Shared.UI/Maestro.Shared.UI.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/Maestro.Shared.UI.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/Maestro.Shared.UI.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -69,6 +69,9 @@
</Reference>
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/Maestro.Shared.UI/TabFactory.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/TabFactory.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/TabFactory.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -44,7 +44,7 @@
_mrtType = Type.GetType("Mono.Runtime"); //NOXLATE
}
- private static Type _mrtType;
+ private static readonly Type _mrtType;
/// <summary>
/// Gets whether this application is running under the Mono CLR
@@ -69,7 +69,7 @@
internal static class TabFactory
{
- private static List<HiddenTab> _hiddenTabs = new List<HiddenTab>();
+ private static readonly List<HiddenTab> _hiddenTabs = new List<HiddenTab>();
internal static TabPage CreateTab(IViewContent content, string imgKey)
{
Modified: trunk/Tools/Maestro/Maestro.Shared.UI/WaitCursor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/WaitCursor.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/WaitCursor.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -31,7 +31,7 @@
/// </summary>
public class WaitCursor : IDisposable
{
- private Control _owner;
+ private readonly Control _owner;
private Cursor _orig;
/// <summary>
Modified: trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Maestro.Shared.UI/WorkbenchBase.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -39,7 +39,7 @@
private StatusStrip status;
private ToolStripStatusLabel statusLabel;
- private DockPanel contentPanel;
+ private readonly DockPanel contentPanel;
private ContextMenuStrip ctxToolbar;
Modified: trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner.csproj
===================================================================
--- trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -91,6 +91,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Modified: trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner64.csproj
===================================================================
--- trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner64.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/MaestroAPITestRunner/MaestroAPITestRunner64.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -83,6 +83,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Modified: trunk/Tools/Maestro/MaestroAPITests/MaestroAPITests.csproj
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/MaestroAPITests.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/MaestroAPITests/MaestroAPITests.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -77,6 +77,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\SignedAssemblyInfo.cs">
<Link>SignedAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/MaestroAPITests/TestControl.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPITests/TestControl.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/MaestroAPITests/TestControl.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -115,7 +115,7 @@
}
}
- internal class TestControl
+ internal static class TestControl
{
public static bool IgnoreExpressionTests = false;
public static bool IgnoreFeatureReaderTests = false;
@@ -129,7 +129,7 @@
public static bool IgnoreLocalFeatureTests = false;
}
- internal class ConnectionUtil
+ internal static class ConnectionUtil
{
public static IServerConnection CreateTestLocalNativeConnection()
{
Modified: trunk/Tools/Maestro/MaestroFsPreview/MaestroFsPreview.csproj
===================================================================
--- trunk/Tools/Maestro/MaestroFsPreview/MaestroFsPreview.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/MaestroFsPreview/MaestroFsPreview.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -84,6 +84,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/MgCooker/MgCooker.csproj
===================================================================
--- trunk/Tools/Maestro/MgCooker/MgCooker.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/MgCooker/MgCooker.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -64,6 +64,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/MgCooker.Cmd/MgCooker.Cmd.csproj
===================================================================
--- trunk/Tools/Maestro/MgCooker.Cmd/MgCooker.Cmd.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/MgCooker.Cmd/MgCooker.Cmd.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -61,6 +61,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/MpuCalc/MpuCalc.csproj
===================================================================
--- trunk/Tools/Maestro/MpuCalc/MpuCalc.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/MpuCalc/MpuCalc.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -59,6 +59,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Modified: trunk/Tools/Maestro/OSGeo.FDO.Expressions/FdoTerminalNames.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.FDO.Expressions/FdoTerminalNames.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.FDO.Expressions/FdoTerminalNames.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -1,23 +1,23 @@
-#region Disclaimer / License
-
-// Copyright (C) 2015, Jackie Ng
-// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
+#region Disclaimer / License
+
+// Copyright (C) 2015, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
#endregion Disclaimer / License
using System;
using System.Collections.Generic;
@@ -27,45 +27,45 @@
namespace OSGeo.FDO.Expressions
{
- internal class FdoTerminalNames
+ internal static class FdoTerminalNames
{
- public const string Identifier = "Identifier";
- public const string String = "String";
- public const string Integer = "Integer";
- public const string Double = "Double";
+ public const string Identifier = nameof(Identifier);
+ public const string String = nameof(String);
+ public const string Integer = nameof(Integer);
+ public const string Double = nameof(Double);
- public const string Expression = "Expression";
- public const string UnaryExpression = "UnaryExpression";
- public const string BinaryExpression = "BinaryExpression";
- public const string ValueExpression = "ValueExpression";
- public const string Function = "Function";
+ public const string Expression = nameof(Expression);
+ public const string UnaryExpression = nameof(UnaryExpression);
+ public const string BinaryExpression = nameof(BinaryExpression);
+ public const string ValueExpression = nameof(ValueExpression);
+ public const string Function = nameof(Function);
- public const string DataValue = "DataValue";
- public const string LiteralValue = "LiteralValue";
- public const string Parameter = "Parameter";
- public const string ExpressionCollection = "ExpressionCollection";
- public const string GeometryValue = "GeometryValue";
+ public const string DataValue = nameof(DataValue);
+ public const string LiteralValue = nameof(LiteralValue);
+ public const string Parameter = nameof(Parameter);
+ public const string ExpressionCollection = nameof(ExpressionCollection);
+ public const string GeometryValue = nameof(GeometryValue);
- public const string Boolean = "Boolean";
- public const string DateTime = "DateTime";
+ public const string Boolean = nameof(Boolean);
+ public const string DateTime = nameof(DateTime);
- public const string Filter = "Filter";
- public const string LogicalOperator = "LogicalOperator";
- public const string BinaryLogicalOperator = "BinaryLogicalOperator";
- public const string UnaryLogicalOperator = "UnaryLogicalOperator";
- public const string BinaryLogicalOperations = "BinaryLogicalOperations";
- public const string InCondition = "InCondition";
- public const string SearchCondition = "SearchCondition";
- public const string ComparisonCondition = "ComparisonCondition";
- public const string GeometricCondition = "GeometricCondition";
- public const string NullCondition = "NullCondition";
- public const string DistanceCondition = "DistanceCondition";
- public const string SpatialCondition = "SpatialCondition";
+ public const string Filter = nameof(Filter);
+ public const string LogicalOperator = nameof(LogicalOperator);
+ public const string BinaryLogicalOperator = nameof(BinaryLogicalOperator);
+ public const string UnaryLogicalOperator = nameof(UnaryLogicalOperator);
+ public const string BinaryLogicalOperations = nameof(BinaryLogicalOperations);
+ public const string InCondition = nameof(InCondition);
+ public const string SearchCondition = nameof(SearchCondition);
+ public const string ComparisonCondition = nameof(ComparisonCondition);
+ public const string GeometricCondition = nameof(GeometricCondition);
+ public const string NullCondition = nameof(NullCondition);
+ public const string DistanceCondition = nameof(DistanceCondition);
+ public const string SpatialCondition = nameof(SpatialCondition);
- public const string ValueExpressionCollection = "ValueExpressionCollection";
- public const string ComparisonOperations = "ComparisonOperations";
- public const string DistanceOperations = "DistanceOperations";
- public const string Distance = "Distance";
- public const string SpatialOperations = "SpatialOperations";
+ public const string ValueExpressionCollection = nameof(ValueExpressionCollection);
+ public const string ComparisonOperations = nameof(ComparisonOperations);
+ public const string DistanceOperations = nameof(DistanceOperations);
+ public const string Distance = nameof(Distance);
+ public const string SpatialOperations = nameof(SpatialOperations);
}
}
Modified: trunk/Tools/Maestro/OSGeo.FDO.Expressions/OSGeo.FDO.Expressions.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.FDO.Expressions/OSGeo.FDO.Expressions.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.FDO.Expressions/OSGeo.FDO.Expressions.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -49,6 +49,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ConnectionProviderRegistry.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ConnectionProviderRegistry.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ConnectionProviderRegistry.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -138,7 +138,7 @@
/// "Password", "admin");
/// </code>
/// </example>
- public sealed class ConnectionProviderRegistry
+ public static class ConnectionProviderRegistry
{
private const string PROVIDER_CONFIG = "ConnectionProviders.xml"; //NOXLATE
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/CredentialWriter.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/CredentialWriter.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/CredentialWriter.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -81,7 +81,7 @@
/// <summary>
/// Utility class to create encrypted Feature Source credentials
/// </summary>
- internal class CredentialWriter
+ internal static class CredentialWriter
{
//NOTE: This is a verbatim copy of MgCryptographyUtil in MgDev\Common\Security to the best I can do in .net
//Only the encryption bits are implemented. Maestro has no need to decrypt MG_USER_CREDENTIALS
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Enums.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Enums.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Enums.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -28,7 +28,7 @@
/// <summary>
/// Commonly used string constants for MapGuide
/// </summary>
- public class StringConstants
+ public static class StringConstants
{
/// <summary>
/// The root resource identifier
@@ -38,7 +38,7 @@
/// <summary>
/// A thumbnail dwf resource role
/// </summary>
- public const string Thumbnail = "Thumbnail"; //NOXLATE
+ public const string Thumbnail = nameof(Thumbnail);
/// <summary>
/// The username login placeholder token
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Feature/FeatureBase.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Feature/FeatureBase.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Feature/FeatureBase.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -157,14 +157,17 @@
public override PropertyValueType GetPropertyType(int index)
{
var prop = this.ClassDefinition.Properties[index];
- if (prop.Type == PropertyDefinitionType.Data)
- return (PropertyValueType)((DataPropertyDefinition)prop).DataType;
- else if (prop.Type == PropertyDefinitionType.Geometry)
- return PropertyValueType.Geometry;
- else if (prop.Type == PropertyDefinitionType.Raster)
- return PropertyValueType.Raster;
- else
- throw new ArgumentException();
+ switch (prop.Type)
+ {
+ case PropertyDefinitionType.Data:
+ return (PropertyValueType)((DataPropertyDefinition)prop).DataType;
+ case PropertyDefinitionType.Geometry:
+ return PropertyValueType.Geometry;
+ case PropertyDefinitionType.Raster:
+ return PropertyValueType.Raster;
+ default:
+ throw new ArgumentException();
+ }
}
/// <summary>
@@ -177,14 +180,17 @@
var prop = this.ClassDefinition.FindProperty(name);
if (prop != null)
{
- if (prop.Type == PropertyDefinitionType.Data)
- return (PropertyValueType)((DataPropertyDefinition)prop).DataType;
- else if (prop.Type == PropertyDefinitionType.Geometry)
- return PropertyValueType.Geometry;
- else if (prop.Type == PropertyDefinitionType.Raster)
- return PropertyValueType.Raster;
- else
- throw new ArgumentException();
+ switch (prop.Type)
+ {
+ case PropertyDefinitionType.Data:
+ return (PropertyValueType)((DataPropertyDefinition)prop).DataType;
+ case PropertyDefinitionType.Geometry:
+ return PropertyValueType.Geometry;
+ case PropertyDefinitionType.Raster:
+ return PropertyValueType.Raster;
+ default:
+ throw new ArgumentException();
+ }
}
throw new ArgumentException();
}
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -133,36 +133,42 @@
{
Check.ArgumentNotNull(ldf, nameof(ldf));
this.LayerDefinitionID = ldf.ResourceID;
- if (ldf.SubLayer.LayerType == LayerType.Vector)
+ switch (ldf.SubLayer.LayerType)
{
- var vl = ((IVectorLayerDefinition)ldf.SubLayer);
- _qualifiedClassName = vl.FeatureName;
- _geometryPropertyName = vl.Geometry;
- _featureSourceId = vl.ResourceId;
- _filter = vl.Filter;
- InitIdentityProperties(vl, suppressErrors);
- InitScaleRanges(vl);
- _hasTooltips = !string.IsNullOrEmpty(vl.ToolTip);
+ case LayerType.Vector:
+ {
+ var vl = ((IVectorLayerDefinition)ldf.SubLayer);
+ _qualifiedClassName = vl.FeatureName;
+ _geometryPropertyName = vl.Geometry;
+ _featureSourceId = vl.ResourceId;
+ _filter = vl.Filter;
+ InitIdentityProperties(vl, suppressErrors);
+ InitScaleRanges(vl);
+ _hasTooltips = !string.IsNullOrEmpty(vl.ToolTip);
+ }
+ break;
+ case LayerType.Raster:
+ {
+ var rl = ((IRasterLayerDefinition)ldf.SubLayer);
+ _qualifiedClassName = rl.FeatureName;
+ _geometryPropertyName = rl.Geometry;
+ _featureSourceId = rl.ResourceId;
+ InitScaleRanges(rl);
+ }
+ break;
+ case LayerType.Drawing:
+ {
+ _featureSourceId = ldf.SubLayer.ResourceId;
+ var dl = ((IDrawingLayerDefinition)ldf.SubLayer);
+ _scaleRanges = new double[]
+ {
+ dl.MinScale,
+ dl.MaxScale
+ };
+ EnsureOrderedMinMaxScales();
+ }
+ break;
}
- else if (ldf.SubLayer.LayerType == LayerType.Raster)
- {
- var rl = ((IRasterLayerDefinition)ldf.SubLayer);
- _qualifiedClassName = rl.FeatureName;
- _geometryPropertyName = rl.Geometry;
- _featureSourceId = rl.ResourceId;
- InitScaleRanges(rl);
- }
- else if (ldf.SubLayer.LayerType == LayerType.Drawing)
- {
- _featureSourceId = ldf.SubLayer.ResourceId;
- var dl = ((IDrawingLayerDefinition)ldf.SubLayer);
- _scaleRanges = new double[]
- {
- dl.MinScale,
- dl.MaxScale
- };
- EnsureOrderedMinMaxScales();
- }
_expandInLegend = false;
this.Name = ResourceIdentifier.GetName(ldf.ResourceID);
@@ -360,7 +366,7 @@
if (this.Type == kBaseMap)
throw new InvalidOperationException(Strings.ErrorSettingVisibilityOfTiledLayer);
- if (SetField(ref _visible, value, "Visible")) //NOXLATE
+ if (SetField(ref _visible, value, nameof(Visible)))
Parent.IsDirty = true;
}
}
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -79,6 +79,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Schema/GeometricPropertyDefinition.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -331,9 +331,9 @@
if (gt2 != null)
this.SpecificGeometryTypes = ProcessSpecificGeometryTypes(gt2.Value);
- this.IsReadOnly = (gtro != null ? Convert.ToBoolean(gtro.Value) : false);
- this.HasElevation = (hev != null ? Convert.ToBoolean(hev.Value) : false);
- this.HasMeasure = (hms != null ? Convert.ToBoolean(hms.Value) : false);
+ this.IsReadOnly = (gtro != null && Convert.ToBoolean(gtro.Value));
+ this.HasElevation = (hev != null && Convert.ToBoolean(hev.Value));
+ this.HasMeasure = (hms != null && Convert.ToBoolean(hms.Value));
this.SpatialContextAssociation = (srs != null ? srs.Value : string.Empty);
}
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/RasterWmsItem.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/RasterWmsItem.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/RasterWmsItem.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -37,27 +37,27 @@
/// <summary>
/// Represents all valid WMS image formats
/// </summary>
- public class WmsImageFormat
+ public static class WmsImageFormat
{
/// <summary>
/// Portable Network Graphics (PNG)
/// </summary>
- public const string PNG = "PNG"; //NOXLATE
+ public const string PNG = nameof(PNG);
/// <summary>
/// Tagged Image File (TIF)
/// </summary>
- public const string TIF = "TIF"; //NOXLATE
+ public const string TIF = nameof(TIF);
/// <summary>
/// Joint Photographic Experts Group (JPEG)
/// </summary>
- public const string JPG = "JPG"; //NOXLATE
+ public const string JPG = nameof(JPG);
/// <summary>
/// Graphics Interchange Format (GIF)
/// </summary>
- public const string GIF = "GIF"; //NOXLATE
+ public const string GIF = nameof(GIF);
}
internal RasterWmsItem()
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SiteVersion.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SiteVersion.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/SiteVersion.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -148,19 +148,19 @@
/// <summary>
/// Helper class containing known MapGuide Site Versions
/// </summary>
- public class SiteVersions
+ public static class SiteVersions
{
/// <summary>
/// The array of supported site versions
/// </summary>
private static readonly Version[] siteVersionNumbers = {
new Version(1,0,0,17864), //MGE 2007
- new Version(1,1,0,301), //MGOS 1.1.0
- new Version(1,2,0,1307), //MGOS 1.2.0
- new Version(1,2,0,4103), //MGE 2008
- new Version(2,0,0,1402), //MGOS 2.0.0 b1
- new Version(2,0,0,2308), //MGOS 2.0.0
- new Version(2,0,0,3202), //MGE 2009
+ new Version(1,1,0,301), //MGOS 1.1.0
+ new Version(1,2,0,1307), //MGOS 1.2.0
+ new Version(1,2,0,4103), //MGE 2008
+ new Version(2,0,0,1402), //MGOS 2.0.0 b1
+ new Version(2,0,0,2308), //MGOS 2.0.0
+ new Version(2,0,0,3202), //MGE 2009
new Version(2,0,2,3011), //MGOS 2.0.2
new Version(2,0,2,3402), //MGE 2009 SP1
new Version(2,1,0,3001), //MGE 2010
@@ -177,7 +177,7 @@
new Version(2,5,1,7601), //AIMS 2014
new Version(2,4,1,7767), //MGOS 2.4.1
new Version(2,5,1,7768) //MGOS 2.5.1
- };
+ };
public static Version[] SiteVersionNumbers
{
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -51,7 +51,7 @@
/// <summary>
/// Various helper functions
/// </summary>
- public class Utility
+ public static class Utility
{
/// <summary>
/// The exception data key that hints that an <see cref="T:System.Exception"/> thrown is related to XML content errors
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -1961,16 +1961,20 @@
public override ICommand CreateCommand(int cmdType)
{
CommandType ct = (CommandType)cmdType;
- if (ct == CommandType.GetResourceContents)
- return new HttpGetResourceContents(this);
- else if (ct == CommandType.GetFdoCacheInfo)
- return new HttpGetFdoCacheInfo(this);
- else if (ct == CommandType.CreateRuntimeMap)
- return new HttpCreateRuntimeMap(this);
- else if (ct == CommandType.DescribeRuntimeMap)
- return new HttpDescribeRuntimeMap(this);
- else if (ct == CommandType.GetTileProviders)
- return new HttpGetTileProviders(this);
+ switch (ct)
+ {
+ case CommandType.GetResourceContents:
+ return new HttpGetResourceContents(this);
+ case CommandType.GetFdoCacheInfo:
+ return new HttpGetFdoCacheInfo(this);
+ case CommandType.CreateRuntimeMap:
+ return new HttpCreateRuntimeMap(this);
+ case CommandType.DescribeRuntimeMap:
+ return new HttpDescribeRuntimeMap(this);
+ case CommandType.GetTileProviders:
+ return new HttpGetTileProviders(this);
+ }
+
return base.CreateCommand(cmdType);
}
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/OSGeo.MapGuide.MaestroAPI.Http.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/OSGeo.MapGuide.MaestroAPI.Http.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/OSGeo.MapGuide.MaestroAPI.Http.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -69,6 +69,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalConnection.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -488,10 +488,7 @@
get
{
MgFeatureService fes = GetFeatureService();
- GetByteReaderMethod fetch = () =>
- {
- return fes.GetFeatureProviders();
- };
+ GetByteReaderMethod fetch = fes.GetFeatureProviders;
LogMethodCall("MgFeatureService::GetFeatureProviders", true);
var reg = base.DeserializeObject<FeatureProviderRegistry>(new MgReadOnlyStream(fetch));
return reg.FeatureProvider.ToArray();
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/OSGeo.MapGuide.MaestroAPI.Local.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/OSGeo.MapGuide.MaestroAPI.Local.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/OSGeo.MapGuide.MaestroAPI.Local.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -119,6 +119,9 @@
<Compile Include="..\OSGeo.MapGuide.MaestroAPI.Native\Utility.cs">
<Link>Utility.cs</Link>
</Compile>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/OSGeo.MapGuide.MaestroAPI.Native32-2.2.0.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/OSGeo.MapGuide.MaestroAPI.Native32-2.2.0.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Native/OSGeo.MapGuide.MaestroAPI.Native32-2.2.0.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -98,6 +98,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/OSGeo.MapGuide.MaestroAPI.Tests.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/OSGeo.MapGuide.MaestroAPI.Tests.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/OSGeo.MapGuide.MaestroAPI.Tests.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -53,6 +53,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\SignedAssemblyInfo.cs">
<Link>SignedAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/OSGeo.MapGuide.ObjectModels.Tests.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/OSGeo.MapGuide.ObjectModels.Tests.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/OSGeo.MapGuide.ObjectModels.Tests.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -65,6 +65,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="ApplicationDefinitionTests.cs" />
<Compile Include="CheckTests.cs" />
<Compile Include="DrawingSourceTests.cs" />
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/TileSetAbstractTests.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/TileSetAbstractTests.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModel.Tests/TileSetAbstractTests.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -1,23 +1,23 @@
-#region Disclaimer / License
-
-// Copyright (C) 2015, Jackie Ng
-// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
+#region Disclaimer / License
+
+// Copyright (C) 2015, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
#endregion Disclaimer / License
using NUnit.Framework;
using OSGeo.MapGuide.ObjectModels.TileSetDefinition;
@@ -167,7 +167,7 @@
Assert.Throws<InvalidOperationException>(() => tsTileSet.GetScaleAt(0));
Assert.Throws<InvalidOperationException>(() => tsTileSet.RemoveScaleAt(3));
Assert.Throws<InvalidOperationException>(() => tsTileSet.RemoveFiniteDisplayScale(1.2));
- Assert.Throws<InvalidOperationException>(() => tsTileSet.RemoveAllScales());
+ Assert.Throws<InvalidOperationException>(tsTileSet.RemoveAllScales);
Assert.Throws<InvalidOperationException>(() => tsTileSet.AddFiniteDisplayScale(1234.0));
}
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/OSGeo.MapGuide.ObjectModels.csproj
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/OSGeo.MapGuide.ObjectModels.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/OSGeo.MapGuide.ObjectModels.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -197,6 +197,9 @@
<Compile Include="..\Generated\WebLayout-2.6.0.designer.cs">
<Link>WebLayout\v2_6_0\WebLayout-2.6.0.designer.cs</Link>
</Compile>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\SignedAssemblyInfo.cs">
<Link>SignedAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ObjectFactory.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -75,7 +75,7 @@
///
/// This registration needs to be done as part of your application's startup/initialization phase.
/// </summary>
- public class ObjectFactory
+ public static class ObjectFactory
{
private static Dictionary<Version, Func<LayerType, ILayerDefinition>> _layerFactories;
private static Dictionary<LoadType, Func<ILoadProcedure>> _loadProcFactories;
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Properties/AssemblyInfo.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Properties/AssemblyInfo.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -33,11 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.0.0")]
-[assembly: AssemblyFileVersion("3.0.0.0")]
-
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0145:Removes 'private' modifiers that are not required", Justification = "The author likes to be explicit with accessibility modifiers")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0129:Removes 'internal' modifiers that are not required", Justification = "The author likes to be explicit with accessibility modifiers")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Language", "CSE0003:Use expression-bodied members", Justification = "The author prefers debuggability over succintness")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0007:The default underlying type of enums is int, so defining it explicitly is redundant.", Justification = "The author prefers to be explicit about underlying enum types")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0072", Justification = "The author prefers explicit context for non-field member access")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "IDE0003", Justification = "The author prefers explicit context for non-field member access")]
\ No newline at end of file
+[assembly: AssemblyFileVersion("3.0.0.0")]
\ No newline at end of file
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceTypeRegistry.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -57,7 +57,7 @@
/// </summary>
internal static class ResourceTypeRegistry
{
- private static Dictionary<ResourceTypeDescriptor, ResourceSerializer> _serializers;
+ private static readonly Dictionary<ResourceTypeDescriptor, ResourceSerializer> _serializers;
static ResourceTypeRegistry()
{
@@ -79,7 +79,7 @@
new ResourceSerializer()
{
Serialize = (res) => { return res.SerializeToStream(); },
- Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.ApplicationDefinition.v1_0_0.ApplicationDefinitionType.Deserialize(xml); }
+ Deserialize = (xml) => { return ApplicationDefinition.v1_0_0.ApplicationDefinitionType.Deserialize(xml); }
});
//DrawingSource 1.0.0
@@ -88,7 +88,7 @@
new ResourceSerializer()
{
Serialize = (res) => { return res.SerializeToStream(); },
- Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.DrawingSource.v1_0_0.DrawingSource.Deserialize(xml); }
+ Deserialize = (xml) => { return DrawingSource.v1_0_0.DrawingSource.Deserialize(xml); }
});
//FeatureSource 1.0.0
@@ -97,7 +97,7 @@
new ResourceSerializer()
{
Serialize = (res) => { return res.SerializeToStream(); },
- Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.FeatureSource.v1_0_0.FeatureSourceType.Deserialize(xml); }
+ Deserialize = (xml) => { return FeatureSource.v1_0_0.FeatureSourceType.Deserialize(xml); }
});
//LayerDefinition 1.0.0
@@ -106,7 +106,7 @@
new ResourceSerializer()
{
Serialize = (res) => { return res.SerializeToStream(); },
- Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.LayerDefinition.v1_0_0.LayerDefinition.Deserialize(xml); }
+ Deserialize = (xml) => { return LayerDefinition.v1_0_0.LayerDefinition.Deserialize(xml); }
});
//LoadProcedure 1.0.0
@@ -115,7 +115,7 @@
new ResourceSerializer()
{
Serialize = (res) => { return res.SerializeToStream(); },
- Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.LoadProcedure.v1_0_0.LoadProcedure.Deserialize(xml); }
+ Deserialize = (xml) => { return LoadProcedure.v1_0_0.LoadProcedure.Deserialize(xml); }
});
//MapDefinition 1.0.0
@@ -123,8 +123,8 @@
ResourceTypeDescriptor.MapDefinition,
new ResourceSerializer()
{
- Serialize = (res) => { return OSGeo.MapGuide.ObjectModels.MapDefinition.v1_0_0.MdfEntryPoint.Serialize(res); },
- Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.MapDefinition.v1_0_0.MdfEntryPoint.Deserialize(xml); }
+ Serialize = MapDefinition.v1_0_0.MdfEntryPoint.Serialize,
+ Deserialize = MapDefinition.v1_0_0.MdfEntryPoint.Deserialize
});
//PrintLayout 1.0.0
@@ -133,7 +133,7 @@
new ResourceSerializer()
{
Serialize = (res) => { return res.SerializeToStream(); },
- Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.PrintLayout.v1_0_0.PrintLayout.Deserialize(xml); }
+ Deserialize = (xml) => { return PrintLayout.v1_0_0.PrintLayout.Deserialize(xml); }
});
//SymbolDefinition 1.0.0
@@ -149,7 +149,7 @@
doc.LoadXml(xml);
if (doc.DocumentElement.Name == "SimpleSymbolDefinition") //NOXLATE
{
- return OSGeo.MapGuide.ObjectModels.SymbolDefinition.v1_0_0.SimpleSymbolDefinition.Deserialize(xml);
+ return SymbolDefinition.v1_0_0.SimpleSymbolDefinition.Deserialize(xml);
}
else
{
@@ -167,7 +167,7 @@
new ResourceSerializer()
{
Serialize = (res) => { return res.SerializeToStream(); },
- Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.SymbolLibrary.v1_0_0.SymbolLibraryType.Deserialize(xml); }
+ Deserialize = (xml) => { return SymbolLibrary.v1_0_0.SymbolLibraryType.Deserialize(xml); }
});
//WebLayout 1.0.0
@@ -176,7 +176,7 @@
new ResourceSerializer()
{
Serialize = (res) => { return res.SerializeToStream(); },
- Deserialize = (xml) => { return OSGeo.MapGuide.ObjectModels.WebLayout.v1_0_0.WebLayoutType.Deserialize(xml); }
+ Deserialize = (xml) => { return WebLayout.v1_0_0.WebLayoutType.Deserialize(xml); }
});
}
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/RuntimeMap/v3_0_0/RuntimeMapImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/RuntimeMap/v3_0_0/RuntimeMapImpl.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/RuntimeMap/v3_0_0/RuntimeMapImpl.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -1,23 +1,23 @@
-#region Disclaimer / License
-
-// Copyright (C) 2014, Jackie Ng
-// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-//
-
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
#endregion Disclaimer / License
using OSGeo.MapGuide.ObjectModels.Common;
@@ -149,10 +149,7 @@
}
set
{
- if (value.HasValue)
- this.TileHeight = value.Value.ToString(CultureInfo.InvariantCulture);
- else
- this.TileHeight = null;
+ this.TileHeight = value.HasValue ? value.Value.ToString(CultureInfo.InvariantCulture) : null;
}
}
}
@@ -162,7 +159,7 @@
: IReadOnlyCollection<TInterface>
where TImpl : TInterface
{
- private IList<TImpl> _list;
+ private readonly IList<TImpl> _list;
protected ReadOnlyCollectionWrapper(IList<TImpl> list)
{
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/WatermarkCollectionUtil.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/WatermarkCollectionUtil.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/WatermarkDefinition/WatermarkCollectionUtil.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -27,7 +27,7 @@
namespace OSGeo.MapGuide.ObjectModels.WatermarkDefinition
{
- internal class WatermarkCollectionUtil
+ internal static class WatermarkCollectionUtil
{
public static IWatermark AddWatermark<T>(IList<T> collection, IWatermarkDefinition watermark) where T : class, IWatermark, new()
{
Added: trunk/Tools/Maestro/Properties/CodeAnalysisRules.cs
===================================================================
--- trunk/Tools/Maestro/Properties/CodeAnalysisRules.cs (rev 0)
+++ trunk/Tools/Maestro/Properties/CodeAnalysisRules.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -0,0 +1,34 @@
+#region Disclaimer / License
+
+// Copyright (C) 2015, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#endregion Disclaimer / License
+
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0145:Removes 'private' modifiers that are not required", Justification = "The author likes to be explicit with accessibility modifiers")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0129:Removes 'internal' modifiers that are not required", Justification = "The author likes to be explicit with accessibility modifiers")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Language", "CSE0003:Use expression-bodied members", Justification = "The author prefers debuggability over succintness")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0007:The default underlying type of enums is int, so defining it explicitly is redundant.", Justification = "The author prefers to be explicit about underlying enum types")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0072", Justification = "The author prefers explicit context for non-field member access")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "IDE0003", Justification = "The author prefers explicit context for non-field member access")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Virtual member call in constructor", "RECS0021")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Use 'var' keyword", "RECS0091")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Nullable type can be simplified", "RECS0013")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Replace with '|='", "RECS0033", Justification = "The author prefers clarity of code")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Replace with '&='", "RECS0093", Justification = "The author prefers clarity of code")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Not implemented", "RECS0083", Justification = "A NotImplementedException is thrown for a reason")]
\ No newline at end of file
Modified: trunk/Tools/Maestro/Properties/GlobalAssemblyInfo.cs
===================================================================
--- trunk/Tools/Maestro/Properties/GlobalAssemblyInfo.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Properties/GlobalAssemblyInfo.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -37,11 +37,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("6.0.0.0")]
-[assembly: AssemblyFileVersion("6.0.0.0")]
-
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0145:Removes 'private' modifiers that are not required", Justification = "The author likes to be explicit with accessibility modifiers")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0129:Removes 'internal' modifiers that are not required", Justification = "The author likes to be explicit with accessibility modifiers")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Language", "CSE0003:Use expression-bodied members", Justification = "The author prefers debuggability over succintness")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0007:The default underlying type of enums is int, so defining it explicitly is redundant.", Justification = "The author prefers to be explicit about underlying enum types")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0072", Justification = "The author prefers explicit context for non-field member access")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "IDE0003", Justification = "The author prefers explicit context for non-field member access")]
\ No newline at end of file
+[assembly: AssemblyFileVersion("6.0.0.0")]
\ No newline at end of file
Modified: trunk/Tools/Maestro/ProviderTemplate/ProviderTemplate.csproj
===================================================================
--- trunk/Tools/Maestro/ProviderTemplate/ProviderTemplate.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/ProviderTemplate/ProviderTemplate.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -46,6 +46,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
Modified: trunk/Tools/Maestro/RtMapInspector/RtMapInspector.csproj
===================================================================
--- trunk/Tools/Maestro/RtMapInspector/RtMapInspector.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/RtMapInspector/RtMapInspector.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -62,6 +62,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>GlobalAssemblyInfo.cs</Link>
</Compile>
Modified: trunk/Tools/Maestro/SignMapGuideApi/SignMapGuideApi.csproj
===================================================================
--- trunk/Tools/Maestro/SignMapGuideApi/SignMapGuideApi.csproj 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/SignMapGuideApi/SignMapGuideApi.csproj 2015-08-10 12:54:47 UTC (rev 8735)
@@ -44,6 +44,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Properties\CodeAnalysisRules.cs">
+ <Link>CodeAnalysisRules.cs</Link>
+ </Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Modified: trunk/Tools/Maestro/Thirdparty/SharpDevelop/GlobalAssemblyInfo.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/SharpDevelop/GlobalAssemblyInfo.cs 2015-08-06 09:56:21 UTC (rev 8734)
+++ trunk/Tools/Maestro/Thirdparty/SharpDevelop/GlobalAssemblyInfo.cs 2015-08-10 12:54:47 UTC (rev 8735)
@@ -27,6 +27,16 @@
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2243:AttributeStringLiteralsShouldParseCorrectly",
Justification = "AssemblyInformationalVersion does not need to be a parsable version")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0145:Removes 'private' modifiers that are not required", Justification = "The author likes to be explicit with accessibility modifiers")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0129:Removes 'internal' modifiers that are not required", Justification = "The author likes to be explicit with accessibility modifiers")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Language", "CSE0003:Use expression-bodied members", Justification = "The author prefers debuggability over succintness")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0007:The default underlying type of enums is int, so defining it explicitly is redundant.", Justification = "The author prefers to be explicit about underlying enum types")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0072", Justification = "The author prefers explicit context for non-field member access")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "IDE0003", Justification = "The author prefers explicit context for non-field member access")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Virtual member call in constructor", "RECS0021")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Use 'var' keyword", "RECS0091")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Nullable type can be simplified", "RECS0013")]
+
internal static class RevisionClass
{
public const string Major = "4";
More information about the mapguide-commits
mailing list