Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismView.cs =================================================================== diff -u -rf5cd3b2ee9b7436f606ee6bc027b795accf0549d -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismView.cs (.../ClosingStructuresFailureMechanismView.cs) (revision f5cd3b2ee9b7436f606ee6bc027b795accf0549d) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismView.cs (.../ClosingStructuresFailureMechanismView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -169,16 +169,16 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(ClosingStructuresDataResources.ClosingStructuresFailureMechanism_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - foreshoreProfilesMapData = RingtoetsMapDataFactory.CreateForeshoreProfileMapData(); - calculationsMapData = RingtoetsMapDataFactory.CreateCalculationsMapData(); - structuresMapData = RingtoetsMapDataFactory.CreateStructuresMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + foreshoreProfilesMapData = RiskeerMapDataFactory.CreateForeshoreProfileMapData(); + calculationsMapData = RiskeerMapDataFactory.CreateCalculationsMapData(); + structuresMapData = RiskeerMapDataFactory.CreateStructuresMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -325,7 +325,7 @@ { IEnumerable> calculations = FailureMechanism.CalculationsGroup.GetCalculations().Cast>(); - calculationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateStructureCalculationsFeatures(calculations); + calculationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateStructureCalculationsFeatures(calculations); } #endregion @@ -340,7 +340,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion @@ -356,7 +356,7 @@ private void SetReferenceLineMapData() { ReferenceLine referenceLine = AssessmentSection.ReferenceLine; - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); } #endregion @@ -376,9 +376,9 @@ private void SetSectionsMapData() { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion @@ -394,7 +394,7 @@ private void SetStructuresMapData() { IEnumerable structures = FailureMechanism.ClosingStructures; - structuresMapData.Features = RingtoetsMapDataFeaturesFactory.CreateStructuresFeatures(structures); + structuresMapData.Features = RiskeerMapDataFeaturesFactory.CreateStructuresFeatures(structures); } #endregion @@ -410,7 +410,7 @@ private void SetForeshoreProfilesMapData() { IEnumerable foreshoreProfiles = FailureMechanism.ForeshoreProfiles; - foreshoreProfilesMapData.Features = RingtoetsMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); + foreshoreProfilesMapData.Features = RiskeerMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); } #endregion Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs =================================================================== diff -u -rf5cd3b2ee9b7436f606ee6bc027b795accf0549d -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision f5cd3b2ee9b7436f606ee6bc027b795accf0549d) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -209,7 +209,7 @@ new ImportMessageProvider(), new ClosingStructureReplaceDataStrategy(context.FailureMechanism)), Name = RiskeerCommonFormsResources.StructuresImporter_DisplayName, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = RiskeerCommonFormsResources.StructuresIcon, FileFilterGenerator = CreateClosingStructureFileFilter(), IsEnabled = context => context.AssessmentSection.ReferenceLine.Points.Any(), @@ -218,7 +218,7 @@ RiskeerCommonIOResources.VerifyStructuresShouldUpdate_When_importing_Calculation_with_Structure_data_output_will_be_cleared_confirm) }; - yield return RingtoetsImportInfoFactory.CreateCalculationConfigurationImportInfo( + yield return RiskeerImportInfoFactory.CreateCalculationConfigurationImportInfo( (context, filePath) => new ClosingStructuresCalculationConfigurationImporter( filePath, context.WrappedData, @@ -238,7 +238,7 @@ new UpdateMessageProvider(), new ClosingStructureUpdateDataStrategy(context.FailureMechanism)), Name = RiskeerCommonDataResources.StructureCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = RiskeerCommonFormsResources.StructuresIcon, FileFilterGenerator = CreateClosingStructureFileFilter(), IsEnabled = c => c.FailureMechanism.ClosingStructures.SourcePath != null, @@ -248,18 +248,18 @@ RiskeerCommonIOResources.VerifyStructuresShouldUpdate_When_updating_Calculation_with_Structure_data_output_will_be_cleared_confirm) }; - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< ClosingStructuresFailureMechanismSectionsContext, ClosingStructuresFailureMechanism, ClosingStructuresFailureMechanismSectionResult>( new ClosingStructuresFailureMechanismSectionResultUpdateStrategy()); } public override IEnumerable GetExportInfos() { - yield return RingtoetsExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( (context, filePath) => new ClosingStructuresCalculationConfigurationExporter(context.WrappedData.Children, filePath), context => context.WrappedData.Children.Any()); - yield return RingtoetsExportInfoFactory.CreateCalculationConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationConfigurationExportInfo( (context, filePath) => new ClosingStructuresCalculationConfigurationExporter(new[] { context.WrappedData Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/src/Riskeer.Common.Forms/ExportInfos/RingtoetsExportInfoFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Common/src/Riskeer.Common.Forms/ExportInfos/RiskeerExportInfoFactory.cs =================================================================== diff -u --- Riskeer/Common/src/Riskeer.Common.Forms/ExportInfos/RiskeerExportInfoFactory.cs (revision 0) +++ Riskeer/Common/src/Riskeer.Common.Forms/ExportInfos/RiskeerExportInfoFactory.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,84 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using Core.Common.Base.IO; +using Core.Common.Gui.Plugin; +using Core.Common.Util; +using Riskeer.Common.Data.Calculation; +using Riskeer.Common.Data.FailureMechanism; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.Common.Forms.Properties; + +namespace Riskeer.Common.Forms.ExportInfos +{ + /// + /// Factory for creating standard objects. + /// + public static class RiskeerExportInfoFactory + { + /// + /// Creates a object for a calculation group configuration + /// of the type . + /// + /// The type of calculation group context + /// to create the for. + /// The function to create the relevant exporter. + /// The function to enable the exporter. + /// An object. + public static ExportInfo CreateCalculationGroupConfigurationExportInfo( + Func createFileExporter, + Func isEnabled) + where TCalculationGroupContext : ICalculationContext + { + return new ExportInfo + { + Name = Resources.CalculationConfigurationExporter_DisplayName, + FileFilterGenerator = new FileFilterGenerator(Resources.DataTypeDisplayName_xml_file_filter_Extension, + Resources.DataTypeDisplayName_xml_file_filter_Description), + IsEnabled = isEnabled, + CreateFileExporter = createFileExporter + }; + } + + /// + /// Creates a object for a calculation configuration + /// of the type . + /// + /// The type of calculation context + /// to create the for. + /// The function to create the relevant exporter. + /// An object. + public static ExportInfo CreateCalculationConfigurationExportInfo + (Func createFileExporter) + where TCalculationContext : ICalculationContext + { + return new ExportInfo + { + Name = Resources.CalculationConfigurationExporter_DisplayName, + FileFilterGenerator = new FileFilterGenerator(Resources.DataTypeDisplayName_xml_file_filter_Extension, + Resources.DataTypeDisplayName_xml_file_filter_Description), + CreateFileExporter = createFileExporter, + IsEnabled = context => true + }; + } + } +} \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/Factories/AssemblyMapDataFeaturesFactory.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Common/src/Riskeer.Common.Forms/Factories/AssemblyMapDataFeaturesFactory.cs (.../AssemblyMapDataFeaturesFactory.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/Factories/AssemblyMapDataFeaturesFactory.cs (.../AssemblyMapDataFeaturesFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -99,7 +99,7 @@ { foreach (TSectionResult sectionResult in failureMechanism.SectionResults) { - MapFeature feature = RingtoetsMapDataFeaturesFactory.CreateSingleLineMapFeature(sectionResult.Section.Points); + MapFeature feature = RiskeerMapDataFeaturesFactory.CreateSingleLineMapFeature(sectionResult.Section.Points); FailureMechanismSectionAssembly assemblyResult; try @@ -128,7 +128,7 @@ { foreach (TSectionResult sectionResult in failureMechanism.SectionResults) { - MapFeature feature = RingtoetsMapDataFeaturesFactory.CreateSingleLineMapFeature(sectionResult.Section.Points); + MapFeature feature = RiskeerMapDataFeaturesFactory.CreateSingleLineMapFeature(sectionResult.Section.Points); FailureMechanismSectionAssemblyCategoryGroup categoryGroup; try Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/src/Riskeer.Common.Forms/Factories/RingtoetsChartDataFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/src/Riskeer.Common.Forms/Factories/RingtoetsGraphNodeFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/src/Riskeer.Common.Forms/Factories/RingtoetsMapDataFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/src/Riskeer.Common.Forms/Factories/RingtoetsMapDataFeaturesFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/src/Riskeer.Common.Forms/Factories/RingtoetsStackChartDataFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerChartDataFactory.cs =================================================================== diff -u --- Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerChartDataFactory.cs (revision 0) +++ Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerChartDataFactory.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,167 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System.Drawing; +using Core.Components.Chart.Data; +using Core.Components.Chart.Styles; +using Riskeer.Common.Forms.Properties; +using RiskeerCommonDataResources = Riskeer.Common.Data.Properties.Resources; + +namespace Riskeer.Common.Forms.Factories +{ + /// + /// Factory for creating based on information used as input. + /// + public static class RiskeerChartDataFactory + { + /// + /// Create with default styling for a foreshore geometry. + /// + /// The created . + public static ChartLineData CreateForeshoreGeometryChartData() + { + return new ChartLineData(Resources.Foreshore_DisplayName, + new ChartLineStyle + { + Color = Color.DarkOrange, + Width = 2, + DashStyle = ChartLineDashStyle.Solid, + IsEditable = true + }); + } + + /// + /// Create with default styling for a surface line. + /// + /// The created . + public static ChartLineData CreateSurfaceLineChartData() + { + return new ChartLineData(Resources.SurfaceLine_DisplayName, + new ChartLineStyle + { + Color = Color.Sienna, + Width = 2, + DashStyle = ChartLineDashStyle.Solid, + IsEditable = true + }); + } + + /// + /// Create a for a soil profile. + /// + /// The created . + public static ChartDataCollection CreateSoilProfileChartData() + { + return new ChartDataCollection(Resources.StochasticSoilProfileProperties_DisplayName); + } + + /// + /// Create with default styling for a characteristic point + /// of type ditch polder side. + /// + /// The created . + public static ChartPointData CreateDitchPolderSideChartData() + { + return new ChartPointData(RiskeerCommonDataResources.CharacteristicPoint_DitchPolderSide, + GetCharacteristicPointStyle(Color.IndianRed, + Color.Transparent, + ChartPointSymbol.Circle)); + } + + /// + /// Create with default styling for a characteristic point + /// of type bottom ditch polder side. + /// + /// The created . + public static ChartPointData CreateBottomDitchPolderSideChartData() + { + return new ChartPointData(RiskeerCommonDataResources.CharacteristicPoint_BottomDitchPolderSide, + GetCharacteristicPointStyle(Color.Teal, + Color.Transparent, + ChartPointSymbol.Circle)); + } + + /// + /// Create with default styling for a characteristic point + /// of type bottom ditch dike side. + /// + /// The created . + public static ChartPointData CreateBottomDitchDikeSideChartData() + { + return new ChartPointData(RiskeerCommonDataResources.CharacteristicPoint_BottomDitchDikeSide, + GetCharacteristicPointStyle(Color.DarkSeaGreen, + Color.Transparent, + ChartPointSymbol.Circle)); + } + + /// + /// Create with default styling for a characteristic point + /// of type ditch dike side. + /// + /// The created . + public static ChartPointData CreateDitchDikeSideChartData() + { + return new ChartPointData(RiskeerCommonDataResources.CharacteristicPoint_DitchDikeSide, + GetCharacteristicPointStyle(Color.MediumPurple, + Color.Transparent, + ChartPointSymbol.Circle)); + } + + /// + /// Create with default styling for a characteristic point + /// of type dike toe at polder. + /// + /// The created . + public static ChartPointData CreateDikeToeAtPolderChartData() + { + return new ChartPointData(RiskeerCommonDataResources.CharacteristicPoint_DikeToeAtPolder, + GetCharacteristicPointStyle(Color.LightGray, + Color.Black, + ChartPointSymbol.Square)); + } + + /// + /// Create with default styling for a characteristic point + /// of type dike toe at river. + /// + /// The created . + public static ChartPointData CreateDikeToeAtRiverChartData() + { + return new ChartPointData(RiskeerCommonDataResources.CharacteristicPoint_DikeToeAtRiver, + GetCharacteristicPointStyle(Color.DarkGray, + Color.Black, + ChartPointSymbol.Square)); + } + + private static ChartPointStyle GetCharacteristicPointStyle(Color fillColor, Color strokeColor, ChartPointSymbol symbol) + { + return new ChartPointStyle + { + Color = fillColor, + StrokeColor = strokeColor, + Size = 8, + StrokeThickness = strokeColor == Color.Transparent ? 0 : 1, + Symbol = symbol, + IsEditable = true + }; + } + } +} \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerGraphNodeFactory.cs =================================================================== diff -u --- Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerGraphNodeFactory.cs (revision 0) +++ Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerGraphNodeFactory.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,169 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Xml; +using Core.Common.Base.Data; +using Core.Common.Util; +using Core.Components.PointedTree.Data; +using Riskeer.Common.Data.IllustrationPoints; +using Riskeer.Common.Forms.Helpers; +using Riskeer.Common.Forms.Properties; + +namespace Riskeer.Common.Forms.Factories +{ + /// + /// Factory for creating . + /// + public static class RiskeerGraphNodeFactory + { + private static readonly XmlWriterSettings xmlWriterSettings = new XmlWriterSettings + { + OmitXmlDeclaration = true, + NewLineHandling = NewLineHandling.Replace + }; + + /// + /// Creates a new based on the provided input. + /// + /// The illustration point. + /// The child nodes of the illustration point. + /// The newly created . + /// Thrown when any input parameter is null. + /// Thrown when + /// is not of type or . + public static GraphNode CreateGraphNode(IllustrationPointBase illustrationPoint, IEnumerable childNodes) + { + if (illustrationPoint == null) + { + throw new ArgumentNullException(nameof(illustrationPoint)); + } + + if (childNodes == null) + { + throw new ArgumentNullException(nameof(childNodes)); + } + + var subMechanismIllustrationPoint = illustrationPoint as SubMechanismIllustrationPoint; + if (subMechanismIllustrationPoint != null) + { + return CreateEndGraphNode(illustrationPoint.Name, + CreateGraphNodeContent(illustrationPoint.Beta)); + } + + var faultTreeIllustrationPoint = illustrationPoint as FaultTreeIllustrationPoint; + if (faultTreeIllustrationPoint != null) + { + return CreateFaultTreeGraphNode(faultTreeIllustrationPoint, + childNodes); + } + + throw new NotSupportedException($"IllustrationPointNode of type {illustrationPoint.GetType().Name} is not supported. " + + $"Supported types: {nameof(FaultTreeIllustrationPoint)} and {nameof(SubMechanismIllustrationPoint)}"); + } + + /// + /// Creates a new instance of , based on the properties of . + /// + /// The to base the + /// to create on. + /// The child graph nodes of the to create. + /// The created . + private static GraphNode CreateFaultTreeGraphNode(FaultTreeIllustrationPoint illustrationPoint, + IEnumerable childNodes) + { + string childRelationTitle = illustrationPoint.CombinationType == CombinationType.And + ? Resources.GraphNode_CombinationType_And + : Resources.GraphNode_CombinationType_Or; + GraphNode connectionGraphNode = CreateConnectingGraphNode(childRelationTitle, childNodes); + + return CreateCompositeGraphNode( + illustrationPoint.Name, + CreateGraphNodeContent(illustrationPoint.Beta), + new[] + { + connectionGraphNode + }); + } + + private static GraphNode CreateEndGraphNode(string title, string content) + { + return new GraphNode(GetGraphNodeContentXml(content, title), + new GraphNode[0], + true, + new GraphNodeStyle(GraphNodeShape.Rectangle, Color.SkyBlue, Color.Black, 1)); + } + + private static GraphNode CreateCompositeGraphNode(string title, string content, IEnumerable childNodes) + { + return new GraphNode(GetGraphNodeContentXml(content, title), + childNodes.ToArray(), + true, + new GraphNodeStyle(GraphNodeShape.Rectangle, Color.LightGray, Color.Black, 1)); + } + + private static GraphNode CreateConnectingGraphNode(string title, IEnumerable childNodes) + { + return new GraphNode(GetGraphNodeContentXml(title), + childNodes.ToArray(), + false, + new GraphNodeStyle(GraphNodeShape.None, Color.BlanchedAlmond, Color.Black, 1)); + } + + private static string GetGraphNodeContentXml(string content, string title = null) + { + var builder = new StringBuilder(); + using (XmlWriter writer = XmlWriter.Create(builder, xmlWriterSettings)) + { + writer.WriteStartDocument(); + writer.WriteStartElement(GraphNodeContentXmlDefinitions.RootElement); + + if (title != null) + { + writer.WriteElementString(GraphNodeContentXmlDefinitions.BoldElement, title); + + writer.WriteString(Environment.NewLine); + } + + writer.WriteString(content); + + writer.WriteEndElement(); + writer.WriteEndDocument(); + + writer.Flush(); + writer.Close(); + } + + return builder.ToString(); + } + + private static string CreateGraphNodeContent(RoundedDouble beta) + { + return string.Format(Resources.GraphNodeConverter_GraphNodeContent_Probability_0_Beta_1, + ProbabilityFormattingHelper.Format(StatisticsConverter.ReliabilityToProbability(beta)), + beta); + } + } +} \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerMapDataFactory.cs =================================================================== diff -u --- Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerMapDataFactory.cs (revision 0) +++ Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerMapDataFactory.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,266 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System.Drawing; +using Core.Components.Gis.Data; +using Core.Components.Gis.Style; +using Riskeer.Common.Data; +using Riskeer.Common.Data.AssessmentSection; +using Riskeer.Common.Data.Calculation; +using Riskeer.Common.Data.DikeProfiles; +using Riskeer.Common.Data.FailureMechanism; +using Riskeer.Common.Data.Hydraulics; +using Riskeer.Common.Forms.Properties; +using RiskeerCommonDataResources = Riskeer.Common.Data.Properties.Resources; +using RiskeerCommonUtilResources = Riskeer.Common.Util.Properties.Resources; + +namespace Riskeer.Common.Forms.Factories +{ + /// + /// Factory for creating for data used as input in the assessment section. + /// + public static class RiskeerMapDataFactory + { + private const int thinLineWidth = 2; + private const int thickLineWidth = 3; + private const int smallPointSize = 6; + private const int largePointSize = 15; + + /// + /// Create with default styling for a . + /// + /// The created . + public static MapLineData CreateReferenceLineMapData() + { + return new MapLineData(RiskeerCommonDataResources.ReferenceLine_DisplayName, + new LineStyle + { + Color = Color.FromArgb(0, 128, 255), + Width = thickLineWidth, + DashStyle = LineDashStyle.Solid + }) + { + SelectedMetaDataAttribute = RiskeerCommonUtilResources.MetaData_Name + }; + } + + /// + /// Create with default styling for a collection of . + /// + /// The created . + public static MapPointData CreateHydraulicBoundaryLocationsMapData() + { + Color color = Color.DarkBlue; + return new MapPointData(RiskeerCommonDataResources.HydraulicBoundaryConditions_DisplayName, + new PointStyle + { + Color = color, + Size = smallPointSize, + Symbol = PointSymbol.Circle, + StrokeColor = color, + StrokeThickness = 1 + }) + { + ShowLabels = true, + SelectedMetaDataAttribute = RiskeerCommonUtilResources.MetaData_Name + }; + } + + /// + /// Create with default styling for collections of . + /// + /// The created . + public static MapLineData CreateFailureMechanismSectionsMapData() + { + return new MapLineData(Resources.FailureMechanismSections_DisplayName, + new LineStyle + { + Color = Color.Khaki, + Width = thickLineWidth, + DashStyle = LineDashStyle.Dot + }) + { + SelectedMetaDataAttribute = RiskeerCommonUtilResources.MetaData_Name + }; + } + + /// + /// Create with default styling for the start points in collections of . + /// + /// The created . + public static MapPointData CreateFailureMechanismSectionsStartPointMapData() + { + string mapDataName = $"{Resources.FailureMechanismSections_DisplayName} ({Resources.FailureMechanismSections_StartPoints_DisplayName})"; + + Color color = Color.DarkKhaki; + return new MapPointData(mapDataName, + new PointStyle + { + Color = color, + Size = largePointSize, + Symbol = PointSymbol.Triangle, + StrokeColor = color, + StrokeThickness = 1 + }); + } + + /// + /// Create with default styling for the end points in collections of . + /// + /// The created . + public static MapPointData CreateFailureMechanismSectionsEndPointMapData() + { + string mapDataName = $"{Resources.FailureMechanismSections_DisplayName} ({Resources.FailureMechanismSections_EndPoints_DisplayName})"; + + Color color = Color.DarkKhaki; + return new MapPointData(mapDataName, + new PointStyle + { + Color = color, + Size = largePointSize, + Symbol = PointSymbol.Triangle, + StrokeColor = color, + StrokeThickness = 1 + }); + } + + /// + /// Create with default styling for collections of . + /// + /// The created . + public static MapLineData CreateDikeProfileMapData() + { + return new MapLineData(Resources.DikeProfiles_DisplayName, + new LineStyle + { + Color = Color.SaddleBrown, + Width = thinLineWidth, + DashStyle = LineDashStyle.Solid + }) + { + SelectedMetaDataAttribute = RiskeerCommonUtilResources.MetaData_Name + }; + } + + /// + /// Create with default styling for collections of . + /// + /// The created . + public static MapLineData CreateForeshoreProfileMapData() + { + return new MapLineData(Resources.ForeshoreProfiles_DisplayName, + new LineStyle + { + Color = Color.DarkOrange, + Width = thinLineWidth, + DashStyle = LineDashStyle.Solid + }) + { + SelectedMetaDataAttribute = RiskeerCommonUtilResources.MetaData_Name + }; + } + + /// + /// Create with default styling for collections of . + /// + /// The created . + public static MapPointData CreateStructuresMapData() + { + Color color = Color.DarkSeaGreen; + return new MapPointData(Resources.StructuresCollection_DisplayName, + new PointStyle + { + Color = color, + Size = largePointSize, + Symbol = PointSymbol.Square, + StrokeColor = color, + StrokeThickness = 1 + }) + { + SelectedMetaDataAttribute = RiskeerCommonUtilResources.MetaData_Name + }; + } + + /// + /// Create with default styling for collections of . + /// + /// The created . + public static MapLineData CreateCalculationsMapData() + { + return new MapLineData(RiskeerCommonDataResources.FailureMechanism_Calculations_DisplayName, + new LineStyle + { + Color = Color.MediumPurple, + Width = thinLineWidth, + DashStyle = LineDashStyle.Dash + }) + { + ShowLabels = true, + SelectedMetaDataAttribute = RiskeerCommonUtilResources.MetaData_Name + }; + } + + /// + /// Create with default styling for collections of . + /// + /// The created . + public static MapLineData CreateSurfaceLinesMapData() + { + return new MapLineData(RiskeerCommonDataResources.SurfaceLineCollection_TypeDescriptor, + new LineStyle + { + Color = Color.DarkSeaGreen, + Width = 2, + DashStyle = LineDashStyle.Solid + }) + { + SelectedMetaDataAttribute = RiskeerCommonUtilResources.MetaData_Name + }; + } + + /// + /// Create with default styling for collections of . + /// + /// The created . + public static MapLineData CreateStochasticSoilModelsMapData() + { + return new MapLineData(RiskeerCommonDataResources.StochasticSoilModelCollection_TypeDescriptor, + new LineStyle + { + Color = Color.FromArgb(70, Color.SaddleBrown), + Width = 5, + DashStyle = LineDashStyle.Solid + }) + { + SelectedMetaDataAttribute = RiskeerCommonUtilResources.MetaData_Name + }; + } + + /// + /// Create a for sections. + /// + /// The created . + public static MapDataCollection CreateSectionsMapDataCollection() + { + return new MapDataCollection(Resources.FailureMechanismSections_DisplayName); + } + } +} \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerMapDataFeaturesFactory.cs =================================================================== diff -u --- Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerMapDataFeaturesFactory.cs (revision 0) +++ Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerMapDataFeaturesFactory.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,373 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using System.Collections.Generic; +using System.Linq; +using Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using Core.Common.Geometry; +using Core.Components.Gis.Data; +using Core.Components.Gis.Features; +using Core.Components.Gis.Geometries; +using Riskeer.Common.Data; +using Riskeer.Common.Data.AssessmentSection; +using Riskeer.Common.Data.DikeProfiles; +using Riskeer.Common.Data.FailureMechanism; +using Riskeer.Common.Data.Structures; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.Common.Forms.Properties; +using Riskeer.Common.Util; +using RiskeerCommonUtilResources = Riskeer.Common.Util.Properties.Resources; + +namespace Riskeer.Common.Forms.Factories +{ + /// + /// Factory for creating collections of to use in + /// (created via ). + /// + public static class RiskeerMapDataFeaturesFactory + { + /// + /// Create a single representing a single line. + /// + /// The world map points describing the line. + /// The created map feature. + /// Thrown when + /// is null. + public static MapFeature CreateSingleLineMapFeature(IEnumerable points) + { + if (points == null) + { + throw new ArgumentNullException(nameof(points)); + } + + return new MapFeature(new[] + { + new MapGeometry(new[] + { + points + }) + }); + } + + /// + /// Create reference line features based on the provided . + /// + /// The to create the reference + /// line features for. + /// The id of the . + /// The name of the . + /// A collection of features or an empty collection when + /// has no geometry. + /// Thrown when + /// is null. + public static IEnumerable CreateReferenceLineFeatures(ReferenceLine referenceLine, string id, string name) + { + if (referenceLine == null) + { + throw new ArgumentNullException(nameof(referenceLine)); + } + + if (referenceLine.Points.Any()) + { + MapFeature feature = CreateSingleLineMapFeature(referenceLine.Points); + feature.MetaData[RiskeerCommonUtilResources.MetaData_ID] = id; + feature.MetaData[RiskeerCommonUtilResources.MetaData_Name] = name; + feature.MetaData[Resources.MetaData_Length_Rounded] = new RoundedDouble(2, referenceLine.Length); + + return new[] + { + feature + }; + } + + return new MapFeature[0]; + } + + /// + /// Create hydraulic boundary location features based on the provided . + /// + /// The to create the location features for. + /// A collection of features. + /// Thrown when is null. + public static IEnumerable CreateHydraulicBoundaryLocationFeatures(IAssessmentSection assessmentSection) + { + if (assessmentSection == null) + { + throw new ArgumentNullException(nameof(assessmentSection)); + } + + return AggregatedHydraulicBoundaryLocationFactory.CreateAggregatedHydraulicBoundaryLocations(assessmentSection) + .Select(HydraulicBoundaryLocationMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeature) + .ToArray(); + } + + /// + /// Create section features based on the provided . + /// + /// The collection of to create + /// the section features for. + /// A collection of features or an empty collection when is + /// null or empty. + public static IEnumerable CreateFailureMechanismSectionFeatures(IEnumerable sections) + { + return sections?.Select(CreateFailureMechanismSectionMapFeature).ToArray() ?? new MapFeature[0]; + } + + /// + /// Create section start point features based on the provided . + /// + /// The collection of to create + /// the section start point features for. + /// A collection of features or an empty collection when is + /// null or empty. + public static IEnumerable CreateFailureMechanismSectionStartPointFeatures(IEnumerable sections) + { + return sections != null && sections.Any() + ? new[] + { + CreateSingleLineMapFeature(sections.Select(sl => sl.StartPoint)) + } + : new MapFeature[0]; + } + + /// + /// Create section end point features based on the provided . + /// + /// The collection of to create + /// the section end point features for. + /// A collection of features or an empty collection when is + /// null or empty. + public static IEnumerable CreateFailureMechanismSectionEndPointFeatures(IEnumerable sections) + { + return sections != null && sections.Any() + ? new[] + { + CreateSingleLineMapFeature(sections.Select(sl => sl.EndPoint)) + } + : new MapFeature[0]; + } + + /// + /// Create features for the geometry of the . + /// + /// The profiles to create features for. + /// A collection of features or an empty collection when is + /// null or empty. + public static IEnumerable CreateDikeProfilesFeatures(IEnumerable dikeProfiles) + { + if (dikeProfiles != null) + { + int nrOfElements = dikeProfiles.Count(); + var mapFeatures = new MapFeature[nrOfElements]; + + var i = 0; + foreach (DikeProfile dikeProfile in dikeProfiles) + { + MapFeature feature = CreateSingleLineMapFeature(GetWorldPoints(dikeProfile)); + feature.MetaData[RiskeerCommonUtilResources.MetaData_Name] = dikeProfile.Name; + + mapFeatures[i] = feature; + i++; + } + + return mapFeatures; + } + + return new MapFeature[0]; + } + + /// + /// Create features for the geometry of the . + /// + /// The profiles to create features for. + /// A collection of features or an empty collection when + /// is null or empty. + public static IEnumerable CreateForeshoreProfilesFeatures(IEnumerable foreshoreProfiles) + { + if (foreshoreProfiles != null) + { + ForeshoreProfile[] foreShoreProfilesWithGeometry = foreshoreProfiles.Where(fp => fp.Geometry != null && fp.Geometry.Any()).ToArray(); + + int nrOfElements = foreShoreProfilesWithGeometry.Length; + var mapFeatures = new MapFeature[nrOfElements]; + + for (var i = 0; i < nrOfElements; i++) + { + ForeshoreProfile foreshoreProfile = foreShoreProfilesWithGeometry[i]; + MapFeature feature = CreateSingleLineMapFeature(GetWorldPoints(foreshoreProfile)); + feature.MetaData[RiskeerCommonUtilResources.MetaData_Name] = foreshoreProfile.Name; + + mapFeatures[i] = feature; + } + + return mapFeatures; + } + + return new MapFeature[0]; + } + + /// + /// Create features for the geometry of the . + /// + /// The profiles to create features for. + /// A collection of features or an empty collection when is + /// null or empty. + public static IEnumerable CreateStructuresFeatures(IEnumerable structures) + { + if (structures != null) + { + int nrOfElements = structures.Count(); + var mapFeatures = new MapFeature[nrOfElements]; + + var i = 0; + foreach (StructureBase structure in structures) + { + MapFeature feature = RingtoetsMapDataFeaturesFactoryHelper.CreateSinglePointMapFeature(structure.Location); + feature.MetaData[RiskeerCommonUtilResources.MetaData_Name] = structure.Name; + + mapFeatures[i] = feature; + i++; + } + + return mapFeatures; + } + + return new MapFeature[0]; + } + + /// + /// Create calculation features based on the provided . + /// + /// The type of the . + /// The type of the . + /// The collection of to create the + /// calculation features for. + /// A collection of features or an empty collection when is null + /// or empty. + public static IEnumerable CreateStructureCalculationsFeatures( + IEnumerable> calculations) + where TStructuresInput : StructuresInputBase, new() + where TStructure : StructureBase + { + if (calculations != null && calculations.Any()) + { + MapCalculationData[] calculationData = calculations.Where(CalculationHasStructureAndHydraulicBoundaryLocation) + .Select(CreateMapCalculationData).ToArray(); + + return CreateCalculationFeatures(calculationData); + } + + return new MapFeature[0]; + } + + /// + /// Create calculation features based on the provided . + /// + /// The collection of to create the + /// calculation features for. + /// A collection of features or an empty collection when is null + /// or empty. + public static IEnumerable CreateCalculationFeatures(IEnumerable calculationData) + { + if (calculationData != null && calculationData.Any()) + { + var features = new MapFeature[calculationData.Count()]; + + for (var i = 0; i < calculationData.Count(); i++) + { + MapCalculationData calculationItem = calculationData.ElementAt(i); + MapFeature feature = CreateSingleLineMapFeature(new[] + { + calculationItem.CalculationLocation, + calculationItem.HydraulicBoundaryLocation.Location + }); + + feature.MetaData[RiskeerCommonUtilResources.MetaData_Name] = calculationItem.Name; + feature.MetaData[Resources.MetaData_Couple_distance] = + calculationItem.CalculationLocation.GetEuclideanDistanceTo( + calculationItem.HydraulicBoundaryLocation.Location); + + features[i] = feature; + } + + return features; + } + + return new MapFeature[0]; + } + + private static MapCalculationData CreateMapCalculationData( + StructuresCalculation calculation) + where TStructuresInput : StructuresInputBase, new() + where TStructure : StructureBase + { + return new MapCalculationData( + calculation.Name, + calculation.InputParameters.Structure.Location, + calculation.InputParameters.HydraulicBoundaryLocation); + } + + private static bool CalculationHasStructureAndHydraulicBoundaryLocation( + StructuresCalculation calculation) + where TStructuresInput : StructuresInputBase, new() + where TStructure : StructureBase + { + return calculation.InputParameters.Structure != null && + calculation.InputParameters.HydraulicBoundaryLocation != null; + } + + private static MapFeature CreateFailureMechanismSectionMapFeature(FailureMechanismSection section) + { + var feature = new MapFeature(new[] + { + new MapGeometry(new[] + { + section.Points.Select(p => new Point2D(p)).ToArray() + }) + }); + + feature.MetaData[RiskeerCommonUtilResources.MetaData_Name] = section.Name; + feature.MetaData[Resources.MetaData_Length_Rounded] = new RoundedDouble(2, section.Length); + + return feature; + } + + private static IEnumerable GetWorldPoints(DikeProfile dikeProfile) + { + return AdvancedMath2D.FromXToXY( + dikeProfile.DikeGeometry.Select(p => -p.Point.X), + dikeProfile.WorldReferencePoint, + -dikeProfile.X0, + dikeProfile.Orientation); + } + + private static IEnumerable GetWorldPoints(ForeshoreProfile foreshoreProfile) + { + return AdvancedMath2D.FromXToXY( + foreshoreProfile.Geometry.Select(p => -p.X), + foreshoreProfile.WorldReferencePoint, + -foreshoreProfile.X0, + foreshoreProfile.Orientation); + } + } +} \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerStackChartDataFactory.cs =================================================================== diff -u --- Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerStackChartDataFactory.cs (revision 0) +++ Riskeer/Common/src/Riskeer.Common.Forms/Factories/RiskeerStackChartDataFactory.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,199 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using Core.Common.Base.Data; +using Core.Common.Util.Extensions; +using Core.Components.Stack.Data; +using Riskeer.Common.Forms.Properties; +using Riskeer.Common.Forms.Views; + +namespace Riskeer.Common.Forms.Factories +{ + /// + /// Factory for creating based on information used as input. + /// + public static class RiskeerStackChartDataFactory + { + private const double minAlphaSquared = 0.01; + + /// + /// Creates a new . + /// + /// The created . + public static StackChartData Create() + { + return new StackChartData(); + } + + /// + /// Creates the columns for the given . + /// + /// The data to create the columns from. + /// The stack chart data to create the columns for. + /// Thrown when any parameter is null. + public static void CreateColumns(IEnumerable illustrationPointControlItems, + StackChartData stackChartData) + { + if (illustrationPointControlItems == null) + { + throw new ArgumentNullException(nameof(illustrationPointControlItems)); + } + + if (stackChartData == null) + { + throw new ArgumentNullException(nameof(stackChartData)); + } + + IEnumerable> labels = + illustrationPointControlItems.Select(controlItem => Tuple.Create(controlItem.WindDirectionName, + controlItem.ClosingSituation)).ToArray(); + + bool showClosingSituation = illustrationPointControlItems.HasMultipleUniqueValues(item => item.ClosingSituation); + + foreach (Tuple label in labels) + { + string columnName = label.Item1; + + if (showClosingSituation) + { + columnName = string.Format(Resources.RiskeerStackChartDataFactory_CreateColumns_WindDirection_0_ClosingSituation_1, + columnName, + label.Item2); + } + + stackChartData.AddColumn(columnName); + } + } + + /// + /// Creates the rows for the given . + /// + /// The data to create the rows from. + /// The stack chart data to create the rows for. + /// Thrown when any parameter is null. + public static void CreateRows(IEnumerable illustrationPointControlItems, StackChartData stackChartData) + { + if (illustrationPointControlItems == null) + { + throw new ArgumentNullException(nameof(illustrationPointControlItems)); + } + + if (stackChartData == null) + { + throw new ArgumentNullException(nameof(stackChartData)); + } + + var stochastValues = new List>(); + + foreach (IllustrationPointControlItem illustrationPointControlItem in illustrationPointControlItems) + { + stochastValues.AddRange(GetStochastValues(illustrationPointControlItem)); + } + + IDictionary> stochasts = CreateStochastsLookup(stochastValues); + + CreateRowsForStochasts(stackChartData, stochasts); + } + + private static IEnumerable> GetStochastValues(IllustrationPointControlItem illustrationPointControlItem) + { + return illustrationPointControlItem.Stochasts + .Select(stochast => Tuple.Create(stochast.Name, + new RoundedDouble(5, Math.Pow(stochast.Alpha, 2)))) + .ToArray(); + } + + private static IDictionary> CreateStochastsLookup(IEnumerable> stochastValues) + { + var lookup = new Dictionary>(); + + foreach (Tuple stochastValue in stochastValues) + { + if (!lookup.ContainsKey(stochastValue.Item1)) + { + lookup.Add(stochastValue.Item1, new List()); + } + + lookup[stochastValue.Item1].Add(stochastValue.Item2); + } + + return lookup; + } + + private static void CreateRowsForStochasts(StackChartData stackChartData, IDictionary> stochasts) + { + IDictionary> significantStochasts = new Dictionary>(); + IDictionary> remainingStochasts = new Dictionary>(); + + foreach (KeyValuePair> stochast in stochasts) + { + if (StochastIsSignificant(stochast)) + { + significantStochasts.Add(stochast); + } + else + { + remainingStochasts.Add(stochast); + } + } + + foreach (KeyValuePair> significantStochast in significantStochasts) + { + stackChartData.AddRow(significantStochast.Key, significantStochast.Value.Select(v => v.Value).ToArray()); + } + + if (remainingStochasts.Any()) + { + stackChartData.AddRow(Resources.RiskeerStackChartDataFactory_RemainingRow_DisplayName, + GetValuesForRemainingRow(remainingStochasts), + Color.Gray); + } + } + + private static bool StochastIsSignificant(KeyValuePair> stochast) + { + return stochast.Value.Any(v => v > minAlphaSquared); + } + + private static double[] GetValuesForRemainingRow(IDictionary> stochasts) + { + var values = new double[stochasts.First().Value.Count]; + var index = 0; + + foreach (KeyValuePair> stochast in stochasts) + { + foreach (double value in stochast.Value) + { + values[index] += value; + index++; + } + + index = 0; + } + + return values; + } + } +} \ No newline at end of file Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/src/Riskeer.Common.Forms/ImportInfos/RingtoetsImportInfoFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Common/src/Riskeer.Common.Forms/ImportInfos/RiskeerImportInfoFactory.cs =================================================================== diff -u --- Riskeer/Common/src/Riskeer.Common.Forms/ImportInfos/RiskeerImportInfoFactory.cs (revision 0) +++ Riskeer/Common/src/Riskeer.Common.Forms/ImportInfos/RiskeerImportInfoFactory.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,62 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using Core.Common.Base.IO; +using Core.Common.Gui.Plugin; +using Core.Common.Util; +using Riskeer.Common.Data.Calculation; +using Riskeer.Common.Data.FailureMechanism; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.Common.Forms.Properties; + +namespace Riskeer.Common.Forms.ImportInfos +{ + /// + /// Factory for creating standard objects. + /// + public static class RiskeerImportInfoFactory + { + /// + /// Creates a object for a calculation configuration + /// of the type . + /// + /// The type of calculation group context + /// to create the for. + /// The function to create the relevant importer. + /// An object. + public static ImportInfo CreateCalculationConfigurationImportInfo( + Func createFileImporter) + where TCalculationGroupContext : ICalculationContext + { + return new ImportInfo + { + Name = Resources.DataTypeDisplayName_xml_file_filter_Description, + Category = Resources.Riskeer_Category, + Image = Resources.GeneralFolderIcon, + FileFilterGenerator = new FileFilterGenerator(Resources.DataTypeDisplayName_xml_file_filter_Extension, + Resources.DataTypeDisplayName_xml_file_filter_Description), + IsEnabled = context => true, + CreateFileImporter = createFileImporter + }; + } + } +} \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -1101,7 +1101,7 @@ } /// - /// Looks up a localized string similar to Ringtoets berekeningenconfiguratie. + /// Looks up a localized string similar to Riskeer berekeningenconfiguratie. /// public static string DataTypeDisplayName_xml_file_filter_Description { get { @@ -2894,15 +2894,6 @@ } /// - /// Looks up a localized string similar to Algemeen. - /// - public static string Ringtoets_Category { - get { - return ResourceManager.GetString("Ringtoets_Category", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Kopie van {0}. /// public static string RingtoetsContextMenuItemFactory_CreateDuplicateCalculationItem_Copy_of_item_with_name_0 { @@ -2922,20 +2913,29 @@ } /// + /// Looks up a localized string similar to Algemeen. + /// + public static string Riskeer_Category { + get { + return ResourceManager.GetString("Riskeer_Category", resourceCulture); + } + } + + /// /// Looks up a localized string similar to {0} ({1}). /// - public static string RingtoetsStackChartDataFactory_CreateColumns_WindDirection_0_ClosingSituation_1 { + public static string RiskeerStackChartDataFactory_CreateColumns_WindDirection_0_ClosingSituation_1 { get { - return ResourceManager.GetString("RingtoetsStackChartDataFactory_CreateColumns_WindDirection_0_ClosingSituation_1", resourceCulture); + return ResourceManager.GetString("RiskeerStackChartDataFactory_CreateColumns_WindDirection_0_ClosingSituation_1", resourceCulture); } } /// /// Looks up a localized string similar to Overig. /// - public static string RingtoetsStackChartDataFactory_RemainingRow_DisplayName { + public static string RiskeerStackChartDataFactory_RemainingRow_DisplayName { get { - return ResourceManager.GetString("RingtoetsStackChartDataFactory_RemainingRow_DisplayName", resourceCulture); + return ResourceManager.GetString("RiskeerStackChartDataFactory_RemainingRow_DisplayName", resourceCulture); } } Index: Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.resx =================================================================== diff -u -rbf1fde9d2147a6eeaecebbb371be2c4856759159 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision bf1fde9d2147a6eeaecebbb371be2c4856759159) +++ Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -117,7 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + Algemeen @@ -958,7 +958,7 @@ xml - Ringtoets berekeningenconfiguratie + Riskeer berekeningenconfiguratie Ringtoets berekeningenconfiguratie @@ -1063,10 +1063,10 @@ Windrichting - + Overig - + {0} ({1}) Index: Riskeer/Common/src/Riskeer.Common.Forms/Riskeer.Common.Forms.csproj =================================================================== diff -u -r9bba38e3ebe3fe261e7c97c338b016681e07c140 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Common/src/Riskeer.Common.Forms/Riskeer.Common.Forms.csproj (.../Riskeer.Common.Forms.csproj) (revision 9bba38e3ebe3fe261e7c97c338b016681e07c140) +++ Riskeer/Common/src/Riskeer.Common.Forms/Riskeer.Common.Forms.csproj (.../Riskeer.Common.Forms.csproj) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -48,8 +48,8 @@ - - + + @@ -60,7 +60,7 @@ - + @@ -145,7 +145,7 @@ - + @@ -175,7 +175,7 @@ - + UserControl @@ -235,14 +235,14 @@ HydraulicBoundaryCalculationsView.cs - + UserControl RingtoetsMapControl.cs - + @@ -260,7 +260,7 @@ FailureMechanismResultView.cs - + UserControl Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/src/Riskeer.Common.Forms/UpdateInfos/RingtoetsUpdateInfoFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Common/src/Riskeer.Common.Forms/UpdateInfos/RiskeerUpdateInfoFactory.cs =================================================================== diff -u --- Riskeer/Common/src/Riskeer.Common.Forms/UpdateInfos/RiskeerUpdateInfoFactory.cs (revision 0) +++ Riskeer/Common/src/Riskeer.Common.Forms/UpdateInfos/RiskeerUpdateInfoFactory.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,83 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using Core.Common.Gui.Plugin; +using Core.Common.Util; +using Riskeer.Common.Data.FailureMechanism; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.Common.Forms.Properties; +using Riskeer.Common.IO.FileImporters; +using Riskeer.Common.IO.FileImporters.MessageProviders; +using RiskeerCommonIOResources = Riskeer.Common.IO.Properties.Resources; + +namespace Riskeer.Common.Forms.UpdateInfos +{ + /// + /// Factory for creating standard objects. + /// + public static class RiskeerUpdateInfoFactory + { + /// + /// Creates a object for a . + /// + /// The type of the failure mechanism sections context + /// to create the for. + /// The type of the failure mechanism to create + /// the for. + /// The type of the failure mechanism section result + /// to create the for. + /// The + /// to use for the created . + /// An object. + /// Thrown when + /// is null. + public static UpdateInfo CreateFailureMechanismSectionsUpdateInfo( + IFailureMechanismSectionResultUpdateStrategy sectionResultUpdateStrategy) + where TSectionContext : FailureMechanismSectionsContext + where TFailureMechanism : IHasSectionResults + where TSectionResult : FailureMechanismSectionResult + { + if (sectionResultUpdateStrategy == null) + { + throw new ArgumentNullException(nameof(sectionResultUpdateStrategy)); + } + + return new UpdateInfo + { + Name = Resources.FailureMechanismSections_DisplayName, + Category = Resources.Riskeer_Category, + Image = Resources.SectionsIcon, + FileFilterGenerator = new FileFilterGenerator(RiskeerCommonIOResources.Shape_file_filter_Extension, + RiskeerCommonIOResources.Shape_file_filter_Description), + IsEnabled = context => context.WrappedData.FailureMechanismSectionSourcePath != null, + CurrentPath = context => context.WrappedData.FailureMechanismSectionSourcePath, + CreateFileImporter = (context, filePath) => new FailureMechanismSectionsImporter( + context.WrappedData, + context.AssessmentSection.ReferenceLine, + filePath, + new FailureMechanismSectionUpdateStrategy((TFailureMechanism) context.WrappedData, + sectionResultUpdateStrategy), + new UpdateMessageProvider()) + }; + } + } +} \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/Views/IllustrationPointsChartControl.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Common/src/Riskeer.Common.Forms/Views/IllustrationPointsChartControl.cs (.../IllustrationPointsChartControl.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/Views/IllustrationPointsChartControl.cs (.../IllustrationPointsChartControl.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -41,7 +41,7 @@ { InitializeComponent(); - chartData = RingtoetsStackChartDataFactory.Create(); + chartData = RiskeerStackChartDataFactory.Create(); stackChartControl.Data = chartData; } @@ -74,8 +74,8 @@ private void SetChartData() { - RingtoetsStackChartDataFactory.CreateColumns(data, chartData); - RingtoetsStackChartDataFactory.CreateRows(data, chartData); + RiskeerStackChartDataFactory.CreateColumns(data, chartData); + RiskeerStackChartDataFactory.CreateRows(data, chartData); } } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/Views/IllustrationPointsFaultTreeControl.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Common/src/Riskeer.Common.Forms/Views/IllustrationPointsFaultTreeControl.cs (.../IllustrationPointsFaultTreeControl.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/Views/IllustrationPointsFaultTreeControl.cs (.../IllustrationPointsFaultTreeControl.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -92,7 +92,7 @@ { GraphNode[] childNodes = node.Children.Select(RegisterNode).ToArray(); - GraphNode graphNode = RingtoetsGraphNodeFactory.CreateGraphNode(node.Data, childNodes); + GraphNode graphNode = RiskeerGraphNodeFactory.CreateGraphNode(node.Data, childNodes); drawnNodes.Add(new DrawnIllustrationPointNode { IllustrationPointNode = node, Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/test/Riskeer.Common.Forms.Test/ExportInfos/RingtoetsExportInfoFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/ExportInfos/RiskeerExportInfoFactoryTest.cs =================================================================== diff -u --- Riskeer/Common/test/Riskeer.Common.Forms.Test/ExportInfos/RiskeerExportInfoFactoryTest.cs (revision 0) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/ExportInfos/RiskeerExportInfoFactoryTest.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,95 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using Core.Common.Base.IO; +using Core.Common.Gui.Plugin; +using Core.Common.TestUtil; +using Core.Common.Util; +using NUnit.Framework; +using Rhino.Mocks; +using Riskeer.Common.Data.Calculation; +using Riskeer.Common.Data.FailureMechanism; +using Riskeer.Common.Forms.ExportInfos; +using Riskeer.Common.Forms.PresentationObjects; +using CoreCommonGuiResources = Core.Common.Gui.Properties.Resources; + +namespace Riskeer.Common.Forms.Test.ExportInfos +{ + [TestFixture] + public class RiskeerExportInfoFactoryTest + { + [Test] + public void CreateCalculationConfigurationExportInfo_WithArguments_ExpectedPropertiesSet() + { + // Setup + var mocks = new MockRepository(); + var fileImporter = mocks.Stub(); + mocks.ReplayAll(); + + Func, string, IFileExporter> createFileExporter = (context, s) => fileImporter; + + // Call + ExportInfo> exportInfo = + RiskeerExportInfoFactory.CreateCalculationConfigurationExportInfo(createFileExporter); + + // Assert + Assert.AreSame(createFileExporter, exportInfo.CreateFileExporter); + Assert.AreEqual("Riskeer berekeningenconfiguratie", exportInfo.Name); + Assert.AreEqual("Algemeen", exportInfo.Category); + + FileFilterGenerator fileFilterGenerator = exportInfo.FileFilterGenerator; + Assert.AreEqual("Riskeer berekeningenconfiguratie (*.xml)|*.xml", fileFilterGenerator.Filter); + + TestHelper.AssertImagesAreEqual(CoreCommonGuiResources.ExportIcon, exportInfo.Image); + Assert.IsTrue(exportInfo.IsEnabled(null)); + + mocks.VerifyAll(); + } + + [Test] + public void CreateCalculationGroupConfigurationExportInfo_WithArguments_ExpectedPropertiesSet() + { + // Setup + var mocks = new MockRepository(); + var fileImporter = mocks.Stub(); + mocks.ReplayAll(); + + Func, bool> isEnabled = context => false; + Func, string, IFileExporter> createFileExporter = (context, s) => fileImporter; + + // Call + ExportInfo> exportInfo = + RiskeerExportInfoFactory.CreateCalculationGroupConfigurationExportInfo(createFileExporter, isEnabled); + + // Assert + Assert.AreSame(isEnabled, exportInfo.IsEnabled); + Assert.AreSame(createFileExporter, exportInfo.CreateFileExporter); + Assert.AreEqual("Riskeer berekeningenconfiguratie", exportInfo.Name); + Assert.AreEqual("Algemeen", exportInfo.Category); + + FileFilterGenerator fileFilterGenerator = exportInfo.FileFilterGenerator; + Assert.AreEqual("Riskeer berekeningenconfiguratie (*.xml)|*.xml", fileFilterGenerator.Filter); + + TestHelper.AssertImagesAreEqual(CoreCommonGuiResources.ExportIcon, exportInfo.Image); + } + } +} \ No newline at end of file Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RingtoetsChartDataFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RingtoetsGraphNodeFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RingtoetsMapDataFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RingtoetsMapDataFeaturesFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RingtoetsStackChartDataFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerChartDataFactoryTest.cs =================================================================== diff -u --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerChartDataFactoryTest.cs (revision 0) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerChartDataFactoryTest.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,158 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System.Drawing; +using Core.Components.Chart.Data; +using Core.Components.Chart.Styles; +using NUnit.Framework; +using Riskeer.Common.Forms.Factories; + +namespace Riskeer.Common.Forms.Test.Factories +{ + [TestFixture] + public class RiskeerChartDataFactoryTest + { + [Test] + public void CreateForeshoreGeometryChartData_ReturnsChartDataWithExpectedStyling() + { + // Call + ChartLineData data = RiskeerChartDataFactory.CreateForeshoreGeometryChartData(); + + // Assert + CollectionAssert.IsEmpty(data.Points); + Assert.AreEqual("Voorlandprofiel", data.Name); + AssertEqualStyle(data.Style, Color.DarkOrange, 2, ChartLineDashStyle.Solid); + } + + [Test] + public void CreateSurfaceLineChartData_ReturnsChartLineDataWithExpectedStyling() + { + // Call + ChartLineData data = RiskeerChartDataFactory.CreateSurfaceLineChartData(); + + // Assert + CollectionAssert.IsEmpty(data.Points); + Assert.AreEqual("Profielschematisatie", data.Name); + AssertEqualStyle(data.Style, Color.Sienna, 2, ChartLineDashStyle.Solid); + } + + [Test] + public void CreateSoilProfileChartData_ReturnsEmptyChartDataCollection() + { + // Call + ChartDataCollection data = RiskeerChartDataFactory.CreateSoilProfileChartData(); + + // Assert + CollectionAssert.IsEmpty(data.Collection); + Assert.AreEqual("Ondergrondschematisatie", data.Name); + } + + [Test] + public void CreateDitchPolderSideChartData_ReturnsChartPointDataWithExpectedStyling() + { + // Call + ChartPointData data = RiskeerChartDataFactory.CreateDitchPolderSideChartData(); + + // Assert + Assert.IsFalse(data.HasData); + Assert.AreEqual("Insteek sloot polderzijde", data.Name); + AssertEqualStyle(data.Style, Color.IndianRed, 8, Color.Transparent, 0, ChartPointSymbol.Circle); + } + + [Test] + public void CreateBottomDitchPolderSideChartData_ReturnsChartPointDataWithExpectedStyling() + { + // Call + ChartPointData data = RiskeerChartDataFactory.CreateBottomDitchPolderSideChartData(); + + // Assert + Assert.IsFalse(data.HasData); + Assert.AreEqual("Slootbodem polderzijde", data.Name); + AssertEqualStyle(data.Style, Color.Teal, 8, Color.Transparent, 0, ChartPointSymbol.Circle); + } + + [Test] + public void CreateBottomDitchDikeSideChartData_ReturnsChartPointDataWithExpectedStyling() + { + // Call + ChartPointData data = RiskeerChartDataFactory.CreateBottomDitchDikeSideChartData(); + + // Assert + Assert.IsFalse(data.HasData); + Assert.AreEqual("Slootbodem dijkzijde", data.Name); + AssertEqualStyle(data.Style, Color.DarkSeaGreen, 8, Color.Transparent, 0, ChartPointSymbol.Circle); + } + + [Test] + public void CreateDitchDikeSideChartData_ReturnsChartPointDataWithExpectedStyling() + { + // Call + ChartPointData data = RiskeerChartDataFactory.CreateDitchDikeSideChartData(); + + // Assert + Assert.IsFalse(data.HasData); + Assert.AreEqual("Insteek sloot dijkzijde", data.Name); + AssertEqualStyle(data.Style, Color.MediumPurple, 8, Color.Transparent, 0, ChartPointSymbol.Circle); + } + + [Test] + public void CreateDikeToeAtPolderChartData_ReturnsChartPointDataWithExpectedStyling() + { + // Call + ChartPointData data = RiskeerChartDataFactory.CreateDikeToeAtPolderChartData(); + + // Assert + Assert.IsFalse(data.HasData); + Assert.AreEqual("Teen dijk binnenwaarts", data.Name); + AssertEqualStyle(data.Style, Color.LightGray, 8, Color.Black, 1, ChartPointSymbol.Square); + } + + [Test] + public void CreateDikeToeAtRiverChartData_ReturnsChartPointDataWithExpectedStyling() + { + // Call + ChartPointData data = RiskeerChartDataFactory.CreateDikeToeAtRiverChartData(); + + // Assert + Assert.IsFalse(data.HasData); + Assert.AreEqual("Teen dijk buitenwaarts", data.Name); + AssertEqualStyle(data.Style, Color.DarkGray, 8, Color.Black, 1, ChartPointSymbol.Square); + } + + private static void AssertEqualStyle(ChartPointStyle pointStyle, Color fillColor, int size, Color strokeColor, int strokeThickness, ChartPointSymbol symbol) + { + Assert.AreEqual(fillColor, pointStyle.Color); + Assert.AreEqual(size, pointStyle.Size); + Assert.AreEqual(strokeColor, pointStyle.StrokeColor); + Assert.AreEqual(strokeThickness, pointStyle.StrokeThickness); + Assert.AreEqual(symbol, pointStyle.Symbol); + Assert.IsTrue(pointStyle.IsEditable); + } + + private static void AssertEqualStyle(ChartLineStyle lineStyle, Color color, int width, ChartLineDashStyle style) + { + Assert.AreEqual(color, lineStyle.Color); + Assert.AreEqual(width, lineStyle.Width); + Assert.AreEqual(style, lineStyle.DashStyle); + Assert.IsTrue(lineStyle.IsEditable); + } + } +} \ No newline at end of file Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerGraphNodeFactoryTest.cs =================================================================== diff -u --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerGraphNodeFactoryTest.cs (revision 0) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerGraphNodeFactoryTest.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,235 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using Core.Common.Base.Data; +using Core.Common.TestUtil; +using Core.Common.Util; +using Core.Components.PointedTree.Data; +using NUnit.Framework; +using Riskeer.Common.Data.IllustrationPoints; +using Riskeer.Common.Data.TestUtil.IllustrationPoints; +using Riskeer.Common.Forms.Factories; +using Riskeer.Common.Forms.Helpers; + +namespace Riskeer.Common.Forms.Test.Factories +{ + [TestFixture] + public class RiskeerGraphNodeFactoryTest + { + [Test] + public void CreateGraphNode_IllustrationPointNull_ThrowsArgumentNullException() + { + // Call + TestDelegate test = () => RiskeerGraphNodeFactory.CreateGraphNode(null, Enumerable.Empty()); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("illustrationPoint", exception.ParamName); + } + + [Test] + public void CreateGraphNode_WithSubMechanismIllustrationPointButChildrenNull_ThrowsArgumentNullException() + { + // Setup + var illustrationPoint = new SubMechanismIllustrationPoint( + "Illustration Point", + new Random(31).NextRoundedDouble(), + Enumerable.Empty(), + Enumerable.Empty()); + + // Call + TestDelegate test = () => RiskeerGraphNodeFactory.CreateGraphNode(illustrationPoint, null); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("childNodes", exception.ParamName); + } + + [Test] + public void CreateGraphNode_WithSubMechanismIllustrationPointEmptyChildren_ReturnsGraphNodeWithExpectedStyling() + { + // Setup + var illustrationPoint = new SubMechanismIllustrationPoint( + "Illustration Point", + new Random(31).NextRoundedDouble(), + Enumerable.Empty(), + Enumerable.Empty()); + + // Call + GraphNode graphNode = RiskeerGraphNodeFactory.CreateGraphNode(illustrationPoint, new[] + { + CreateTestGraphNode() + }); + + // Assert + Assert.AreEqual(CreateExpectedGraphNodeContent(illustrationPoint.Name, illustrationPoint.Beta), graphNode.Content); + Assert.IsTrue(graphNode.IsSelectable); + CollectionAssert.IsEmpty(graphNode.ChildNodes); + + var expectedStyle = new GraphNodeStyle(GraphNodeShape.Rectangle, Color.SkyBlue, Color.Black, 1); + AssertEqualStyle(expectedStyle, graphNode.Style); + } + + [Test] + public void CreateGraphNode_FaultTreeIllustrationPointNodeDataWithoutChildren_ReturnsExpected() + { + // Setup + var random = new Random(31); + var illustrationPoint = new FaultTreeIllustrationPoint( + "Illustration Point", + random.NextRoundedDouble(), + Enumerable.Empty(), + random.NextEnumValue()); + + // Call + GraphNode graphNode = RiskeerGraphNodeFactory.CreateGraphNode(illustrationPoint, + Enumerable.Empty()); + + // Assert + Assert.AreEqual(CreateExpectedGraphNodeContent(illustrationPoint.Name, illustrationPoint.Beta), graphNode.Content); + Assert.IsTrue(graphNode.IsSelectable); + + var expectedStyle = new GraphNodeStyle(GraphNodeShape.Rectangle, Color.LightGray, Color.Black, 1); + AssertEqualStyle(expectedStyle, graphNode.Style); + + Assert.AreEqual(1, graphNode.ChildNodes.Count()); + GraphNode connectingNode = graphNode.ChildNodes.First(); + AssertGraphConnectingNode(CreateExpectedGraphConnectingNodeContent(illustrationPoint.CombinationType), connectingNode); + CollectionAssert.IsEmpty(connectingNode.ChildNodes); + } + + [Test] + public void CreateGraphNode_FaultTreeIllustrationPointNodeDataWithChildren_ReturnsExpected() + { + // Setup + var random = new Random(31); + var illustrationPoint = new FaultTreeIllustrationPoint( + "Illustration Point", + random.NextRoundedDouble(), + Enumerable.Empty(), + random.NextEnumValue()); + + IEnumerable childGraphNodes = new[] + { + CreateTestGraphNode() + }; + + // Call + GraphNode graphNode = RiskeerGraphNodeFactory.CreateGraphNode(illustrationPoint, + childGraphNodes); + + // Assert + Assert.AreEqual(CreateExpectedGraphNodeContent(illustrationPoint.Name, illustrationPoint.Beta), graphNode.Content); + Assert.IsTrue(graphNode.IsSelectable); + + var expectedStyle = new GraphNodeStyle(GraphNodeShape.Rectangle, Color.LightGray, Color.Black, 1); + AssertEqualStyle(expectedStyle, graphNode.Style); + + Assert.AreEqual(1, graphNode.ChildNodes.Count()); + GraphNode connectingNode = graphNode.ChildNodes.First(); + AssertGraphConnectingNode(CreateExpectedGraphConnectingNodeContent(illustrationPoint.CombinationType), connectingNode); + CollectionAssert.AreEqual(childGraphNodes, connectingNode.ChildNodes); + } + + [Test] + public void CreateGraphNode_WithFaultTreeIllustrationPointButChildrenNull_ThrowsArgumentNullException() + { + // Setup + var illustrationPoint = new TestFaultTreeIllustrationPoint(); + + // Call + TestDelegate test = () => RiskeerGraphNodeFactory.CreateGraphNode(illustrationPoint, null); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("childNodes", exception.ParamName); + } + + [Test] + public void CreateGraphNode_WithNotSupportedIllustrationPoint_ThrowsNotSupportedException() + { + // Setup + var illustrationPoint = new TestIllustrationPoint(); + + // Call + TestDelegate test = () => RiskeerGraphNodeFactory.CreateGraphNode(illustrationPoint, new[] + { + CreateTestGraphNode() + }); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual($"IllustrationPointNode of type {illustrationPoint.GetType().Name} is not supported. " + + $"Supported types: {nameof(FaultTreeIllustrationPoint)} and {nameof(SubMechanismIllustrationPoint)}", + exception.Message); + } + + private static void AssertGraphConnectingNode(string expectedContent, GraphNode actualNode) + { + Assert.IsFalse(actualNode.IsSelectable); + Assert.AreEqual(expectedContent, actualNode.Content); + + var expectedConnectingStyle = new GraphNodeStyle(GraphNodeShape.None, Color.BlanchedAlmond, Color.Black, 1); + AssertEqualStyle(expectedConnectingStyle, actualNode.Style); + } + + private static void AssertEqualStyle(GraphNodeStyle expected, GraphNodeStyle actual) + { + Assert.AreEqual(expected.FillColor, actual.FillColor); + Assert.AreEqual(expected.LineColor, actual.LineColor); + Assert.AreEqual(expected.LineWidth, actual.LineWidth); + Assert.AreEqual(expected.Shape, actual.Shape); + } + + private static GraphNode CreateTestGraphNode() + { + return new GraphNode("content", new GraphNode[0], false, CreateTestGraphNodeStyle()); + } + + private static GraphNodeStyle CreateTestGraphNodeStyle() + { + return new GraphNodeStyle(GraphNodeShape.None, Color.Empty, Color.Empty, 1); + } + + private static string CreateExpectedGraphNodeContent(string name, RoundedDouble beta) + { + RoundedDouble roundedBeta = beta.ToPrecision(5); + string probability = ProbabilityFormattingHelper.Format(StatisticsConverter.ReliabilityToProbability(beta)); + + return $"{name}{Environment.NewLine}" + + $"{Environment.NewLine}" + + $"Berekende kans = {probability}{Environment.NewLine}" + + $"Betrouwbaarheidsindex = {roundedBeta}"; + } + + private static string CreateExpectedGraphConnectingNodeContent(CombinationType combinationType) + { + string name = combinationType == CombinationType.And + ? "En" + : "Of"; + return $"{name}"; + } + } +} \ No newline at end of file Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerMapDataFactoryTest.cs =================================================================== diff -u --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerMapDataFactoryTest.cs (revision 0) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerMapDataFactoryTest.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,199 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System.Drawing; +using Core.Components.Gis.Data; +using Core.Components.Gis.Style; +using NUnit.Framework; +using Riskeer.Common.Forms.Factories; + +namespace Riskeer.Common.Forms.Test.Factories +{ + [TestFixture] + public class RiskeerMapDataFactoryTest + { + [Test] + public void CreateReferenceLineMapData_ReturnsEmptyMapLineDataWithExpectedStyling() + { + // Call + MapLineData data = RiskeerMapDataFactory.CreateReferenceLineMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Referentielijn", data.Name); + AssertEqualStyle(data.Style, Color.FromArgb(0, 128, 255), 3, LineDashStyle.Solid); + Assert.AreEqual("Naam", data.SelectedMetaDataAttribute); + } + + [Test] + public void CreateFailureMechanismSectionsMapData_ReturnsEmptyMapLineDataWithExpectedStyling() + { + // Call + MapLineData data = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Vakindeling", data.Name); + AssertEqualStyle(data.Style, Color.Khaki, 3, LineDashStyle.Dot); + Assert.AreEqual("Naam", data.SelectedMetaDataAttribute); + } + + [Test] + public void CreateFailureMechanismSectionsStartPointMapData_ReturnsEmptyMapPointDataWithExpectedStyling() + { + // Call + MapPointData data = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Vakindeling (startpunten)", data.Name); + AssertEqualStyle(data.Style, Color.DarkKhaki, 15, PointSymbol.Triangle); + } + + [Test] + public void CreateFailureMechanismSectionsEndPointMapData_ReturnsEmptyMapPointDataWithExpectedStyling() + { + // Call + MapPointData data = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Vakindeling (eindpunten)", data.Name); + AssertEqualStyle(data.Style, Color.DarkKhaki, 15, PointSymbol.Triangle); + } + + [Test] + public void CreateHydraulicBoundaryLocationsMapData_ReturnsEmptyMapPointDataWithExpectedStyling() + { + // Call + MapPointData data = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Hydraulische belastingen", data.Name); + Assert.IsTrue(data.ShowLabels); + AssertEqualStyle(data.Style, Color.DarkBlue, 6, PointSymbol.Circle); + Assert.AreEqual("Naam", data.SelectedMetaDataAttribute); + } + + [Test] + public void CreateDikeProfileMapData_ReturnsEmptyMapLineDataWithExpectedStyling() + { + // Call + MapLineData data = RiskeerMapDataFactory.CreateDikeProfileMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Dijkprofielen", data.Name); + AssertEqualStyle(data.Style, Color.SaddleBrown, 2, LineDashStyle.Solid); + Assert.AreEqual("Naam", data.SelectedMetaDataAttribute); + } + + [Test] + public void CreateForeshoreProfileMapData_ReturnsEmptyMapLineDataWithExpectedStyling() + { + // Call + MapLineData data = RiskeerMapDataFactory.CreateForeshoreProfileMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Voorlandprofielen", data.Name); + AssertEqualStyle(data.Style, Color.DarkOrange, 2, LineDashStyle.Solid); + Assert.AreEqual("Naam", data.SelectedMetaDataAttribute); + } + + [Test] + public void CreateStructuresMapData_ReturnsEmptyMapPointDataWithExpectedStyling() + { + // Call + MapPointData data = RiskeerMapDataFactory.CreateStructuresMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Kunstwerken", data.Name); + AssertEqualStyle(data.Style, Color.DarkSeaGreen, 15, PointSymbol.Square); + Assert.AreEqual("Naam", data.SelectedMetaDataAttribute); + } + + [Test] + public void CreateCalculationsMapData_ReturnsEmptyMapPointDataWithExpectedStyling() + { + // Call + MapLineData data = RiskeerMapDataFactory.CreateCalculationsMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Berekeningen", data.Name); + AssertEqualStyle(data.Style, Color.MediumPurple, 2, LineDashStyle.Dash); + } + + [Test] + public void CreateSurfaceLinesMapData_ReturnsEmptyMapLineDataWithExpectedStyling() + { + // Call + MapLineData data = RiskeerMapDataFactory.CreateSurfaceLinesMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Profielschematisaties", data.Name); + AssertEqualStyle(data.Style, Color.DarkSeaGreen, 2, LineDashStyle.Solid); + Assert.AreEqual("Naam", data.SelectedMetaDataAttribute); + } + + [Test] + public void CreateStochasticSoilModelsMapData_ReturnsEmptyMapLineDataWithExpectedStyling() + { + // Call + MapLineData data = RiskeerMapDataFactory.CreateStochasticSoilModelsMapData(); + + // Assert + CollectionAssert.IsEmpty(data.Features); + Assert.AreEqual("Stochastische ondergrondmodellen", data.Name); + AssertEqualStyle(data.Style, Color.FromArgb(70, Color.SaddleBrown), 5, LineDashStyle.Solid); + Assert.AreEqual("Naam", data.SelectedMetaDataAttribute); + } + + [Test] + public void CreateSectionsMapDataCollection_ReturnsEmptyMapDataCollectionWithExpectedName() + { + // Call + MapDataCollection data = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + + // Assert + CollectionAssert.IsEmpty(data.Collection); + Assert.AreEqual("Vakindeling", data.Name); + } + + private static void AssertEqualStyle(LineStyle lineStyle, Color color, int width, LineDashStyle style) + { + Assert.AreEqual(color, lineStyle.Color); + Assert.AreEqual(width, lineStyle.Width); + Assert.AreEqual(style, lineStyle.DashStyle); + } + + private static void AssertEqualStyle(PointStyle pointStyle, Color color, int width, PointSymbol symbol) + { + Assert.AreEqual(color, pointStyle.Color); + Assert.AreEqual(width, pointStyle.Size); + Assert.AreEqual(symbol, pointStyle.Symbol); + } + } +} \ No newline at end of file Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerMapDataFeaturesFactoryTest.cs =================================================================== diff -u --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerMapDataFeaturesFactoryTest.cs (revision 0) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerMapDataFeaturesFactoryTest.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,749 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using System.Collections.Generic; +using System.Linq; +using Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using Core.Components.Gis.Features; +using Core.Components.Gis.Geometries; +using NUnit.Framework; +using Riskeer.Common.Data; +using Riskeer.Common.Data.AssessmentSection; +using Riskeer.Common.Data.DikeProfiles; +using Riskeer.Common.Data.FailureMechanism; +using Riskeer.Common.Data.Hydraulics; +using Riskeer.Common.Data.Structures; +using Riskeer.Common.Data.TestUtil; +using Riskeer.Common.Forms.Factories; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.Common.Forms.TestUtil; + +namespace Riskeer.Common.Forms.Test.Factories +{ + [TestFixture] + public class RiskeerMapDataFeaturesFactoryTest + { + [Test] + public void CreateSingleLineMapFeature_PointsNull_ThrowArgumentNullException() + { + // Call + TestDelegate call = () => RiskeerMapDataFeaturesFactory.CreateSingleLineMapFeature(null); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("points", paramName); + } + + [Test] + public void CreateSingleLineMapFeature_WithPoints_ReturnMapFeatureWithLineGeometry() + { + // Setup + var points = new[] + { + new Point2D(1.1, 2.2), + new Point2D(3.3, 4.4) + }; + + // Call + MapFeature feature = RiskeerMapDataFeaturesFactory.CreateSingleLineMapFeature(points); + + // Assert + Assert.AreEqual(1, feature.MapGeometries.Count()); + Assert.AreEqual(1, feature.MapGeometries.First().PointCollections.Count()); + CollectionAssert.AreEqual(points, feature.MapGeometries.First().PointCollections.First()); + + CollectionAssert.IsEmpty(feature.MetaData); + } + + [Test] + public void CreateReferenceLineFeatures_ReferenceLineNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(null, string.Empty, string.Empty); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("referenceLine", exception.ParamName); + } + + [Test] + public void CreateReferenceLineFeatures_ReferenceLineWithEmptyGeometry_ReturnsEmptyFeaturesCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(new ReferenceLine(), string.Empty, string.Empty); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateReferenceLineFeatures_GivenReferenceLine_ReturnsReferenceLineFeature() + { + // Setup + const string id = "1"; + const string name = "Traject 1"; + + var points = new[] + { + new Point2D(1.2, 2.3), + new Point2D(2.7, 2.0) + }; + var referenceLine = new ReferenceLine(); + referenceLine.SetGeometry(points); + + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, id, name); + + // Assert + MapFeature mapFeature = features.Single(); + Assert.AreEqual(3, mapFeature.MetaData.Keys.Count); + Assert.AreEqual(id, mapFeature.MetaData["ID"]); + Assert.AreEqual(name, mapFeature.MetaData["Naam"]); + + var expectedLength = new RoundedDouble(2, Math2D.Length(points)); + Assert.AreEqual(expectedLength, (RoundedDouble) mapFeature.MetaData["Lengte*"], expectedLength.GetAccuracy()); + AssertEqualPointCollections(points, mapFeature.MapGeometries.ElementAt(0)); + } + + [Test] + public void CreateHydraulicBoundaryLocationFeatures_AssessmentSectionNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("assessmentSection", exception.ParamName); + } + + [Test] + public void CreateHydraulicBoundaryLocationFeatures_NoLocations_ReturnsEmptyFeaturesCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures( + new AssessmentSectionStub()); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public void CreateHydraulicBoundaryLocationFeatures_GivenLocations_ReturnsLocationFeaturesCollection(bool setOutput) + { + // Setup + var assessmentSection = new AssessmentSectionStub(); + assessmentSection.SetHydraulicBoundaryLocationCalculations(new[] + { + new HydraulicBoundaryLocation(1, "location1", 1, 1), + new HydraulicBoundaryLocation(2, "location2", 2, 2) + }, setOutput); + + // Call + MapFeature[] features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(assessmentSection).ToArray(); + + // Assert + MapFeaturesTestHelper.AssertHydraulicBoundaryFeaturesData(assessmentSection, features); + } + + [Test] + public void CreateFailureMechanismSectionFeatures_SectionsNull_ReturnsEmptyFeaturesCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(null); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateFailureMechanismSectionFeatures_NoSections_ReturnsEmptyFeaturesCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures( + Enumerable.Empty()); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateFailureMechanismSectionFeatures_GivenSections_ReturnsSectionFeaturesCollection() + { + // Setup + const string sectionName1 = "section 1"; + const string sectionName2 = "section 2"; + + var pointsOne = new[] + { + new Point2D(1.2, 2.3), + new Point2D(2.7, 2.0) + }; + var pointsTwo = new[] + { + new Point2D(3.2, 23.3), + new Point2D(7.7, 12.6) + }; + + var sections = new[] + { + new FailureMechanismSection(sectionName1, pointsOne), + new FailureMechanismSection(sectionName2, pointsTwo) + }; + + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(sections); + + // Assert + Assert.AreEqual(2, features.Count()); + for (var i = 0; i < features.Count(); i++) + { + Assert.AreEqual(1, features.ElementAt(i).MapGeometries.Count()); + Assert.AreEqual(2, features.ElementAt(i).MetaData.Keys.Count); + + Assert.AreEqual(sections[i].Name, features.ElementAt(i).MetaData["Naam"]); + var expectedLength = new RoundedDouble(2, Math2D.Length(sections[i].Points)); + Assert.AreEqual(expectedLength, (RoundedDouble) features.ElementAt(i).MetaData["Lengte*"], expectedLength.GetAccuracy()); + + AssertEqualPointCollections(sections[i].Points, features.ElementAt(i).MapGeometries.First()); + } + } + + [Test] + public void CreateFailureMechanismSectionStartPointFeatures_SectionsNull_ReturnsEmptyFeaturesCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(null); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateFailureMechanismSectionStartPointFeatures_NoSections_ReturnsEmptyFeaturesCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(Enumerable.Empty()); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateFailureMechanismSectionStartPointFeatures_GivenSections_ReturnsSectionBeginPointFeaturesCollection() + { + // Setup + var pointsOne = new[] + { + new Point2D(1.2, 2.3), + new Point2D(2.7, 2.0) + }; + var pointsTwo = new[] + { + new Point2D(3.2, 23.3), + new Point2D(7.7, 12.6) + }; + var sections = new[] + { + new FailureMechanismSection(string.Empty, pointsOne), + new FailureMechanismSection(string.Empty, pointsTwo) + }; + + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(sections); + + // Assert + Assert.AreEqual(1, features.Count()); + Assert.AreEqual(1, features.First().MapGeometries.Count()); + AssertEqualPointCollections(new[] + { + pointsOne[0], + pointsTwo[0] + }, features.First().MapGeometries.ElementAt(0)); + } + + [Test] + public void CreateFailureMechanismSectionEndPointFeatures_SectionsNull_ReturnsEmptyFeaturesCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(null); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateFailureMechanismSectionEndPointFeatures_NoSections_ReturnsEmptyFeaturesCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(Enumerable.Empty()); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateFailureMechanismSectionEndPointFeatures_GivenSections_ReturnsSectionEndPointFeaturesCollection() + { + // Setup + var pointsOne = new[] + { + new Point2D(1.2, 2.3), + new Point2D(2.7, 2.0) + }; + var pointsTwo = new[] + { + new Point2D(3.2, 23.3), + new Point2D(7.7, 12.6) + }; + var sections = new[] + { + new FailureMechanismSection(string.Empty, pointsOne), + new FailureMechanismSection(string.Empty, pointsTwo) + }; + + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(sections); + + // Assert + Assert.AreEqual(1, features.Count()); + Assert.AreEqual(1, features.First().MapGeometries.Count()); + AssertEqualPointCollections(new[] + { + pointsOne[1], + pointsTwo[1] + }, features.First().MapGeometries.ElementAt(0)); + } + + [Test] + public void CreateStructuresFeatures_NullStructures_ReturnsEmptyCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateStructuresFeatures(null); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateStructuresFeatures_EmptyStructures_ReturnsEmptyCollection() + { + // Setup + IEnumerable structures = Enumerable.Empty(); + + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateStructuresFeatures(structures); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateStructuresFeatures_WithStructures_ReturnsCollectionWithFeatures() + { + // Setup + var structure1 = new TestStructure("id", "A", new Point2D(1.1, 2.2)); + var structure2 = new TestStructure("id", "B", new Point2D(3.3, 4.4)); + + TestStructure[] structures = + { + structure1, + structure2 + }; + + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateStructuresFeatures(structures); + + // Assert + Assert.AreEqual(2, features.Count()); + Point2D locationOne = features.First().MapGeometries.Single().PointCollections.First().Single(); + Point2D locationTwo = features.ElementAt(1).MapGeometries.Single().PointCollections.First().Single(); + Assert.AreEqual(structure1.Location, locationOne); + Assert.AreEqual(structure2.Location, locationTwo); + + const int expectedNumberOfMetaDataOptions = 1; + Assert.AreEqual(expectedNumberOfMetaDataOptions, features.First().MetaData.Count); + Assert.AreEqual(expectedNumberOfMetaDataOptions, features.ElementAt(1).MetaData.Count); + Assert.AreEqual(structure1.Name, features.First().MetaData["Naam"]); + Assert.AreEqual(structure2.Name, features.ElementAt(1).MetaData["Naam"]); + } + + [Test] + public void CreateStructureCalculationsFeatures_NullLocations_ReturnsEmptyCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateStructureCalculationsFeatures< + SimpleStructuresInput, StructureBase>(null); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateStructureCalculationsFeatures_EmptyLocations_ReturnsEmptyCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateStructureCalculationsFeatures + (Enumerable.Empty()); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateStructureCalculationsFeatures_WithCalculations_ReturnsCollectionWithCalculations() + { + // Setup + var calculationLocationA = new Point2D(1.2, 2.3); + var calculationLocationB = new Point2D(2.7, 2.0); + + var hydraulicBoundaryLocationA = new HydraulicBoundaryLocation(1, string.Empty, 1.3, 2.3); + var hydraulicBoundaryLocationB = new HydraulicBoundaryLocation(1, string.Empty, 7.7, 12.6); + + var simpleStructuresCalculationA = new SimpleStructuresCalculation + { + InputParameters = + { + HydraulicBoundaryLocation = hydraulicBoundaryLocationA, + Structure = new TestStructure(calculationLocationA) + } + }; + + var simpleStructuresCalculationB = new SimpleStructuresCalculation + { + InputParameters = + { + HydraulicBoundaryLocation = hydraulicBoundaryLocationB, + Structure = new TestStructure(calculationLocationB) + } + }; + + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateStructureCalculationsFeatures + (new[] + { + simpleStructuresCalculationA, + simpleStructuresCalculationB + }); + + // Assert + Assert.AreEqual(2, features.Count()); + Assert.AreEqual(1, features.First().MapGeometries.Count()); + Assert.AreEqual(1, features.ElementAt(1).MapGeometries.Count()); + Point2D[] mapDataGeometryOne = features.First().MapGeometries.ElementAt(0).PointCollections.First().ToArray(); + Point2D[] mapDataGeometryTwo = features.ElementAt(1).MapGeometries.ElementAt(0).PointCollections.First().ToArray(); + + CollectionElementsAlmostEquals(new[] + { + calculationLocationA, + hydraulicBoundaryLocationA.Location + }, mapDataGeometryOne); + CollectionElementsAlmostEquals(new[] + { + calculationLocationB, + hydraulicBoundaryLocationB.Location + }, mapDataGeometryTwo); + } + + [Test] + public void CreateCalculationsFeatures_NullLocations_ReturnsEmptyCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateCalculationFeatures(null); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateCalculationsFeatures_EmptyLocations_ReturnsEmptyCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateCalculationFeatures( + new MapCalculationData[0]); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateCalculationsFeatures_WithCalculations_ReturnsCollectionWithCalculations() + { + // Setup + var calculationLocationA = new Point2D(1.2, 2.3); + var calculationLocationB = new Point2D(2.7, 2.0); + + var hydraulicBoundaryLocationA = new HydraulicBoundaryLocation(1, string.Empty, 1.3, 2.3); + var hydraulicBoundaryLocationB = new HydraulicBoundaryLocation(1, string.Empty, 7.7, 12.6); + + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateCalculationFeatures(new[] + { + new MapCalculationData("calculationA", calculationLocationA, hydraulicBoundaryLocationA), + new MapCalculationData("calculationB", calculationLocationB, hydraulicBoundaryLocationB) + }); + + // Assert + Assert.AreEqual(2, features.Count()); + Assert.AreEqual(1, features.First().MapGeometries.Count()); + Assert.AreEqual(1, features.ElementAt(1).MapGeometries.Count()); + Point2D[] mapDataGeometryOne = features.First().MapGeometries.ElementAt(0).PointCollections.First().ToArray(); + Point2D[] mapDataGeometryTwo = features.ElementAt(1).MapGeometries.ElementAt(0).PointCollections.First().ToArray(); + + CollectionElementsAlmostEquals(new[] + { + calculationLocationA, + hydraulicBoundaryLocationA.Location + }, mapDataGeometryOne); + CollectionElementsAlmostEquals(new[] + { + calculationLocationB, + hydraulicBoundaryLocationB.Location + }, mapDataGeometryTwo); + } + + [Test] + public void CreateDikeProfilesFeatures_NullDikeProfiles_ReturnsEmptyCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateDikeProfilesFeatures(null); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateDikeProfilesFeatures_EmptyDikeProfiles_ReturnsEmptyCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateDikeProfilesFeatures( + Enumerable.Empty()); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateDikeProfilesFeatures_WithDikeProfiles_ReturnsCollectionWithDikeProfiles() + { + // Setup + var pointA = new Point2D(1.2, 2.3); + var pointB = new Point2D(2.7, 2.0); + var pointC = new Point2D(3.2, 23.3); + var pointD = new Point2D(7.7, 12.6); + + var pointE = new Point2D(1.3, 2.3); + var pointF = new Point2D(4.6, 2.0); + var pointG = new Point2D(6.3, 23.3); + var pointH = new Point2D(4.2, 12.6); + + var roughnessPointsOne = new[] + { + new RoughnessPoint(pointA, 1), + new RoughnessPoint(pointB, 2) + }; + Point2D[] pointsOne = + { + pointC, + pointD + }; + var roughnessPointsTwo = new[] + { + new RoughnessPoint(pointE, 1), + new RoughnessPoint(pointF, 2), + new RoughnessPoint(pointG, 1), + new RoughnessPoint(pointH, 2) + }; + var dikeProfiles = new[] + { + new DikeProfile(new Point2D(5, 4), roughnessPointsOne, pointsOne, null, new DikeProfile.ConstructionProperties + { + Id = "A" + }), + new DikeProfile(new Point2D(2, 1), roughnessPointsTwo, Enumerable.Empty(), null, new DikeProfile.ConstructionProperties + { + Id = "bid", + Name = "B" + }) + }; + + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateDikeProfilesFeatures(dikeProfiles); + + // Assert + Assert.AreEqual(2, features.Count()); + Assert.AreEqual(1, features.First().MapGeometries.Count()); + Assert.AreEqual(1, features.ElementAt(1).MapGeometries.Count()); + Point2D[] mapDataDikeGeometryOne = features.First().MapGeometries.ElementAt(0).PointCollections.First().ToArray(); + Point2D[] mapDataDikeGeometryTwo = features.ElementAt(1).MapGeometries.ElementAt(0).PointCollections.First().ToArray(); + + CollectionElementsAlmostEquals(new[] + { + new Point2D(5, 2.8), + new Point2D(5, 1.3) + }, mapDataDikeGeometryOne); + CollectionElementsAlmostEquals(new[] + { + new Point2D(2, -0.3), + new Point2D(2, -3.6), + new Point2D(2, -5.3), + new Point2D(2, -3.2) + }, mapDataDikeGeometryTwo); + + const int expectedNumberOfMetaDataOptions = 1; + Assert.AreEqual(expectedNumberOfMetaDataOptions, features.First().MetaData.Count); + Assert.AreEqual(expectedNumberOfMetaDataOptions, features.ElementAt(1).MetaData.Count); + Assert.AreEqual(dikeProfiles[0].Name, features.First().MetaData["Naam"]); + Assert.AreEqual(dikeProfiles[1].Name, features.ElementAt(1).MetaData["Naam"]); + } + + [Test] + public void CreateForeshoreProfilesFeatures_NullForeshoreProfiles_ReturnsEmptyCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(null); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateForeshoreProfilesFeatures_EmptyForeshoreProfiles_ReturnsEmptyCollection() + { + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateForeshoreProfilesFeatures( + Enumerable.Empty()); + + // Assert + CollectionAssert.IsEmpty(features); + } + + [Test] + public void CreateForeshoreProfilesFeatures_WithForeshoreProfiles_ReturnsCollectionForeshoreProfilesWithGeometry() + { + // Setup + var pointA = new Point2D(1.2, 2.3); + var pointB = new Point2D(2.7, 2.0); + + var pointC = new Point2D(1.3, 2.3); + var pointD = new Point2D(4.6, 2.0); + var pointE = new Point2D(3.2, 23.3); + var pointF = new Point2D(7.7, 12.6); + + Point2D[] pointsOne = + { + pointA, + pointB + }; + Point2D[] pointsTwo = + { + pointC, + pointD, + pointE, + pointF + }; + var foreshoreProfiles = new[] + { + new ForeshoreProfile(new Point2D(5, 4), pointsOne, null, new ForeshoreProfile.ConstructionProperties + { + Id = "A" + }), + new ForeshoreProfile(new Point2D(3, 3), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties + { + Id = "bid", + Name = "B" + }), + new ForeshoreProfile(new Point2D(2, 1), pointsTwo, null, new ForeshoreProfile.ConstructionProperties + { + Id = "cid", + Name = "C" + }) + }; + + // Call + IEnumerable features = RiskeerMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); + + // Assert + Assert.AreEqual(2, features.Count()); + Assert.AreEqual(1, features.First().MapGeometries.Count()); + Assert.AreEqual(1, features.ElementAt(1).MapGeometries.Count()); + Point2D[] mapDataGeometryOne = features.First().MapGeometries.ElementAt(0).PointCollections.First().ToArray(); + Point2D[] mapDataGeometryTwo = features.ElementAt(1).MapGeometries.ElementAt(0).PointCollections.First().ToArray(); + + CollectionElementsAlmostEquals(new[] + { + new Point2D(5, 2.8), + new Point2D(5, 1.3) + }, mapDataGeometryOne); + CollectionElementsAlmostEquals(new[] + { + new Point2D(2, -0.3), + new Point2D(2, -3.6), + new Point2D(2, -2.2), + new Point2D(2, -6.7) + }, mapDataGeometryTwo); + + const int expectedNumberOfMetaDataOptions = 1; + Assert.AreEqual(expectedNumberOfMetaDataOptions, features.First().MetaData.Count); + Assert.AreEqual(expectedNumberOfMetaDataOptions, features.ElementAt(1).MetaData.Count); + Assert.AreEqual(foreshoreProfiles[0].Name, features.First().MetaData["Naam"]); + Assert.AreEqual(foreshoreProfiles[2].Name, features.ElementAt(1).MetaData["Naam"]); + } + + private static void CollectionElementsAlmostEquals(IEnumerable expected, Point2D[] actual) + { + Assert.AreEqual(expected.Count(), actual.Length); + + for (var index = 0; index < actual.Length; index++) + { + Point2D actualPoint = actual[index]; + Point2D expectedPoint = expected.ElementAt(index); + + const double delta = 1e-8; + Assert.AreEqual(expectedPoint.X, actualPoint.X, delta); + Assert.AreEqual(expectedPoint.Y, actualPoint.Y, delta); + } + } + + private static void AssertEqualPointCollections(IEnumerable points, MapGeometry geometry) + { + CollectionAssert.AreEqual(points, geometry.PointCollections.First()); + } + + private class SimpleStructuresInput : StructuresInputBase + { + public override bool IsStructureInputSynchronized + { + get + { + return false; + } + } + + public override void SynchronizeStructureInput() {} + } + + private class SimpleStructuresCalculation : StructuresCalculation {} + } +} \ No newline at end of file Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerStackChartDataFactoryTest.cs =================================================================== diff -u --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerStackChartDataFactoryTest.cs (revision 0) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Factories/RiskeerStackChartDataFactoryTest.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,287 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using System.Drawing; +using System.Linq; +using Core.Common.Base.Data; +using Core.Common.TestUtil; +using Core.Components.Stack.Data; +using NUnit.Framework; +using Riskeer.Common.Data.IllustrationPoints; +using Riskeer.Common.Data.TestUtil.IllustrationPoints; +using Riskeer.Common.Forms.Factories; +using Riskeer.Common.Forms.Views; + +namespace Riskeer.Common.Forms.Test.Factories +{ + [TestFixture] + public class RiskeerStackChartDataFactoryTest + { + [Test] + public void Create_Always_ReturnStackChartData() + { + // Call + StackChartData stackChartData = RiskeerStackChartDataFactory.Create(); + + // Assert + CollectionAssert.IsEmpty(stackChartData.Columns); + CollectionAssert.IsEmpty(stackChartData.Rows); + } + + [Test] + public void CreateColumns_IllustrationPointControlItemsNull_ThrowArgumentNullException() + { + // Call + TestDelegate test = () => RiskeerStackChartDataFactory.CreateColumns(null, new StackChartData()); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("illustrationPointControlItems", exception.ParamName); + } + + [Test] + public void CreateColumns_StackChartDataNull_ThrowArgumentNullException() + { + // Call + TestDelegate test = () => RiskeerStackChartDataFactory.CreateColumns(Enumerable.Empty(), null); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("stackChartData", exception.ParamName); + } + + [Test] + public void CreateColumns_SameClosingSituations_ColumnsAddedToStackChartData() + { + // Setup + var stackChartData = new StackChartData(); + + const string closingSituation = "Regular"; + var beta = (RoundedDouble) 3.14; + var controlItems = new[] + { + new IllustrationPointControlItem(new TestTopLevelIllustrationPoint(), + "WindDirectionName1", + closingSituation, + Enumerable.Empty(), + beta), + new IllustrationPointControlItem(new TestTopLevelIllustrationPoint(), + "WindDirectionName2", + closingSituation, + Enumerable.Empty(), + beta), + new IllustrationPointControlItem(new TestTopLevelIllustrationPoint(), + "WindDirectionName3", + closingSituation, + Enumerable.Empty(), + beta) + }; + + // Call + RiskeerStackChartDataFactory.CreateColumns(controlItems, stackChartData); + + // Assert + string[] columns = stackChartData.Columns.ToArray(); + Assert.AreEqual(3, columns.Length); + Assert.AreEqual(controlItems[0].WindDirectionName, columns[0]); + Assert.AreEqual(controlItems[1].WindDirectionName, columns[1]); + Assert.AreEqual(controlItems[2].WindDirectionName, columns[2]); + } + + [Test] + public void CreateColumns_SingleClosingSituationSingleIllustrationPoint_ColumnsAddedToStackChartData() + { + // Setup + var stackChartData = new StackChartData(); + + const string closingSituation = "Regular"; + var beta = (RoundedDouble) 3.14; + var controlItems = new[] + { + new IllustrationPointControlItem(new TestTopLevelIllustrationPoint(), + "WindDirectionName1", + closingSituation, + Enumerable.Empty(), + beta) + }; + + // Call + RiskeerStackChartDataFactory.CreateColumns(controlItems, stackChartData); + + // Assert + string[] columns = stackChartData.Columns.ToArray(); + Assert.AreEqual(1, columns.Length); + Assert.AreEqual(controlItems[0].WindDirectionName, columns[0]); + } + + [Test] + public void CreateColumns_DifferentClosingSituations_ColumnsAddedToStackChartData() + { + // Setup + const string closingSituationRegular = "Regular"; + const string closingSituationClosed = "Closed"; + var beta = (RoundedDouble) 3.14; + + var stackChartData = new StackChartData(); + var controlItems = new[] + { + new IllustrationPointControlItem(new TestTopLevelIllustrationPoint(), + "WindDirection 1", + closingSituationRegular, + Enumerable.Empty(), + beta), + new IllustrationPointControlItem(new TestTopLevelIllustrationPoint(), + "WindDirection 2", + closingSituationClosed, + Enumerable.Empty(), + beta), + new IllustrationPointControlItem(new TestTopLevelIllustrationPoint(), + "WindDirection 3", + closingSituationClosed, + Enumerable.Empty(), + beta) + }; + + // Call + RiskeerStackChartDataFactory.CreateColumns(controlItems, stackChartData); + + // Assert + string[] columns = stackChartData.Columns.ToArray(); + Assert.AreEqual(3, columns.Length); + Assert.AreEqual($"{controlItems[0].WindDirectionName} ({closingSituationRegular})", columns[0]); + Assert.AreEqual($"{controlItems[1].WindDirectionName} ({closingSituationClosed})", columns[1]); + Assert.AreEqual($"{controlItems[2].WindDirectionName} ({closingSituationClosed})", columns[2]); + } + + [Test] + public void CreateRows_IllustrationPointControlItemsNull_ThrowArgumentNullException() + { + // Call + TestDelegate test = () => RiskeerStackChartDataFactory.CreateRows(null, new StackChartData()); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("illustrationPointControlItems", exception.ParamName); + } + + [Test] + public void CreateRows_StackChartDataNull_ThrowArgumentNullException() + { + // Call + TestDelegate test = () => RiskeerStackChartDataFactory.CreateRows(Enumerable.Empty(), null); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("stackChartData", exception.ParamName); + } + + [Test] + public void CreateRows_WithAllData_RowsAddedToStackChartData() + { + var stackChartData = new StackChartData(); + + const string windDirectionName = "SSE"; + const string closingSituation = "Regular"; + var beta = (RoundedDouble) 3.14; + + var controlItems = new[] + { + new IllustrationPointControlItem(new TestTopLevelIllustrationPoint(), + windDirectionName, + closingSituation, + new[] + { + new TestSubMechanismIllustrationPointStochast("Stochast 1", -0.9), + new TestSubMechanismIllustrationPointStochast("Stochast 2", -0.43589), + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.01), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.01), + new TestSubMechanismIllustrationPointStochast("Stochast 5", -0.099) + }, beta), + new IllustrationPointControlItem(new TestTopLevelIllustrationPoint(), + windDirectionName, + closingSituation, + new[] + { + new TestSubMechanismIllustrationPointStochast("Stochast 1", -0.43589), + new TestSubMechanismIllustrationPointStochast("Stochast 2", -0.9), + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.02), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.02), + new TestSubMechanismIllustrationPointStochast("Stochast 5", -0.9) + }, beta), + new IllustrationPointControlItem(new TestTopLevelIllustrationPoint(), + windDirectionName, + closingSituation, + new[] + { + new TestSubMechanismIllustrationPointStochast("Stochast 1", -0.43589), + new TestSubMechanismIllustrationPointStochast("Stochast 2", -0.9), + new TestSubMechanismIllustrationPointStochast("Stochast 3", -0.03), + new TestSubMechanismIllustrationPointStochast("Stochast 4", -0.03), + new TestSubMechanismIllustrationPointStochast("Stochast 5", -0.099) + }, beta) + }; + + RiskeerStackChartDataFactory.CreateColumns(controlItems, stackChartData); + + // Call + RiskeerStackChartDataFactory.CreateRows(controlItems, stackChartData); + + // Assert + RowChartData[] rows = stackChartData.Rows.ToArray(); + + Assert.AreEqual(4, rows.Length); + + Assert.AreEqual("Stochast 1", rows[0].Name); + CollectionAssert.AreEqual(new[] + { + 0.81, + 0.19, + 0.19 + }, rows[0].Values, new DoubleWithToleranceComparer(1e-6)); + Assert.IsNull(rows[0].Color); + Assert.AreEqual("Stochast 2", rows[1].Name); + CollectionAssert.AreEqual(new[] + { + 0.19, + 0.81, + 0.81 + }, rows[1].Values, new DoubleWithToleranceComparer(1e-6)); + Assert.IsNull(rows[1].Color); + Assert.AreEqual("Stochast 5", rows[2].Name); + CollectionAssert.AreEqual(new[] + { + 0.00980, + 0.81, + 0.00980 + }, rows[2].Values, new DoubleWithToleranceComparer(1e-6)); + Assert.IsNull(rows[2].Color); + Assert.AreEqual("Overig", rows[3].Name); + CollectionAssert.AreEqual(new[] + { + 0.0002, + 0.0008, + 0.0018 + }, rows[3].Values, new DoubleWithToleranceComparer(1e-6)); + Assert.AreEqual(Color.Gray, rows[3].Color); + } + } +} \ No newline at end of file Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/test/Riskeer.Common.Forms.Test/ImportInfos/RingtoetsImportInfoFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/ImportInfos/RiskeerImportInfoFactoryTest.cs =================================================================== diff -u --- Riskeer/Common/test/Riskeer.Common.Forms.Test/ImportInfos/RiskeerImportInfoFactoryTest.cs (revision 0) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/ImportInfos/RiskeerImportInfoFactoryTest.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,67 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using Core.Common.Base.IO; +using Core.Common.Gui.Plugin; +using Core.Common.TestUtil; +using Core.Common.Util; +using NUnit.Framework; +using Rhino.Mocks; +using Riskeer.Common.Data.Calculation; +using Riskeer.Common.Data.FailureMechanism; +using Riskeer.Common.Forms.ImportInfos; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.Common.Forms.Properties; + +namespace Riskeer.Common.Forms.Test.ImportInfos +{ + [TestFixture] + public class RiskeerImportInfoFactoryTest + { + [Test] + public void CreateCalculationConfigurationImportInfo_WithArguments_ExpectedPropertiesSet() + { + // Setup + var mocks = new MockRepository(); + var fileImporter = mocks.Stub(); + mocks.ReplayAll(); + + Func, string, IFileImporter> createFileImporter = (context, s) => fileImporter; + + // Call + ImportInfo> importInfo = RiskeerImportInfoFactory.CreateCalculationConfigurationImportInfo(createFileImporter); + + // Assert + Assert.AreSame(createFileImporter, importInfo.CreateFileImporter); + Assert.AreEqual("Riskeer berekeningenconfiguratie", importInfo.Name); + Assert.AreEqual("Algemeen", importInfo.Category); + + FileFilterGenerator fileFilterGenerator = importInfo.FileFilterGenerator; + Assert.AreEqual("Riskeer berekeningenconfiguratie (*.xml)|*.xml", fileFilterGenerator.Filter); + + TestHelper.AssertImagesAreEqual(Resources.GeneralFolderIcon, importInfo.Image); + Assert.IsTrue(importInfo.IsEnabled(null)); + + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Riskeer.Common.Forms.Test.csproj =================================================================== diff -u -r9bba38e3ebe3fe261e7c97c338b016681e07c140 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Riskeer.Common.Forms.Test.csproj (.../Riskeer.Common.Forms.Test.csproj) (revision 9bba38e3ebe3fe261e7c97c338b016681e07c140) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Riskeer.Common.Forms.Test.csproj (.../Riskeer.Common.Forms.Test.csproj) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -54,12 +54,12 @@ - + - + - + @@ -68,7 +68,7 @@ - + @@ -157,7 +157,7 @@ - + @@ -178,10 +178,10 @@ - + - - + + Fisheye: Tag 5fd764f8bc968f35e200824a360b44a0a02fdf3e refers to a dead (removed) revision in file `Riskeer/Common/test/Riskeer.Common.Forms.Test/UpdateInfos/RingtoetsUpdateInfoFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/UpdateInfos/RiskeerUpdateInfoFactoryTest.cs =================================================================== diff -u --- Riskeer/Common/test/Riskeer.Common.Forms.Test/UpdateInfos/RiskeerUpdateInfoFactoryTest.cs (revision 0) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/UpdateInfos/RiskeerUpdateInfoFactoryTest.cs (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -0,0 +1,188 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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. + +using System; +using System.Linq; +using Core.Common.Gui.Plugin; +using Core.Common.TestUtil; +using Core.Common.Util; +using NUnit.Framework; +using Rhino.Mocks; +using Riskeer.Common.Data.AssessmentSection; +using Riskeer.Common.Data.FailureMechanism; +using Riskeer.Common.Data.TestUtil; +using Riskeer.Common.Forms.PresentationObjects; +using Riskeer.Common.Forms.Properties; +using Riskeer.Common.Forms.UpdateInfos; +using Riskeer.Common.IO.FileImporters; + +namespace Riskeer.Common.Forms.Test.UpdateInfos +{ + [TestFixture] + public class RiskeerUpdateInfoFactoryTest + { + [Test] + public void CreateFailureMechanismSectionsUpdateInfo_SectionResultUpdateStrategyNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + FailureMechanismSectionsContext, TestFailureMechanism, FailureMechanismSectionResult>(null); + + // Assert + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("sectionResultUpdateStrategy", paramName); + } + + [Test] + public void CreateFailureMechanismSectionsUpdateInfo_WithArguments_ExpectedPropertiesSet() + { + // Setup + var mocks = new MockRepository(); + var sectionResultUpdateStrategy = mocks.Stub>(); + var assessmentSection = mocks.Stub(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); + mocks.ReplayAll(); + + // Call + UpdateInfo updateInfo = RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + FailureMechanismSectionsContext, TestFailureMechanism, FailureMechanismSectionResult>(sectionResultUpdateStrategy); + + // Assert + Assert.AreEqual("Vakindeling", updateInfo.Name); + Assert.AreEqual("Algemeen", updateInfo.Category); + + FileFilterGenerator fileFilterGenerator = updateInfo.FileFilterGenerator; + Assert.AreEqual("Shapebestand (*.shp)|*.shp", fileFilterGenerator.Filter); + + TestHelper.AssertImagesAreEqual(Resources.SectionsIcon, updateInfo.Image); + Assert.IsNull(updateInfo.VerifyUpdates); + + mocks.VerifyAll(); + } + + [Test] + public void CreateFailureMechanismSectionsUpdateInfo_WithArguments_ReturnsExpectedCreatedFileImporter() + { + // Setup + var mocks = new MockRepository(); + var sectionResultUpdateStrategy = mocks.Stub>(); + var assessmentSection = mocks.Stub(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); + mocks.ReplayAll(); + + // Call + UpdateInfo updateInfo = RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + FailureMechanismSectionsContext, TestFailureMechanism, FailureMechanismSectionResult>(sectionResultUpdateStrategy); + + // Assert + var failureMechanismSectionsContext = new FailureMechanismSectionsContext(new TestFailureMechanism(), assessmentSection); + Assert.IsInstanceOf(updateInfo.CreateFileImporter(failureMechanismSectionsContext, "")); + + mocks.VerifyAll(); + } + + [Test] + public void CreateFailureMechanismSectionsUpdateInfo_WithSourcePath_ReturnsIsEnabledTrue() + { + // Setup + var mocks = new MockRepository(); + var sectionResultUpdateStrategy = mocks.Stub>(); + var assessmentSection = mocks.Stub(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); + mocks.ReplayAll(); + + // Call + UpdateInfo updateInfo = RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + FailureMechanismSectionsContext, TestFailureMechanism, FailureMechanismSectionResult>(sectionResultUpdateStrategy); + + // Assert + var testFailureMechanism = new TestFailureMechanism(); + testFailureMechanism.SetSections(Enumerable.Empty(), "path/to/sections"); + var failureMechanismSectionsContext = new FailureMechanismSectionsContext(testFailureMechanism, assessmentSection); + Assert.IsTrue(updateInfo.IsEnabled(failureMechanismSectionsContext)); + mocks.VerifyAll(); + } + + [Test] + public void CreateFailureMechanismSectionsUpdateInfo_WithSourcePath_ReturnsSourcePath() + { + // Setup + var mocks = new MockRepository(); + var sectionResultUpdateStrategy = mocks.Stub>(); + var assessmentSection = mocks.Stub(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); + mocks.ReplayAll(); + + // Call + UpdateInfo updateInfo = RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + FailureMechanismSectionsContext, TestFailureMechanism, FailureMechanismSectionResult>(sectionResultUpdateStrategy); + + // Assert + var testFailureMechanism = new TestFailureMechanism(); + testFailureMechanism.SetSections(Enumerable.Empty(), "path/to/sections"); + var failureMechanismSectionsContext = new FailureMechanismSectionsContext(testFailureMechanism, assessmentSection); + Assert.AreEqual(testFailureMechanism.FailureMechanismSectionSourcePath, + updateInfo.CurrentPath(failureMechanismSectionsContext)); + mocks.VerifyAll(); + } + + [Test] + public void CreateFailureMechanismSectionsUpdateInfo_WithoutSourcePath_ReturnsIsEnabledFalse() + { + // Setup + var mocks = new MockRepository(); + var sectionResultUpdateStrategy = mocks.Stub>(); + var assessmentSection = mocks.Stub(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); + mocks.ReplayAll(); + + // Call + UpdateInfo updateInfo = RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + FailureMechanismSectionsContext, TestFailureMechanism, FailureMechanismSectionResult>(sectionResultUpdateStrategy); + + // Assert + var failureMechanismSectionsContext = new FailureMechanismSectionsContext(new TestFailureMechanism(), assessmentSection); + Assert.IsFalse(updateInfo.IsEnabled(failureMechanismSectionsContext)); + mocks.VerifyAll(); + } + + [Test] + public void CreateFailureMechanismSectionsUpdateInfo_WithoutSourcePath_ReturnsNullPath() + { + // Setup + var mocks = new MockRepository(); + var sectionResultUpdateStrategy = mocks.Stub>(); + var assessmentSection = mocks.Stub(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); + mocks.ReplayAll(); + + // Call + UpdateInfo updateInfo = RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + FailureMechanismSectionsContext, TestFailureMechanism, FailureMechanismSectionResult>(sectionResultUpdateStrategy); + + // Assert + var failureMechanismSectionsContext = new FailureMechanismSectionsContext(new TestFailureMechanism(), assessmentSection); + Assert.IsNull(updateInfo.CurrentPath(failureMechanismSectionsContext)); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/Factories/DuneErosionMapDataFeaturesFactory.cs =================================================================== diff -u -r52c3d6c3c369cbdb020756c537ab5c6cea4c5514 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/Factories/DuneErosionMapDataFeaturesFactory.cs (.../DuneErosionMapDataFeaturesFactory.cs) (revision 52c3d6c3c369cbdb020756c537ab5c6cea4c5514) +++ Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/Factories/DuneErosionMapDataFeaturesFactory.cs (.../DuneErosionMapDataFeaturesFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -37,7 +37,7 @@ { /// /// Factory for creating collections of for the - /// to use in (created via ). + /// to use in (created via ). /// internal static class DuneErosionMapDataFeaturesFactory { Index: Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/Views/DuneErosionFailureMechanismView.cs =================================================================== diff -u -r52c3d6c3c369cbdb020756c537ab5c6cea4c5514 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/Views/DuneErosionFailureMechanismView.cs (.../DuneErosionFailureMechanismView.cs) (revision 52c3d6c3c369cbdb020756c537ab5c6cea4c5514) +++ Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/Views/DuneErosionFailureMechanismView.cs (.../DuneErosionFailureMechanismView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -174,13 +174,13 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(DuneErosionDataResources.DuneErosionFailureMechanism_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - duneLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + duneLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -231,7 +231,7 @@ private void SetReferenceLineMapData() { - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(AssessmentSection.ReferenceLine, + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(AssessmentSection.ReferenceLine, AssessmentSection.Id, AssessmentSection.Name); } @@ -253,9 +253,9 @@ private void SetFailureMechanismMapData() { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion Index: Riskeer/DuneErosion/src/Riskeer.DuneErosion.Plugin/DuneErosionPlugin.cs =================================================================== diff -u -r52c3d6c3c369cbdb020756c537ab5c6cea4c5514 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/DuneErosion/src/Riskeer.DuneErosion.Plugin/DuneErosionPlugin.cs (.../DuneErosionPlugin.cs) (revision 52c3d6c3c369cbdb020756c537ab5c6cea4c5514) +++ Riskeer/DuneErosion/src/Riskeer.DuneErosion.Plugin/DuneErosionPlugin.cs (.../DuneErosionPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -188,7 +188,7 @@ public override IEnumerable GetUpdateInfos() { - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< DuneErosionFailureMechanismSectionsContext, DuneErosionFailureMechanism, DuneErosionFailureMechanismSectionResult>( new DuneErosionFailureMechanismSectionResultUpdateStrategy()); } Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Factories/GrassCoverErosionInwardsChartDataFactory.cs =================================================================== diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Factories/GrassCoverErosionInwardsChartDataFactory.cs (.../GrassCoverErosionInwardsChartDataFactory.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Factories/GrassCoverErosionInwardsChartDataFactory.cs (.../GrassCoverErosionInwardsChartDataFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -88,7 +88,7 @@ /// /// The to update the name for. /// The used for obtaining the name. - /// A default name is set (the same as in ) when: + /// A default name is set (the same as in ) when: /// /// is null; /// the dike profile in is null; Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Factories/GrassCoverErosionInwardsMapDataFeatureFactory.cs =================================================================== diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Factories/GrassCoverErosionInwardsMapDataFeatureFactory.cs (.../GrassCoverErosionInwardsMapDataFeatureFactory.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Factories/GrassCoverErosionInwardsMapDataFeatureFactory.cs (.../GrassCoverErosionInwardsMapDataFeatureFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -59,7 +59,7 @@ calculation.InputParameters.DikeProfile.WorldReferencePoint, calculation.InputParameters.HydraulicBoundaryLocation)).ToArray(); - return RingtoetsMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); + return RiskeerMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); } } } \ No newline at end of file Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismView.cs =================================================================== diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismView.cs (.../GrassCoverErosionInwardsFailureMechanismView.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismView.cs (.../GrassCoverErosionInwardsFailureMechanismView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -163,16 +163,16 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(GrassCoverErosionInwardsDataResources.GrassCoverErosionInwardsFailureMechanism_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - dikeProfilesMapData = RingtoetsMapDataFactory.CreateDikeProfileMapData(); - foreshoreProfilesMapData = RingtoetsMapDataFactory.CreateForeshoreProfileMapData(); - calculationsMapData = RingtoetsMapDataFactory.CreateCalculationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + dikeProfilesMapData = RiskeerMapDataFactory.CreateDikeProfileMapData(); + foreshoreProfilesMapData = RiskeerMapDataFactory.CreateForeshoreProfileMapData(); + calculationsMapData = RiskeerMapDataFactory.CreateCalculationsMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -328,7 +328,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion @@ -344,7 +344,7 @@ private void SetReferenceLineMapData() { ReferenceLine referenceLine = AssessmentSection.ReferenceLine; - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); } #endregion @@ -364,9 +364,9 @@ private void SetSectionsMapData() { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion @@ -384,8 +384,8 @@ { IEnumerable dikeProfiles = FailureMechanism.DikeProfiles; - dikeProfilesMapData.Features = RingtoetsMapDataFeaturesFactory.CreateDikeProfilesFeatures(dikeProfiles); - foreshoreProfilesMapData.Features = RingtoetsMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(dikeProfiles.Select(dp => dp.ForeshoreProfile)); + dikeProfilesMapData.Features = RiskeerMapDataFeaturesFactory.CreateDikeProfilesFeatures(dikeProfiles); + foreshoreProfilesMapData.Features = RiskeerMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(dikeProfiles.Select(dp => dp.ForeshoreProfile)); } #endregion Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsInputView.cs =================================================================== diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsInputView.cs (.../GrassCoverErosionInwardsInputView.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsInputView.cs (.../GrassCoverErosionInwardsInputView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -58,7 +58,7 @@ calculationInputObserver = new Observer(UpdateChartData); chartDataCollection = new ChartDataCollection(RiskeerCommonFormsResources.Calculation_Input); - foreshoreChartData = RingtoetsChartDataFactory.CreateForeshoreGeometryChartData(); + foreshoreChartData = RiskeerChartDataFactory.CreateForeshoreGeometryChartData(); dikeGeometryChartData = GrassCoverErosionInwardsChartDataFactory.CreateDikeGeometryChartData(); dikeHeightChartData = GrassCoverErosionInwardsChartDataFactory.CreateDikeHeightChartData(); Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs =================================================================== diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -109,7 +109,7 @@ public override IEnumerable GetImportInfos() { - yield return RingtoetsImportInfoFactory.CreateCalculationConfigurationImportInfo( + yield return RiskeerImportInfoFactory.CreateCalculationConfigurationImportInfo( (context, filePath) => new GrassCoverErosionInwardsCalculationConfigurationImporter( filePath, context.WrappedData, @@ -125,7 +125,7 @@ new GrassCoverErosionInwardsDikeProfileReplaceDataStrategy(context.ParentFailureMechanism), new ImportMessageProvider()), Name = RiskeerCommonIOResources.DikeProfilesImporter_DisplayName, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = RiskeerCommonFormsResources.DikeProfile, FileFilterGenerator = DikeProfileImporterFileFilterGenerator(), IsEnabled = context => context.ParentAssessmentSection.ReferenceLine.Points.Any(), @@ -144,7 +144,7 @@ new GrassCoverErosionInwardsDikeProfileUpdateDataStrategy(context.ParentFailureMechanism), new UpdateMessageProvider()), Name = RiskeerCommonIOResources.DikeProfilesImporter_DisplayName, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = RiskeerCommonFormsResources.DikeProfile, FileFilterGenerator = DikeProfileImporterFileFilterGenerator(), CurrentPath = context => context.WrappedData.SourcePath, @@ -153,18 +153,18 @@ Resources.GrassCoverErosionInwardsPlugin_VerifyDikeProfileUpdate_When_updating_Calculation_with_DikeProfile_data_output_will_be_cleared_confirm) }; - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< GrassCoverErosionInwardsFailureMechanismSectionsContext, GrassCoverErosionInwardsFailureMechanism, GrassCoverErosionInwardsFailureMechanismSectionResult>( new GrassCoverErosionInwardsFailureMechanismSectionResultUpdateStrategy()); } public override IEnumerable GetExportInfos() { - yield return RingtoetsExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( (context, filePath) => new GrassCoverErosionInwardsCalculationConfigurationExporter(context.WrappedData.Children, filePath), context => context.WrappedData.Children.Any()); - yield return RingtoetsExportInfoFactory.CreateCalculationConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationConfigurationExportInfo( (context, filePath) => new GrassCoverErosionInwardsCalculationConfigurationExporter(new[] { context.WrappedData Index: Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/Factories/GrassCoverErosionOutwardsMapDataFeaturesFactory.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/Factories/GrassCoverErosionOutwardsMapDataFeaturesFactory.cs (.../GrassCoverErosionOutwardsMapDataFeaturesFactory.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/Factories/GrassCoverErosionOutwardsMapDataFeaturesFactory.cs (.../GrassCoverErosionOutwardsMapDataFeaturesFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -63,7 +63,7 @@ calculation.InputParameters.ForeshoreProfile.WorldReferencePoint, calculation.InputParameters.HydraulicBoundaryLocation)).ToArray(); - return RingtoetsMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); + return RiskeerMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); } /// Index: Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsFailureMechanismView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsFailureMechanismView.cs (.../GrassCoverErosionOutwardsFailureMechanismView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsFailureMechanismView.cs (.../GrassCoverErosionOutwardsFailureMechanismView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -167,15 +167,15 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(GrassCoverErosionOutwardsDataResources.GrassCoverErosionOutwardsFailureMechanism_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - foreshoreProfilesMapData = RingtoetsMapDataFactory.CreateForeshoreProfileMapData(); - calculationsMapData = RingtoetsMapDataFactory.CreateCalculationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + foreshoreProfilesMapData = RiskeerMapDataFactory.CreateForeshoreProfileMapData(); + calculationsMapData = RiskeerMapDataFactory.CreateCalculationsMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -347,7 +347,7 @@ private void SetReferenceLineMapData() { ReferenceLine referenceLine = AssessmentSection.ReferenceLine; - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); } #endregion @@ -368,9 +368,9 @@ { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion @@ -386,7 +386,7 @@ private void SetForeshoreProfilesMapData() { IEnumerable foreshoreProfiles = FailureMechanism.ForeshoreProfiles; - foreshoreProfilesMapData.Features = RingtoetsMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); + foreshoreProfilesMapData.Features = RiskeerMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); } #endregion Index: Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -132,7 +132,7 @@ public override IEnumerable GetImportInfos() { - yield return RingtoetsImportInfoFactory.CreateCalculationConfigurationImportInfo( + yield return RiskeerImportInfoFactory.CreateCalculationConfigurationImportInfo( (context, filePath) => new GrassCoverErosionOutwardsWaveConditionsCalculationConfigurationImporter( filePath, @@ -368,11 +368,11 @@ RiskeerCommonFormsResources.DataTypeDisplayName_csv_file_filter_Description) }; - yield return RingtoetsExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( (context, filePath) => new GrassCoverErosionOutwardsWaveConditionsCalculationConfigurationExporter(context.WrappedData.Children, filePath), context => context.WrappedData.Children.Any()); - yield return RingtoetsExportInfoFactory.CreateCalculationConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationConfigurationExportInfo( (context, filePath) => new GrassCoverErosionOutwardsWaveConditionsCalculationConfigurationExporter(new[] { context.WrappedData @@ -381,7 +381,7 @@ public override IEnumerable GetUpdateInfos() { - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< GrassCoverErosionOutwardsFailureMechanismSectionsContext, GrassCoverErosionOutwardsFailureMechanism, GrassCoverErosionOutwardsFailureMechanismSectionResult>( new GrassCoverErosionOutwardsFailureMechanismSectionResultUpdateStrategy()); } Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/Views/HeightStructuresFailureMechanismView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/Views/HeightStructuresFailureMechanismView.cs (.../HeightStructuresFailureMechanismView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/Views/HeightStructuresFailureMechanismView.cs (.../HeightStructuresFailureMechanismView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -169,16 +169,16 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(HeightStructuresDataResources.HeightStructuresFailureMechanism_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - foreshoreProfilesMapData = RingtoetsMapDataFactory.CreateForeshoreProfileMapData(); - calculationsMapData = RingtoetsMapDataFactory.CreateCalculationsMapData(); - structuresMapData = RingtoetsMapDataFactory.CreateStructuresMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + foreshoreProfilesMapData = RiskeerMapDataFactory.CreateForeshoreProfileMapData(); + calculationsMapData = RiskeerMapDataFactory.CreateCalculationsMapData(); + structuresMapData = RiskeerMapDataFactory.CreateStructuresMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -325,7 +325,7 @@ { IEnumerable> calculations = FailureMechanism.CalculationsGroup.GetCalculations().Cast>(); - calculationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateStructureCalculationsFeatures(calculations); + calculationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateStructureCalculationsFeatures(calculations); } #endregion @@ -340,7 +340,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion @@ -356,7 +356,7 @@ private void SetReferenceLineMapData() { ReferenceLine referenceLine = AssessmentSection.ReferenceLine; - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); } #endregion @@ -376,9 +376,9 @@ private void SetSectionsMapData() { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion @@ -394,7 +394,7 @@ private void SetStructuresMapData() { IEnumerable structures = FailureMechanism.HeightStructures; - structuresMapData.Features = RingtoetsMapDataFeaturesFactory.CreateStructuresFeatures(structures); + structuresMapData.Features = RiskeerMapDataFeaturesFactory.CreateStructuresFeatures(structures); } #endregion @@ -410,7 +410,7 @@ private void SetForeshoreProfilesMapData() { IEnumerable foreshoreProfiles = FailureMechanism.ForeshoreProfiles; - foreshoreProfilesMapData.Features = RingtoetsMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); + foreshoreProfilesMapData.Features = RiskeerMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); } #endregion Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -98,7 +98,7 @@ yield return new ImportInfo { Name = RiskeerCommonFormsResources.StructuresImporter_DisplayName, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = RiskeerCommonFormsResources.StructuresIcon, IsEnabled = context => context.AssessmentSection.ReferenceLine.Points.Any(), FileFilterGenerator = CreateHeightStructureFileFilter(), @@ -110,7 +110,7 @@ RiskeerCommonIOResources.VerifyStructuresShouldUpdate_When_importing_Calculation_with_Structure_data_output_will_be_cleared_confirm) }; - yield return RingtoetsImportInfoFactory.CreateCalculationConfigurationImportInfo( + yield return RiskeerImportInfoFactory.CreateCalculationConfigurationImportInfo( (context, filePath) => new HeightStructuresCalculationConfigurationImporter( filePath, context.WrappedData, @@ -125,7 +125,7 @@ yield return new UpdateInfo { Name = RiskeerCommonDataResources.StructureCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = RiskeerCommonFormsResources.StructuresIcon, IsEnabled = context => context.WrappedData.SourcePath != null, FileFilterGenerator = CreateHeightStructureFileFilter(), @@ -138,18 +138,18 @@ RiskeerCommonIOResources.VerifyStructuresShouldUpdate_When_updating_Calculation_with_Structure_data_output_will_be_cleared_confirm) }; - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< HeightStructuresFailureMechanismSectionsContext, HeightStructuresFailureMechanism, HeightStructuresFailureMechanismSectionResult>( new HeightStructuresFailureMechanismSectionResultUpdateStrategy()); } public override IEnumerable GetExportInfos() { - yield return RingtoetsExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( (context, filePath) => new HeightStructuresCalculationConfigurationExporter(context.WrappedData.Children, filePath), context => context.WrappedData.Children.Any()); - yield return RingtoetsExportInfoFactory.CreateCalculationConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationConfigurationExportInfo( (context, filePath) => new HeightStructuresCalculationConfigurationExporter(new[] { context.WrappedData Index: Riskeer/Integration/src/Riskeer.Integration.Forms/Factories/AssessmentSectionAssemblyMapDataFeaturesFactory.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Integration/src/Riskeer.Integration.Forms/Factories/AssessmentSectionAssemblyMapDataFeaturesFactory.cs (.../AssessmentSectionAssemblyMapDataFeaturesFactory.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Integration/src/Riskeer.Integration.Forms/Factories/AssessmentSectionAssemblyMapDataFeaturesFactory.cs (.../AssessmentSectionAssemblyMapDataFeaturesFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -72,7 +72,7 @@ IEnumerable geometry = FailureMechanismSectionHelper.GetFailureMechanismSectionGeometry(assessmentSection.ReferenceLine, assemblyResult.SectionStart, assemblyResult.SectionEnd); - MapFeature mapFeature = RingtoetsMapDataFeaturesFactory.CreateSingleLineMapFeature(geometry); + MapFeature mapFeature = RiskeerMapDataFeaturesFactory.CreateSingleLineMapFeature(geometry); mapFeature.MetaData[RiskeerCommonFormsResources.AssemblyCategory_Group_DisplayName] = new EnumDisplayWrapper( Index: Riskeer/Integration/src/Riskeer.Integration.Forms/Views/AssemblyResultPerSectionMapView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Integration/src/Riskeer.Integration.Forms/Views/AssemblyResultPerSectionMapView.cs (.../AssemblyResultPerSectionMapView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Integration/src/Riskeer.Integration.Forms/Views/AssemblyResultPerSectionMapView.cs (.../AssemblyResultPerSectionMapView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -77,8 +77,8 @@ var mapDataCollection = new MapDataCollection(Resources.AssemblyResultPerSectionMapView_DisplayName); assemblyResultsMapData = CombinedSectionAssemblyMapDataFactory.CreateCombinedSectionAssemblyResultMapData(); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); mapDataCollection.Add(referenceLineMapData); mapDataCollection.Add(hydraulicBoundaryLocationsMapData); @@ -203,7 +203,7 @@ private void SetReferenceLineMapData() { - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(AssessmentSection.ReferenceLine, + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(AssessmentSection.ReferenceLine, AssessmentSection.Id, AssessmentSection.Name); } @@ -220,7 +220,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion Index: Riskeer/Integration/src/Riskeer.Integration.Forms/Views/AssessmentSectionView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Integration/src/Riskeer.Integration.Forms/Views/AssessmentSectionView.cs (.../AssessmentSectionView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Integration/src/Riskeer.Integration.Forms/Views/AssessmentSectionView.cs (.../AssessmentSectionView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -74,8 +74,8 @@ CreateObservers(); var mapDataCollection = new MapDataCollection(Resources.AssessmentSectionMap_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); mapDataCollection.Add(referenceLineMapData); mapDataCollection.Add(hydraulicBoundaryLocationsMapData); @@ -167,7 +167,7 @@ private void SetReferenceLineMapData() { - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(assessmentSection.ReferenceLine, assessmentSection.Id, assessmentSection.Name); + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(assessmentSection.ReferenceLine, assessmentSection.Id, assessmentSection.Name); } #endregion @@ -182,7 +182,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(assessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(assessmentSection); } #endregion Index: Riskeer/Integration/src/Riskeer.Integration.Forms/Views/FailureMechanismWithDetailedAssessmentView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Integration/src/Riskeer.Integration.Forms/Views/FailureMechanismWithDetailedAssessmentView.cs (.../FailureMechanismWithDetailedAssessmentView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Integration/src/Riskeer.Integration.Forms/Views/FailureMechanismWithDetailedAssessmentView.cs (.../FailureMechanismWithDetailedAssessmentView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -189,13 +189,13 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(FailureMechanism.Name); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -300,7 +300,7 @@ private void SetReferenceLineMapData() { - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures( + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures( AssessmentSection.ReferenceLine, AssessmentSection.Id, AssessmentSection.Name); } @@ -322,9 +322,9 @@ { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion @@ -339,7 +339,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion Index: Riskeer/Integration/src/Riskeer.Integration.Forms/Views/FailureMechanismWithoutDetailedAssessmentView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Integration/src/Riskeer.Integration.Forms/Views/FailureMechanismWithoutDetailedAssessmentView.cs (.../FailureMechanismWithoutDetailedAssessmentView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Integration/src/Riskeer.Integration.Forms/Views/FailureMechanismWithoutDetailedAssessmentView.cs (.../FailureMechanismWithoutDetailedAssessmentView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -178,13 +178,13 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(FailureMechanism.Name); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -285,7 +285,7 @@ private void SetReferenceLineMapData() { - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures( + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures( AssessmentSection.ReferenceLine, AssessmentSection.Id, AssessmentSection.Name); } @@ -307,9 +307,9 @@ { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion @@ -324,7 +324,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion Index: Riskeer/Integration/src/Riskeer.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Integration/src/Riskeer.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Integration/src/Riskeer.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -733,7 +733,7 @@ yield return new ImportInfo { Name = RiskeerCommonDataResources.ReferenceLine_DisplayName, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = RiskeerCommonFormsResources.ReferenceLineIcon, FileFilterGenerator = new FileFilterGenerator(RiskeerCommonIOResources.Shape_file_filter_Extension, RiskeerCommonIOResources.Shape_file_filter_Description), @@ -745,7 +745,7 @@ yield return new ImportInfo { Name = RiskeerCommonFormsResources.FailureMechanismSections_DisplayName, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = RiskeerCommonFormsResources.SectionsIcon, FileFilterGenerator = new FileFilterGenerator(RiskeerCommonIOResources.Shape_file_filter_Extension, RiskeerCommonIOResources.Shape_file_filter_Description), @@ -767,7 +767,7 @@ context.WrappedData), new ImportMessageProvider()), Name = Resources.ForeshoreProfilesImporter_DisplayName, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = Resources.Foreshore, FileFilterGenerator = CreateForeshoreProfileFileFilterGenerator, IsEnabled = context => HasGeometry(context.ParentAssessmentSection.ReferenceLine), @@ -778,7 +778,7 @@ { Name = RiskeerCommonDataResources.HydraulicBoundaryConditions_DisplayName, Image = RiskeerCommonFormsResources.DatabaseIcon, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, FileFilterGenerator = new FileFilterGenerator(Resources.HydraulicBoundaryDatabase_FilePath_Extension, Resources.HydraulicBoundaryDatabase_file_filter_Description), CreateFileImporter = (context, filePath) => new HydraulicBoundaryDatabaseImporter( @@ -830,43 +830,43 @@ new ForeshoreProfileUpdateDataStrategy(context.ParentFailureMechanism, context.WrappedData), new UpdateMessageProvider()), Name = Resources.ForeshoreProfilesImporter_DisplayName, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = Resources.Foreshore, FileFilterGenerator = CreateForeshoreProfileFileFilterGenerator, CurrentPath = context => context.WrappedData.SourcePath, IsEnabled = context => context.WrappedData.SourcePath != null, VerifyUpdates = context => VerifyForeshoreProfileUpdates(context, Resources.RingtoetsPlugin_VerifyForeshoreProfileUpdates_When_updating_ForeshoreProfile_definitions_assigned_to_calculations_output_will_be_cleared_confirm) }; - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< GrassCoverSlipOffInwardsFailureMechanismSectionsContext, GrassCoverSlipOffInwardsFailureMechanism, GrassCoverSlipOffInwardsFailureMechanismSectionResult>( new GrassCoverSlipOffInwardsFailureMechanismSectionResultUpdateStrategy()); - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< GrassCoverSlipOffOutwardsFailureMechanismSectionsContext, GrassCoverSlipOffOutwardsFailureMechanism, GrassCoverSlipOffOutwardsFailureMechanismSectionResult>( new GrassCoverSlipOffOutwardsFailureMechanismSectionResultUpdateStrategy()); - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< MacroStabilityOutwardsFailureMechanismSectionsContext, MacroStabilityOutwardsFailureMechanism, MacroStabilityOutwardsFailureMechanismSectionResult>( new MacroStabilityOutwardsFailureMechanismSectionResultUpdateStrategy()); - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< MicrostabilityFailureMechanismSectionsContext, MicrostabilityFailureMechanism, MicrostabilityFailureMechanismSectionResult>( new MicrostabilityFailureMechanismSectionResultUpdateStrategy()); - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< PipingStructureFailureMechanismSectionsContext, PipingStructureFailureMechanism, PipingStructureFailureMechanismSectionResult>( new PipingStructureFailureMechanismSectionResultUpdateStrategy()); - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< StrengthStabilityLengthwiseConstructionFailureMechanismSectionsContext, StrengthStabilityLengthwiseConstructionFailureMechanism, StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult>( new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultUpdateStrategy()); - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< TechnicalInnovationFailureMechanismSectionsContext, TechnicalInnovationFailureMechanism, TechnicalInnovationFailureMechanismSectionResult>( new TechnicalInnovationFailureMechanismSectionResultUpdateStrategy()); - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< WaterPressureAsphaltCoverFailureMechanismSectionsContext, WaterPressureAsphaltCoverFailureMechanism, WaterPressureAsphaltCoverFailureMechanismSectionResult>( new WaterPressureAsphaltCoverFailureMechanismSectionResultUpdateStrategy()); } Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFeaturesFactory.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFeaturesFactory.cs (.../MacroStabilityInwardsMapDataFeaturesFactory.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFeaturesFactory.cs (.../MacroStabilityInwardsMapDataFeaturesFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -35,7 +35,7 @@ { /// /// Factory for creating collections of to use in - /// (created via ). + /// (created via ). /// internal static class MacroStabilityInwardsMapDataFeaturesFactory { @@ -54,7 +54,7 @@ { MacroStabilityInwardsSurfaceLine surfaceLine = surfaceLines.ElementAt(i); - MapFeature feature = RingtoetsMapDataFeaturesFactory.CreateSingleLineMapFeature(GetWorldPoints(surfaceLine)); + MapFeature feature = RiskeerMapDataFeaturesFactory.CreateSingleLineMapFeature(GetWorldPoints(surfaceLine)); feature.MetaData[RiskeerCommonUtilResources.MetaData_Name] = surfaceLine.Name; features[i] = feature; @@ -81,7 +81,7 @@ { MacroStabilityInwardsStochasticSoilModel stochasticSoilModel = stochasticSoilModels.ElementAt(i); - MapFeature feature = RingtoetsMapDataFeaturesFactory.CreateSingleLineMapFeature(GetWorldPoints(stochasticSoilModel)); + MapFeature feature = RiskeerMapDataFeaturesFactory.CreateSingleLineMapFeature(GetWorldPoints(stochasticSoilModel)); feature.MetaData[RiskeerCommonUtilResources.MetaData_Name] = stochasticSoilModel.Name; features[i] = feature; @@ -119,7 +119,7 @@ calculation.InputParameters.SurfaceLine.ReferenceLineIntersectionWorldPoint, calculation.InputParameters.HydraulicBoundaryLocation)).ToArray(); - return RingtoetsMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); + return RiskeerMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); } private static IEnumerable GetWorldPoints(MacroStabilityInwardsSurfaceLine surfaceLine) Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsFailureMechanismView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsFailureMechanismView.cs (.../MacroStabilityInwardsFailureMechanismView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsFailureMechanismView.cs (.../MacroStabilityInwardsFailureMechanismView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -165,16 +165,16 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(MacroStabilityInwardsDataResources.MacroStabilityInwardsFailureMechanism_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - stochasticSoilModelsMapData = RingtoetsMapDataFactory.CreateStochasticSoilModelsMapData(); - surfaceLinesMapData = RingtoetsMapDataFactory.CreateSurfaceLinesMapData(); - calculationsMapData = RingtoetsMapDataFactory.CreateCalculationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + stochasticSoilModelsMapData = RiskeerMapDataFactory.CreateStochasticSoilModelsMapData(); + surfaceLinesMapData = RiskeerMapDataFactory.CreateSurfaceLinesMapData(); + calculationsMapData = RiskeerMapDataFactory.CreateCalculationsMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -333,7 +333,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion @@ -349,7 +349,7 @@ private void SetReferenceLineMapData() { ReferenceLine referenceLine = AssessmentSection.ReferenceLine; - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); } #endregion @@ -370,9 +370,9 @@ { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsInputView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsInputView.cs (.../MacroStabilityInwardsInputView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsInputView.cs (.../MacroStabilityInwardsInputView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -135,18 +135,18 @@ }; chartDataCollection = new ChartDataCollection(RiskeerCommonFormsResources.Calculation_Input); - soilProfileChartData = RingtoetsChartDataFactory.CreateSoilProfileChartData(); - surfaceLineChartData = RingtoetsChartDataFactory.CreateSurfaceLineChartData(); + soilProfileChartData = RiskeerChartDataFactory.CreateSoilProfileChartData(); + surfaceLineChartData = RiskeerChartDataFactory.CreateSurfaceLineChartData(); surfaceLevelInsideChartData = MacroStabilityInwardsChartDataFactory.CreateSurfaceLevelInsideChartData(); - ditchPolderSideChartData = RingtoetsChartDataFactory.CreateDitchPolderSideChartData(); - bottomDitchPolderSideChartData = RingtoetsChartDataFactory.CreateBottomDitchPolderSideChartData(); - bottomDitchDikeSideChartData = RingtoetsChartDataFactory.CreateBottomDitchDikeSideChartData(); - ditchDikeSideChartData = RingtoetsChartDataFactory.CreateDitchDikeSideChartData(); - dikeToeAtPolderChartData = RingtoetsChartDataFactory.CreateDikeToeAtPolderChartData(); + ditchPolderSideChartData = RiskeerChartDataFactory.CreateDitchPolderSideChartData(); + bottomDitchPolderSideChartData = RiskeerChartDataFactory.CreateBottomDitchPolderSideChartData(); + bottomDitchDikeSideChartData = RiskeerChartDataFactory.CreateBottomDitchDikeSideChartData(); + ditchDikeSideChartData = RiskeerChartDataFactory.CreateDitchDikeSideChartData(); + dikeToeAtPolderChartData = RiskeerChartDataFactory.CreateDikeToeAtPolderChartData(); shoulderTopInsideChartData = MacroStabilityInwardsChartDataFactory.CreateShoulderTopInsideChartData(); shoulderBaseInsideChartData = MacroStabilityInwardsChartDataFactory.CreateShoulderBaseInsideChartData(); dikeTopAtPolderChartData = MacroStabilityInwardsChartDataFactory.CreateDikeTopAtPolderChartData(); - dikeToeAtRiverChartData = RingtoetsChartDataFactory.CreateDikeToeAtRiverChartData(); + dikeToeAtRiverChartData = RiskeerChartDataFactory.CreateDikeToeAtRiverChartData(); dikeTopAtRiverChartData = MacroStabilityInwardsChartDataFactory.CreateDikeTopAtRiverChartData(); surfaceLevelOutsideChartData = MacroStabilityInwardsChartDataFactory.CreateSurfaceLevelOutsideChartData(); tangentLinesData = MacroStabilityInwardsChartDataFactory.CreateTangentLinesChartData(); Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsOutputChartControl.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsOutputChartControl.cs (.../MacroStabilityInwardsOutputChartControl.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsOutputChartControl.cs (.../MacroStabilityInwardsOutputChartControl.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -124,18 +124,18 @@ InitializeComponent(); chartDataCollection = new ChartDataCollection(RiskeerCommonFormsResources.CalculationOutput_DisplayName); - soilProfileChartData = RingtoetsChartDataFactory.CreateSoilProfileChartData(); - surfaceLineChartData = RingtoetsChartDataFactory.CreateSurfaceLineChartData(); + soilProfileChartData = RiskeerChartDataFactory.CreateSoilProfileChartData(); + surfaceLineChartData = RiskeerChartDataFactory.CreateSurfaceLineChartData(); surfaceLevelInsideChartData = MacroStabilityInwardsChartDataFactory.CreateSurfaceLevelInsideChartData(); - ditchPolderSideChartData = RingtoetsChartDataFactory.CreateDitchPolderSideChartData(); - bottomDitchPolderSideChartData = RingtoetsChartDataFactory.CreateBottomDitchPolderSideChartData(); - bottomDitchDikeSideChartData = RingtoetsChartDataFactory.CreateBottomDitchDikeSideChartData(); - ditchDikeSideChartData = RingtoetsChartDataFactory.CreateDitchDikeSideChartData(); - dikeToeAtPolderChartData = RingtoetsChartDataFactory.CreateDikeToeAtPolderChartData(); + ditchPolderSideChartData = RiskeerChartDataFactory.CreateDitchPolderSideChartData(); + bottomDitchPolderSideChartData = RiskeerChartDataFactory.CreateBottomDitchPolderSideChartData(); + bottomDitchDikeSideChartData = RiskeerChartDataFactory.CreateBottomDitchDikeSideChartData(); + ditchDikeSideChartData = RiskeerChartDataFactory.CreateDitchDikeSideChartData(); + dikeToeAtPolderChartData = RiskeerChartDataFactory.CreateDikeToeAtPolderChartData(); shoulderTopInsideChartData = MacroStabilityInwardsChartDataFactory.CreateShoulderTopInsideChartData(); shoulderBaseInsideChartData = MacroStabilityInwardsChartDataFactory.CreateShoulderBaseInsideChartData(); dikeTopAtPolderChartData = MacroStabilityInwardsChartDataFactory.CreateDikeTopAtPolderChartData(); - dikeToeAtRiverChartData = RingtoetsChartDataFactory.CreateDikeToeAtRiverChartData(); + dikeToeAtRiverChartData = RiskeerChartDataFactory.CreateDikeToeAtRiverChartData(); dikeTopAtRiverChartData = MacroStabilityInwardsChartDataFactory.CreateDikeTopAtRiverChartData(); surfaceLevelOutsideChartData = MacroStabilityInwardsChartDataFactory.CreateSurfaceLevelOutsideChartData(); waternetZonesExtremeChartData = MacroStabilityInwardsChartDataFactory.CreateWaternetZonesExtremeChartDataCollection(); Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs (.../MacroStabilityInwardsPlugin.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs (.../MacroStabilityInwardsPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -115,7 +115,7 @@ yield return new ImportInfo { Name = RiskeerCommonDataResources.SurfaceLineCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = MacroStabilityInwardsFormsResources.SurfaceLineIcon, FileFilterGenerator = SurfaceLineFileFilter, IsEnabled = context => HasGeometry(context.AssessmentSection.ReferenceLine), @@ -130,7 +130,7 @@ yield return new ImportInfo { Name = RiskeerCommonDataResources.StochasticSoilModelCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = MacroStabilityInwardsFormsResources.SoilProfileIcon, FileFilterGenerator = StochasticSoilModelFileFilter, IsEnabled = context => HasGeometry(context.AssessmentSection.ReferenceLine), @@ -143,7 +143,7 @@ VerifyUpdates = context => VerifyStochasticSoilModelUpdates(context, Resources.MacroStabilityInwardsPlugin_VerifyStochasticSoilModelImport_When_importing_StochasticSoilModels_calculation_output_will_be_cleared_confirm) }; - yield return RingtoetsImportInfoFactory.CreateCalculationConfigurationImportInfo( + yield return RiskeerImportInfoFactory.CreateCalculationConfigurationImportInfo( (context, filePath) => new MacroStabilityInwardsCalculationConfigurationImporter( filePath, @@ -154,11 +154,11 @@ public override IEnumerable GetExportInfos() { - yield return RingtoetsExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( (context, filePath) => new MacroStabilityInwardsCalculationConfigurationExporter(context.WrappedData.Children, filePath), context => context.WrappedData.Children.Any()); - yield return RingtoetsExportInfoFactory.CreateCalculationConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationConfigurationExportInfo( (context, filePath) => new MacroStabilityInwardsCalculationConfigurationExporter(new[] { context.WrappedData @@ -170,7 +170,7 @@ yield return new UpdateInfo { Name = RiskeerCommonDataResources.SurfaceLineCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = MacroStabilityInwardsFormsResources.SurfaceLineIcon, FileFilterGenerator = SurfaceLineFileFilter, IsEnabled = context => context.WrappedData.SourcePath != null, @@ -186,7 +186,7 @@ yield return new UpdateInfo { Name = RiskeerCommonDataResources.StochasticSoilModelCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = MacroStabilityInwardsFormsResources.SoilProfileIcon, FileFilterGenerator = StochasticSoilModelFileFilter, IsEnabled = context => context.WrappedData.SourcePath != null, @@ -203,7 +203,7 @@ Resources.MacroStabilityInwardsPlugin_VerifyStochasticSoilModelUpdates_When_updating_StochasticSoilModel_definitions_assigned_to_calculation_output_will_be_cleared_confirm) }; - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< MacroStabilityInwardsFailureMechanismSectionsContext, MacroStabilityInwardsFailureMechanism, MacroStabilityInwardsFailureMechanismSectionResult>( new MacroStabilityInwardsFailureMechanismSectionResultUpdateStrategy()); } Index: Riskeer/Piping/src/Riskeer.Piping.Forms/Factories/PipingMapDataFeaturesFactory.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Piping/src/Riskeer.Piping.Forms/Factories/PipingMapDataFeaturesFactory.cs (.../PipingMapDataFeaturesFactory.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Piping/src/Riskeer.Piping.Forms/Factories/PipingMapDataFeaturesFactory.cs (.../PipingMapDataFeaturesFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -35,7 +35,7 @@ { /// /// Factory for creating collections of to use in - /// (created via ). + /// (created via ). /// internal static class PipingMapDataFeaturesFactory { @@ -54,7 +54,7 @@ { PipingSurfaceLine surfaceLine = surfaceLines.ElementAt(i); - MapFeature feature = RingtoetsMapDataFeaturesFactory.CreateSingleLineMapFeature(GetWorldPoints(surfaceLine)); + MapFeature feature = RiskeerMapDataFeaturesFactory.CreateSingleLineMapFeature(GetWorldPoints(surfaceLine)); feature.MetaData[RiskeerCommonUtilResources.MetaData_Name] = surfaceLine.Name; features[i] = feature; @@ -81,7 +81,7 @@ { PipingStochasticSoilModel stochasticSoilModel = stochasticSoilModels.ElementAt(i); - MapFeature feature = RingtoetsMapDataFeaturesFactory.CreateSingleLineMapFeature(GetWorldPoints(stochasticSoilModel)); + MapFeature feature = RiskeerMapDataFeaturesFactory.CreateSingleLineMapFeature(GetWorldPoints(stochasticSoilModel)); feature.MetaData[RiskeerCommonUtilResources.MetaData_Name] = stochasticSoilModel.Name; features[i] = feature; @@ -118,7 +118,7 @@ calculation.InputParameters.SurfaceLine.ReferenceLineIntersectionWorldPoint, calculation.InputParameters.HydraulicBoundaryLocation)).ToArray(); - return RingtoetsMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); + return RiskeerMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); } private static IEnumerable GetWorldPoints(PipingSurfaceLine surfaceLine) Index: Riskeer/Piping/src/Riskeer.Piping.Forms/Views/PipingFailureMechanismView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Piping/src/Riskeer.Piping.Forms/Views/PipingFailureMechanismView.cs (.../PipingFailureMechanismView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Piping/src/Riskeer.Piping.Forms/Views/PipingFailureMechanismView.cs (.../PipingFailureMechanismView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -165,16 +165,16 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(PipingDataResources.PipingFailureMechanism_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - stochasticSoilModelsMapData = RingtoetsMapDataFactory.CreateStochasticSoilModelsMapData(); - surfaceLinesMapData = RingtoetsMapDataFactory.CreateSurfaceLinesMapData(); - calculationsMapData = RingtoetsMapDataFactory.CreateCalculationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + stochasticSoilModelsMapData = RiskeerMapDataFactory.CreateStochasticSoilModelsMapData(); + surfaceLinesMapData = RiskeerMapDataFactory.CreateSurfaceLinesMapData(); + calculationsMapData = RiskeerMapDataFactory.CreateCalculationsMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -333,7 +333,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion @@ -349,7 +349,7 @@ private void SetReferenceLineMapData() { ReferenceLine referenceLine = AssessmentSection.ReferenceLine; - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); } #endregion @@ -370,9 +370,9 @@ { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion Index: Riskeer/Piping/src/Riskeer.Piping.Forms/Views/PipingInputView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Piping/src/Riskeer.Piping.Forms/Views/PipingInputView.cs (.../PipingInputView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Piping/src/Riskeer.Piping.Forms/Views/PipingInputView.cs (.../PipingInputView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -71,14 +71,14 @@ calculationInputObserver = new Observer(UpdateViewData); chartDataCollection = new ChartDataCollection(RiskeerCommonFormsResources.Calculation_Input); - soilProfileChartData = RingtoetsChartDataFactory.CreateSoilProfileChartData(); - surfaceLineChartData = RingtoetsChartDataFactory.CreateSurfaceLineChartData(); - ditchPolderSideChartData = RingtoetsChartDataFactory.CreateDitchPolderSideChartData(); - bottomDitchPolderSideChartData = RingtoetsChartDataFactory.CreateBottomDitchPolderSideChartData(); - bottomDitchDikeSideChartData = RingtoetsChartDataFactory.CreateBottomDitchDikeSideChartData(); - ditchDikeSideChartData = RingtoetsChartDataFactory.CreateDitchDikeSideChartData(); - dikeToeAtPolderChartData = RingtoetsChartDataFactory.CreateDikeToeAtPolderChartData(); - dikeToeAtRiverChartData = RingtoetsChartDataFactory.CreateDikeToeAtRiverChartData(); + soilProfileChartData = RiskeerChartDataFactory.CreateSoilProfileChartData(); + surfaceLineChartData = RiskeerChartDataFactory.CreateSurfaceLineChartData(); + ditchPolderSideChartData = RiskeerChartDataFactory.CreateDitchPolderSideChartData(); + bottomDitchPolderSideChartData = RiskeerChartDataFactory.CreateBottomDitchPolderSideChartData(); + bottomDitchDikeSideChartData = RiskeerChartDataFactory.CreateBottomDitchDikeSideChartData(); + ditchDikeSideChartData = RiskeerChartDataFactory.CreateDitchDikeSideChartData(); + dikeToeAtPolderChartData = RiskeerChartDataFactory.CreateDikeToeAtPolderChartData(); + dikeToeAtRiverChartData = RiskeerChartDataFactory.CreateDikeToeAtRiverChartData(); exitPointChartData = PipingChartDataFactory.CreateExitPointChartData(); entryPointChartData = PipingChartDataFactory.CreateEntryPointChartData(); Index: Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -117,7 +117,7 @@ yield return new ImportInfo { Name = RiskeerCommonDataResources.SurfaceLineCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = PipingFormsResources.PipingSurfaceLineIcon, FileFilterGenerator = PipingSurfaceLineFileFilter, IsEnabled = context => HasGeometry(context.AssessmentSection.ReferenceLine), @@ -132,7 +132,7 @@ yield return new ImportInfo { Name = RiskeerCommonDataResources.StochasticSoilModelCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = PipingFormsResources.PipingSoilProfileIcon, FileFilterGenerator = StochasticSoilModelFileFilter, IsEnabled = context => HasGeometry(context.AssessmentSection.ReferenceLine), @@ -145,7 +145,7 @@ VerifyUpdates = context => VerifyStochasticSoilModelUpdates(context, Resources.PipingPlugin_VerifyStochasticSoilModelImport_When_importing_StochasticSoilModels_calculation_output_will_be_cleared_confirm) }; - yield return RingtoetsImportInfoFactory.CreateCalculationConfigurationImportInfo( + yield return RiskeerImportInfoFactory.CreateCalculationConfigurationImportInfo( (context, filePath) => new PipingCalculationConfigurationImporter( filePath, @@ -156,11 +156,11 @@ public override IEnumerable GetExportInfos() { - yield return RingtoetsExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( (context, filePath) => new PipingCalculationConfigurationExporter(context.WrappedData.Children, filePath), context => context.WrappedData.Children.Any()); - yield return RingtoetsExportInfoFactory.CreateCalculationConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationConfigurationExportInfo( (context, filePath) => new PipingCalculationConfigurationExporter(new[] { context.WrappedData @@ -172,7 +172,7 @@ yield return new UpdateInfo { Name = RiskeerCommonDataResources.SurfaceLineCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = PipingFormsResources.PipingSurfaceLineIcon, FileFilterGenerator = PipingSurfaceLineFileFilter, IsEnabled = context => context.WrappedData.SourcePath != null, @@ -188,7 +188,7 @@ yield return new UpdateInfo { Name = RiskeerCommonDataResources.StochasticSoilModelCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = PipingFormsResources.PipingSoilProfileIcon, FileFilterGenerator = StochasticSoilModelFileFilter, IsEnabled = context => context.WrappedData.SourcePath != null, @@ -202,7 +202,7 @@ VerifyUpdates = context => VerifyStochasticSoilModelUpdates(context, Resources.PipingPlugin_VerifyStochasticSoilModelUpdates_When_updating_StochasticSoilModel_definitions_assigned_to_calculation_output_will_be_cleared_confirm) }; - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< PipingFailureMechanismSectionsContext, PipingFailureMechanism, PipingFailureMechanismSectionResult>( new PipingFailureMechanismSectionResultUpdateStrategy()); } Index: Riskeer/Revetment/src/Riskeer.Revetment.Forms/Factories/WaveConditionsChartDataFactory.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Revetment/src/Riskeer.Revetment.Forms/Factories/WaveConditionsChartDataFactory.cs (.../WaveConditionsChartDataFactory.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Revetment/src/Riskeer.Revetment.Forms/Factories/WaveConditionsChartDataFactory.cs (.../WaveConditionsChartDataFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -150,7 +150,7 @@ /// /// The to update the name for. /// The used for obtaining the name. - /// A default name is set (the same as in ) when: + /// A default name is set (the same as in ) when: /// /// is null; /// the foreshore profile in is null; Index: Riskeer/Revetment/src/Riskeer.Revetment.Forms/Factories/WaveConditionsChartDataPointsFactory.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Revetment/src/Riskeer.Revetment.Forms/Factories/WaveConditionsChartDataPointsFactory.cs (.../WaveConditionsChartDataPointsFactory.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Revetment/src/Riskeer.Revetment.Forms/Factories/WaveConditionsChartDataPointsFactory.cs (.../WaveConditionsChartDataPointsFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -33,7 +33,7 @@ { /// /// Factory for creating collections of to use in - /// (created via and ) . + /// (created via and ) . /// internal static class WaveConditionsChartDataPointsFactory { Index: Riskeer/Revetment/src/Riskeer.Revetment.Forms/Views/WaveConditionsInputView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/Revetment/src/Riskeer.Revetment.Forms/Views/WaveConditionsInputView.cs (.../WaveConditionsInputView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Revetment/src/Riskeer.Revetment.Forms/Views/WaveConditionsInputView.cs (.../WaveConditionsInputView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -100,7 +100,7 @@ hydraulicBoundaryLocationCalculationObserver.Observable = getHydraulicBoundaryLocationCalculationFunc(); chartDataCollection = new ChartDataCollection(RiskeerCommonFormsResources.Calculation_Input); - foreshoreChartData = RingtoetsChartDataFactory.CreateForeshoreGeometryChartData(); + foreshoreChartData = RiskeerChartDataFactory.CreateForeshoreGeometryChartData(); lowerBoundaryRevetmentChartData = WaveConditionsChartDataFactory.CreateLowerRevetmentBoundaryChartData(inputViewStyle.RevetmentLineColor); upperBoundaryRevetmentChartData = WaveConditionsChartDataFactory.CreateUpperRevetmentBoundaryChartData(inputViewStyle.RevetmentLineColor); lowerBoundaryWaterLevelsChartData = WaveConditionsChartDataFactory.CreateLowerWaterLevelsBoundaryChartData(); Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismView.cs (.../StabilityPointStructuresFailureMechanismView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismView.cs (.../StabilityPointStructuresFailureMechanismView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -169,16 +169,16 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(StabilityPointStructuresDataResources.StabilityPointStructuresFailureMechanism_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - foreshoreProfilesMapData = RingtoetsMapDataFactory.CreateForeshoreProfileMapData(); - calculationsMapData = RingtoetsMapDataFactory.CreateCalculationsMapData(); - structuresMapData = RingtoetsMapDataFactory.CreateStructuresMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + foreshoreProfilesMapData = RiskeerMapDataFactory.CreateForeshoreProfileMapData(); + calculationsMapData = RiskeerMapDataFactory.CreateCalculationsMapData(); + structuresMapData = RiskeerMapDataFactory.CreateStructuresMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -325,7 +325,7 @@ { IEnumerable> calculations = FailureMechanism.CalculationsGroup.GetCalculations().Cast>(); - calculationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateStructureCalculationsFeatures(calculations); + calculationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateStructureCalculationsFeatures(calculations); } #endregion @@ -340,7 +340,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion @@ -356,7 +356,7 @@ private void SetReferenceLineMapData() { ReferenceLine referenceLine = AssessmentSection.ReferenceLine; - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); } #endregion @@ -376,9 +376,9 @@ private void SetSectionsMapData() { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion @@ -394,7 +394,7 @@ private void SetStructuresMapData() { IEnumerable structures = FailureMechanism.StabilityPointStructures; - structuresMapData.Features = RingtoetsMapDataFeaturesFactory.CreateStructuresFeatures(structures); + structuresMapData.Features = RiskeerMapDataFeaturesFactory.CreateStructuresFeatures(structures); } #endregion @@ -410,7 +410,7 @@ private void SetForeshoreProfilesMapData() { IEnumerable foreshoreProfiles = FailureMechanism.ForeshoreProfiles; - foreshoreProfilesMapData.Features = RingtoetsMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); + foreshoreProfilesMapData.Features = RiskeerMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); } #endregion Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -207,7 +207,7 @@ new ImportMessageProvider(), new StabilityPointStructureReplaceStrategy(context.FailureMechanism)), Name = RiskeerCommonFormsResources.StructuresImporter_DisplayName, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = RiskeerCommonFormsResources.StructuresIcon, FileFilterGenerator = CreateStabilityPointStructureFileFilter(), IsEnabled = context => context.AssessmentSection.ReferenceLine.Points.Any(), @@ -216,7 +216,7 @@ RiskeerCommonIOResources.VerifyStructuresShouldUpdate_When_importing_Calculation_with_Structure_data_output_will_be_cleared_confirm) }; - yield return RingtoetsImportInfoFactory.CreateCalculationConfigurationImportInfo( + yield return RiskeerImportInfoFactory.CreateCalculationConfigurationImportInfo( (context, filePath) => new StabilityPointStructuresCalculationConfigurationImporter( filePath, context.WrappedData, @@ -228,11 +228,11 @@ public override IEnumerable GetExportInfos() { - yield return RingtoetsExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( (context, filePath) => new StabilityPointStructuresCalculationConfigurationExporter(context.WrappedData.Children, filePath), context => context.WrappedData.Children.Any()); - yield return RingtoetsExportInfoFactory.CreateCalculationConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationConfigurationExportInfo( (context, filePath) => new StabilityPointStructuresCalculationConfigurationExporter(new[] { context.WrappedData @@ -249,7 +249,7 @@ new UpdateMessageProvider(), new StabilityPointStructureUpdateDataStrategy(context.FailureMechanism)), Name = RiskeerCommonDataResources.StructureCollection_TypeDescriptor, - Category = RiskeerCommonFormsResources.Ringtoets_Category, + Category = RiskeerCommonFormsResources.Riskeer_Category, Image = RiskeerCommonFormsResources.StructuresIcon, FileFilterGenerator = CreateStabilityPointStructureFileFilter(), IsEnabled = context => context.WrappedData.SourcePath != null, @@ -259,7 +259,7 @@ RiskeerCommonIOResources.VerifyStructuresShouldUpdate_When_updating_Calculation_with_Structure_data_output_will_be_cleared_confirm) }; - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< StabilityPointStructuresFailureMechanismSectionsContext, StabilityPointStructuresFailureMechanism, StabilityPointStructuresFailureMechanismSectionResult>( new StabilityPointStructuresFailureMechanismSectionResultUpdateStrategy()); } Index: Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Forms/Factories/StabilityStoneCoverMapDataFeaturesFactory.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Forms/Factories/StabilityStoneCoverMapDataFeaturesFactory.cs (.../StabilityStoneCoverMapDataFeaturesFactory.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Forms/Factories/StabilityStoneCoverMapDataFeaturesFactory.cs (.../StabilityStoneCoverMapDataFeaturesFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -60,7 +60,7 @@ calculation.InputParameters.ForeshoreProfile.WorldReferencePoint, calculation.InputParameters.HydraulicBoundaryLocation)).ToArray(); - return RingtoetsMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); + return RiskeerMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); } } } \ No newline at end of file Index: Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Forms/Views/StabilityStoneCoverFailureMechanismView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Forms/Views/StabilityStoneCoverFailureMechanismView.cs (.../StabilityStoneCoverFailureMechanismView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Forms/Views/StabilityStoneCoverFailureMechanismView.cs (.../StabilityStoneCoverFailureMechanismView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -163,15 +163,15 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(StabilityStoneCoverDataResources.StabilityStoneCoverFailureMechanism_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - foreshoreProfilesMapData = RingtoetsMapDataFactory.CreateForeshoreProfileMapData(); - calculationsMapData = RingtoetsMapDataFactory.CreateCalculationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + foreshoreProfilesMapData = RiskeerMapDataFactory.CreateForeshoreProfileMapData(); + calculationsMapData = RiskeerMapDataFactory.CreateCalculationsMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -323,7 +323,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion @@ -339,7 +339,7 @@ private void SetReferenceLineMapData() { ReferenceLine referenceLine = AssessmentSection.ReferenceLine; - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); } #endregion @@ -360,9 +360,9 @@ { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion @@ -378,7 +378,7 @@ private void SetForeshoreProfilesMapData() { IEnumerable foreshoreProfiles = FailureMechanism.ForeshoreProfiles; - foreshoreProfilesMapData.Features = RingtoetsMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); + foreshoreProfilesMapData.Features = RiskeerMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); } #endregion Index: Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs (.../StabilityStoneCoverPlugin.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs (.../StabilityStoneCoverPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -182,7 +182,7 @@ public override IEnumerable GetImportInfos() { - yield return RingtoetsImportInfoFactory.CreateCalculationConfigurationImportInfo( + yield return RiskeerImportInfoFactory.CreateCalculationConfigurationImportInfo( (context, filePath) => new AssessmentSectionCategoryWaveConditionsCalculationConfigurationImporter( filePath, @@ -217,11 +217,11 @@ RiskeerCommonFormsResources.DataTypeDisplayName_csv_file_filter_Description) }; - yield return RingtoetsExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( (context, filePath) => new AssessmentSectionCategoryWaveConditionsCalculationConfigurationExporter(context.WrappedData.Children, filePath), context => context.WrappedData.Children.Any()); - yield return RingtoetsExportInfoFactory.CreateCalculationConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationConfigurationExportInfo( (context, filePath) => new AssessmentSectionCategoryWaveConditionsCalculationConfigurationExporter(new[] { context.WrappedData @@ -230,7 +230,7 @@ public override IEnumerable GetUpdateInfos() { - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< StabilityStoneCoverFailureMechanismSectionsContext, StabilityStoneCoverFailureMechanism, StabilityStoneCoverFailureMechanismSectionResult>( new StabilityStoneCoverFailureMechanismSectionResultUpdateStrategy()); } Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/Factories/WaveImpactAsphaltCoverMapDataFeaturesFactory.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/Factories/WaveImpactAsphaltCoverMapDataFeaturesFactory.cs (.../WaveImpactAsphaltCoverMapDataFeaturesFactory.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/Factories/WaveImpactAsphaltCoverMapDataFeaturesFactory.cs (.../WaveImpactAsphaltCoverMapDataFeaturesFactory.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -60,7 +60,7 @@ calculation.InputParameters.ForeshoreProfile.WorldReferencePoint, calculation.InputParameters.HydraulicBoundaryLocation)).ToArray(); - return RingtoetsMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); + return RiskeerMapDataFeaturesFactory.CreateCalculationFeatures(calculationData); } } } \ No newline at end of file Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/Views/WaveImpactAsphaltCoverFailureMechanismView.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/Views/WaveImpactAsphaltCoverFailureMechanismView.cs (.../WaveImpactAsphaltCoverFailureMechanismView.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/Views/WaveImpactAsphaltCoverFailureMechanismView.cs (.../WaveImpactAsphaltCoverFailureMechanismView.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -163,15 +163,15 @@ private void CreateMapData() { mapDataCollection = new MapDataCollection(WaveImpactAsphaltCoverDataResources.WaveImpactAsphaltCoverFailureMechanism_DisplayName); - referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); - hydraulicBoundaryLocationsMapData = RingtoetsMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); - foreshoreProfilesMapData = RingtoetsMapDataFactory.CreateForeshoreProfileMapData(); - calculationsMapData = RingtoetsMapDataFactory.CreateCalculationsMapData(); + referenceLineMapData = RiskeerMapDataFactory.CreateReferenceLineMapData(); + hydraulicBoundaryLocationsMapData = RiskeerMapDataFactory.CreateHydraulicBoundaryLocationsMapData(); + foreshoreProfilesMapData = RiskeerMapDataFactory.CreateForeshoreProfileMapData(); + calculationsMapData = RiskeerMapDataFactory.CreateCalculationsMapData(); - MapDataCollection sectionsMapDataCollection = RingtoetsMapDataFactory.CreateSectionsMapDataCollection(); - sectionsMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsMapData(); - sectionsStartPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); - sectionsEndPointMapData = RingtoetsMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); + MapDataCollection sectionsMapDataCollection = RiskeerMapDataFactory.CreateSectionsMapDataCollection(); + sectionsMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsMapData(); + sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); + sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); MapDataCollection assemblyMapDataCollection = AssemblyMapDataFactory.CreateAssemblyMapDataCollection(); tailorMadeAssemblyMapData = AssemblyMapDataFactory.CreateTailorMadeAssemblyMapData(); @@ -323,7 +323,7 @@ private void SetHydraulicBoundaryLocationsMapData() { - hydraulicBoundaryLocationsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); + hydraulicBoundaryLocationsMapData.Features = RiskeerMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeatures(AssessmentSection); } #endregion @@ -339,7 +339,7 @@ private void SetReferenceLineMapData() { ReferenceLine referenceLine = AssessmentSection.ReferenceLine; - referenceLineMapData.Features = RingtoetsMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); + referenceLineMapData.Features = RiskeerMapDataFeaturesFactory.CreateReferenceLineFeatures(referenceLine, AssessmentSection.Id, AssessmentSection.Name); } #endregion @@ -360,9 +360,9 @@ { IEnumerable failureMechanismSections = FailureMechanism.Sections; - sectionsMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); - sectionsStartPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); - sectionsEndPointMapData.Features = RingtoetsMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); + sectionsMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionFeatures(failureMechanismSections); + sectionsStartPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionStartPointFeatures(failureMechanismSections); + sectionsEndPointMapData.Features = RiskeerMapDataFeaturesFactory.CreateFailureMechanismSectionEndPointFeatures(failureMechanismSections); } #endregion @@ -378,7 +378,7 @@ private void SetForeshoreProfilesMapData() { IEnumerable foreshoreProfiles = FailureMechanism.ForeshoreProfiles; - foreshoreProfilesMapData.Features = RingtoetsMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); + foreshoreProfilesMapData.Features = RiskeerMapDataFeaturesFactory.CreateForeshoreProfilesFeatures(foreshoreProfiles); } #endregion Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r5fd764f8bc968f35e200824a360b44a0a02fdf3e --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 5fd764f8bc968f35e200824a360b44a0a02fdf3e) @@ -124,7 +124,7 @@ public override IEnumerable GetImportInfos() { - yield return RingtoetsImportInfoFactory.CreateCalculationConfigurationImportInfo( + yield return RiskeerImportInfoFactory.CreateCalculationConfigurationImportInfo( (context, filePath) => new AssessmentSectionCategoryWaveConditionsCalculationConfigurationImporter( filePath, @@ -219,11 +219,11 @@ RiskeerCommonFormsResources.DataTypeDisplayName_csv_file_filter_Description) }; - yield return RingtoetsExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationGroupConfigurationExportInfo( (context, filePath) => new AssessmentSectionCategoryWaveConditionsCalculationConfigurationExporter(context.WrappedData.Children, filePath), context => context.WrappedData.Children.Any()); - yield return RingtoetsExportInfoFactory.CreateCalculationConfigurationExportInfo( + yield return RiskeerExportInfoFactory.CreateCalculationConfigurationExportInfo( (context, filePath) => new AssessmentSectionCategoryWaveConditionsCalculationConfigurationExporter(new[] { context.WrappedData @@ -232,7 +232,7 @@ public override IEnumerable GetUpdateInfos() { - yield return RingtoetsUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< + yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< WaveImpactAsphaltCoverFailureMechanismSectionsContext, WaveImpactAsphaltCoverFailureMechanism, WaveImpactAsphaltCoverFailureMechanismSectionResult>( new WaveImpactAsphaltCoverFailureMechanismSectionResultUpdateStrategy()); }