Index: Core/Common/src/Core.Common.Base/Core.Common.Base.csproj =================================================================== diff -u -rbc4c4000ca4a850b49a88156ca2b919ea690494b -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/src/Core.Common.Base/Core.Common.Base.csproj (.../Core.Common.Base.csproj) (revision bc4c4000ca4a850b49a88156ca2b919ea690494b) +++ Core/Common/src/Core.Common.Base/Core.Common.Base.csproj (.../Core.Common.Base.csproj) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -98,7 +98,7 @@ - + Index: Core/Common/src/Core.Common.Base/Geometry/Segment2DIntersectSegment2DResult.cs =================================================================== diff -u -rd305785c5a4330022a5d01cc62ea793a0ae1c5d8 -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/src/Core.Common.Base/Geometry/Segment2DIntersectSegment2DResult.cs (.../Segment2DIntersectSegment2DResult.cs) (revision d305785c5a4330022a5d01cc62ea793a0ae1c5d8) +++ Core/Common/src/Core.Common.Base/Geometry/Segment2DIntersectSegment2DResult.cs (.../Segment2DIntersectSegment2DResult.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System.Collections.ObjectModel; + namespace Core.Common.Base.Geometry { /// @@ -30,7 +32,7 @@ private Segment2DIntersectSegment2DResult(Intersection2DType type, Point2D[] points) { IntersectionType = type; - IntersectionPoints = points; + IntersectionPoints = new ReadOnlyCollection(points); } /// @@ -47,7 +49,7 @@ /// If has a value of , /// the array holds the two points defining the overlapping area for both segments. /// - public Point2D[] IntersectionPoints { get; private set; } + public ReadOnlyCollection IntersectionPoints { get; private set; } /// /// Creates the calculation result for having found no intersections. Index: Core/Common/src/Core.Common.Base/IO/FileImporterBase.cs =================================================================== diff -u -rec2994dd83ec90cf06ab2930ae547d652e343c25 -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/src/Core.Common.Base/IO/FileImporterBase.cs (.../FileImporterBase.cs) (revision ec2994dd83ec90cf06ab2930ae547d652e343c25) +++ Core/Common/src/Core.Common.Base/IO/FileImporterBase.cs (.../FileImporterBase.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -56,7 +56,7 @@ ImportTarget = importTarget; } - public void SetProgressChanged(ProgressChangedDelegate action) + public void SetProgressChanged(OnProgressChanged action) { ProgressChanged = action; } @@ -87,7 +87,7 @@ } } - private ProgressChangedDelegate ProgressChanged { get; set; } + private OnProgressChanged ProgressChanged { get; set; } /// /// Gets the import target. Index: Core/Common/src/Core.Common.Base/IO/IFileImporter.cs =================================================================== diff -u -r49c5da81f49a23dd6e66526d264a08bf510e6963 -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/src/Core.Common.Base/IO/IFileImporter.cs (.../IFileImporter.cs) (revision 49c5da81f49a23dd6e66526d264a08bf510e6963) +++ Core/Common/src/Core.Common.Base/IO/IFileImporter.cs (.../IFileImporter.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -29,7 +29,7 @@ /// /// Sets the action to perform when progress has changed. /// - void SetProgressChanged(ProgressChangedDelegate action); + void SetProgressChanged(OnProgressChanged action); /// /// This method imports the data to an item from a file at the given location. Index: Core/Common/src/Core.Common.Base/IO/OnProgressChanged.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Base/IO/OnProgressChanged.cs (revision 0) +++ Core/Common/src/Core.Common.Base/IO/OnProgressChanged.cs (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -0,0 +1,31 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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 3 of the License, or +// (at your option) any later version. +// +// This program 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 program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +namespace Core.Common.Base.IO +{ + /// + /// Action to perform when progress has changed. + /// + /// The description of the current step. + /// The number of the current progress step. + /// The total number of progress steps. + public delegate void OnProgressChanged(string currentStepDescription, int currentStep, int totalSteps); +} \ No newline at end of file Fisheye: Tag 9063c3c60f936760953c52185b72f0cb2dce9bf8 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Base/IO/ProgressChangedDelegate.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs =================================================================== diff -u -r25695fa024db28f8926ed7e361d19bec16d3c112 -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 25695fa024db28f8926ed7e361d19bec16d3c112) +++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -566,7 +566,7 @@ sourceGroupBox.Items.Remove(item); targetGroupBox.Items.Add(item); - if (item is Button) + if (buttonItem != null) { var button = targetGroupBox.Items.OfType private System.ComponentModel.IContainer components = null; - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - #region Windows Form Designer generated code /// Index: Core/Common/src/Core.Common.Gui/Forms/ProgressDialog/ActivityProgressDialog.cs =================================================================== diff -u -rd6a4f1640dda34fe8f75d0d05e848a68f64242b5 -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/src/Core.Common.Gui/Forms/ProgressDialog/ActivityProgressDialog.cs (.../ActivityProgressDialog.cs) (revision d6a4f1640dda34fe8f75d0d05e848a68f64242b5) +++ Core/Common/src/Core.Common.Gui/Forms/ProgressDialog/ActivityProgressDialog.cs (.../ActivityProgressDialog.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -202,5 +202,22 @@ labelActivityProgressText.Text = progressTextNullOrEmpty ? string.Empty : activity.ProgressText; }); } + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + + cancellationTokenSource.Dispose(); + + base.Dispose(disposing); + } + } } \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/PropertyBag/PropertySpec.cs =================================================================== diff -u -r0df7cded06f5afbac08b97e025242ba55c90ec57 -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/src/Core.Common.Gui/PropertyBag/PropertySpec.cs (.../PropertySpec.cs) (revision 0df7cded06f5afbac08b97e025242ba55c90ec57) +++ Core/Common/src/Core.Common.Gui/PropertyBag/PropertySpec.cs (.../PropertySpec.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.Collections.ObjectModel; using System.ComponentModel; using System.Globalization; using System.IO; @@ -65,7 +66,7 @@ { attributeList.Add(new ReadOnlyAttribute(true)); } - Attributes = attributeList.ToArray(); + Attributes = new ReadOnlyCollection(attributeList); } /// @@ -74,7 +75,7 @@ /// class, such as /// and . /// - public Attribute[] Attributes { get; private set; } + public ReadOnlyCollection Attributes { get; private set; } /// /// Gets the name of the property. Index: Core/Common/src/Core.Common.Gui/PropertyBag/PropertySpecDescriptor.cs =================================================================== diff -u -rf08fd5cc1482a6c706bdb04d46b6482d489b7c5b -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/src/Core.Common.Gui/PropertyBag/PropertySpecDescriptor.cs (.../PropertySpecDescriptor.cs) (revision f08fd5cc1482a6c706bdb04d46b6482d489b7c5b) +++ Core/Common/src/Core.Common.Gui/PropertyBag/PropertySpecDescriptor.cs (.../PropertySpecDescriptor.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -21,6 +21,7 @@ using System; using System.ComponentModel; +using System.Linq; using Core.Common.Gui.Attributes; namespace Core.Common.Gui.PropertyBag @@ -48,7 +49,7 @@ /// Thrown when /// is null. public PropertySpecDescriptor(PropertySpec propertySpec, object instance) - : base(ValidateNotNull(propertySpec).Name, propertySpec.Attributes) + : base(ValidateNotNull(propertySpec).Name, propertySpec.Attributes.ToArray()) { item = propertySpec; this.instance = instance; Index: Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs =================================================================== diff -u -rba63727b1fada130c04d9006805ec9a28fe21b65 -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs (.../Math2DTest.cs) (revision ba63727b1fada130c04d9006805ec9a28fe21b65) +++ Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs (.../Math2DTest.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -22,6 +22,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using Core.Common.Base.Geometry; using Core.Common.Base.Properties; @@ -1202,7 +1203,7 @@ "Fraction needs to be defined in range [0.0, 1.0] in order to reliably interpolate."); } - private static void CollectionAssertAreEquivalent(Point2D[] expected, Point2D[] actual) + private static void CollectionAssertAreEquivalent(Point2D[] expected, ReadOnlyCollection actual) { var comparer = new Point2DComparerWithTolerance(1e-6); foreach (var intersectionPoint in actual) Index: Core/Common/test/Core.Common.Gui.Test/Converters/PngToIconConverterTest.cs =================================================================== diff -u -r24da3aa72ccc0776599628c9f971081694048d9a -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/test/Core.Common.Gui.Test/Converters/PngToIconConverterTest.cs (.../PngToIconConverterTest.cs) (revision 24da3aa72ccc0776599628c9f971081694048d9a) +++ Core/Common/test/Core.Common.Gui.Test/Converters/PngToIconConverterTest.cs (.../PngToIconConverterTest.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -26,6 +26,7 @@ using System.Windows.Media.Imaging; using Core.Common.Gui.Converters; using Core.Common.Gui.Test.Properties; +using Core.Common.TestUtil; using NUnit.Framework; namespace Core.Common.Gui.Test.Converters @@ -53,10 +54,9 @@ var bitmap = converter.Convert(Resources.abacus, typeof(BitmapImage), null, CultureInfo.InvariantCulture); // Assert - Assert.IsInstanceOf(bitmap); - var bitmapInstance = (BitmapImage) bitmap; - Assert.AreEqual(16, bitmapInstance.Height); - Assert.AreEqual(16, bitmapInstance.Width); + var bitmapInstance = bitmap as BitmapImage; + Assert.NotNull(bitmapInstance); + TestHelper.AssertImagesAreEqual(new Bitmap(bitmapInstance.StreamSource), Resources.abacus); } [Test] Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/PropertySpecTest.cs =================================================================== diff -u -rf824252815cb5424b38cc755c718d4fd2137c4f5 -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Core/Common/test/Core.Common.Gui.Test/PropertyBag/PropertySpecTest.cs (.../PropertySpecTest.cs) (revision f824252815cb5424b38cc755c718d4fd2137c4f5) +++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/PropertySpecTest.cs (.../PropertySpecTest.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -72,7 +72,7 @@ // Assert Assert.AreEqual(propertyName, propertySpec.Name); Assert.AreEqual(propertyInfo.PropertyType.AssemblyQualifiedName, propertySpec.TypeName); - Assert.AreEqual(1, propertySpec.Attributes.Length); + Assert.AreEqual(1, propertySpec.Attributes.Count); var readOnlyAttribute = (ReadOnlyAttribute) propertySpec.Attributes[0]; Assert.IsTrue(readOnlyAttribute.IsReadOnly); } @@ -90,7 +90,7 @@ // Assert Assert.AreEqual(propertyName, propertySpec.Name); Assert.AreEqual(propertyInfo.PropertyType.AssemblyQualifiedName, propertySpec.TypeName); - Assert.AreEqual(2, propertySpec.Attributes.Length); + Assert.AreEqual(2, propertySpec.Attributes.Count); var browsableAttribute = propertySpec.Attributes.OfType().Single(); Assert.IsTrue(browsableAttribute.Browsable); var readOnlyAttribute = propertySpec.Attributes.OfType().Single(); @@ -110,7 +110,7 @@ // Assert Assert.AreEqual(propertyName, propertySpec.Name); Assert.AreEqual(propertyInfo.PropertyType.AssemblyQualifiedName, propertySpec.TypeName); - Assert.AreEqual(2, propertySpec.Attributes.Length); + Assert.AreEqual(2, propertySpec.Attributes.Count); var browsableAttribute = propertySpec.Attributes.OfType().Single(); Assert.IsFalse(browsableAttribute.Browsable, "Should have the override value."); var readOnlyAttribute = propertySpec.Attributes.OfType().Single(); @@ -130,7 +130,7 @@ // Assert Assert.AreEqual(propertyName, propertySpec.Name); Assert.AreEqual(propertyInfo.PropertyType.AssemblyQualifiedName, propertySpec.TypeName); - Assert.AreEqual(1, propertySpec.Attributes.Length); + Assert.AreEqual(1, propertySpec.Attributes.Count); var browsableAttribute = propertySpec.Attributes.OfType().Single(); Assert.IsTrue(browsableAttribute.Browsable, "No override in 'InheritorSettingPropertyToNotBrowsable' for property 'BoolPropertyWithAttributes', so use base class."); Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs =================================================================== diff -u -rd56bec747401ad6676fac64af5eef6d5fd89c47c -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision d56bec747401ad6676fac64af5eef6d5fd89c47c) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -51,7 +51,7 @@ { private static readonly ILog log = LogManager.GetLogger(typeof(GrassCoverErosionInwardsCalculationService)); - public ProgressChangedDelegate OnProgress; + public OnProgressChanged OnProgress; private IOvertoppingCalculator overtoppingCalculator; private IDikeHeightCalculator dikeHeightCalculator; private bool canceled; Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs =================================================================== diff -u -r30327d029fa4a87a0acd139798d6966420be4ed2 -r9063c3c60f936760953c52185b72f0cb2dce9bf8 --- Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs (.../WaveConditionsCalculationServiceBase.cs) (revision 30327d029fa4a87a0acd139798d6966420be4ed2) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Service/WaveConditionsCalculationServiceBase.cs (.../WaveConditionsCalculationServiceBase.cs) (revision 9063c3c60f936760953c52185b72f0cb2dce9bf8) @@ -47,7 +47,7 @@ { private static readonly ILog log = LogManager.GetLogger(typeof(WaveConditionsCalculationServiceBase)); - public ProgressChangedDelegate OnProgress; + public OnProgressChanged OnProgress; protected int TotalWaterLevelCalculations; private int currentStep = 1; private IWaveConditionsCosineCalculator calculator;