Index: DamClients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlInput.cs =================================================================== diff -u -r921 -r932 --- DamClients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlInput.cs (.../FillDamUiFromXmlInput.cs) (revision 921) +++ DamClients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlInput.cs (.../FillDamUiFromXmlInput.cs) (revision 932) @@ -48,6 +48,8 @@ ValidateInput(input); var damProjectData = new DamProjectData(); + // Currently do nothing with input.ProjectWorkingPath + damProjectData.WaterBoard = new WaterBoard(); damProjectData.WaterBoard.Dikes = new List(); damProjectData.WaterBoard.Dikes.Add(new Dike()); @@ -323,7 +325,7 @@ if (inputLocation.StabilityOptions != null) { location.MapForSoilGeometries2D = inputLocation.StabilityOptions.MapForSoilgeometries2D; - location.SoildatabaseName = inputLocation.StabilityOptions.SoilDatabase; + location.SoildatabaseName = inputLocation.StabilityOptions.SoilDatabaseName; location.StabilityZoneType = ConversionHelper.ConvertToZoneType(inputLocation.StabilityOptions.ZoneType); if (inputLocation.StabilityOptions.ForbiddenZoneFactorSpecified) { Index: DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs =================================================================== diff -u -r875 -r932 --- DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs (.../FillXmlInputFromDamUiTests.cs) (revision 875) +++ DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs (.../FillXmlInputFromDamUiTests.cs) (revision 932) @@ -51,7 +51,7 @@ DamProjectData expectedDamProjectData = CreateExampleDamProjectData(); // Write input file - Input input = FillXmlInputFromDamUi.CreateInput(expectedDamProjectData); + Input input = FillXmlInputFromDamUi.CreateInput(expectedDamProjectData, ""); DamXmlSerialization.SaveInputAsXmlFile(inputFilename, input); // Init static that is to be loaded with not expected value @@ -70,7 +70,7 @@ DamProjectData expectedDamProjectData = CreateExampleDamProjectData(); // Write input string - Input input = FillXmlInputFromDamUi.CreateInput(expectedDamProjectData); + Input input = FillXmlInputFromDamUi.CreateInput(expectedDamProjectData, ""); string inputXml = DamXmlSerialization.SaveInputAsXmlString(input); // Init static that is to be loaded with not expected value Index: DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs =================================================================== diff -u -r875 -r932 --- DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 875) +++ DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 932) @@ -652,7 +652,7 @@ try { - Input input = FillXmlInputFromDamUi.CreateInput(damProject.DamProjectData); + Input input = FillXmlInputFromDamUi.CreateInput(damProject.DamProjectData, damProject.ProjectMap); // Next 2 lines for debugging const string inputFilename = "InputFile.xml"; Index: DamClients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillXmlInputFromDamUi.cs =================================================================== diff -u -r921 -r932 --- DamClients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillXmlInputFromDamUi.cs (.../FillXmlInputFromDamUi.cs) (revision 921) +++ DamClients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillXmlInputFromDamUi.cs (.../FillXmlInputFromDamUi.cs) (revision 932) @@ -39,15 +39,16 @@ /// Creates the input. /// /// The dam project data. + /// The project map. /// - public static Input CreateInput(DamProjectData damProjectData) + public static Input CreateInput(DamProjectData damProjectData, string projectMap) { ValidateDamProjectData(damProjectData); Input input = new Input(); Dike dike = damProjectData.WaterBoard.Dikes[0]; - input.WorkingDir = Directory.GetCurrentDirectory(); + input.ProjectWorkingPath = projectMap; TransferAnalysisSpecification(damProjectData, input); TransferStabilityParameters(damProjectData, input); @@ -374,7 +375,7 @@ inputLocation.StabilityOptions = new LocationStabilityOptions { MapForSoilgeometries2D = location.MapForSoilGeometries2D, - SoilDatabase = location.SoildatabaseName, + SoilDatabaseName = location.SoildatabaseName, ZoneType = ConversionHelper.ConvertToInputZoneType(location.StabilityZoneType), ForbiddenZoneFactorSpecified = true, ForbiddenZoneFactor = location.ForbiddenZoneFactor, Index: DamClients/DamUI/trunk/src/Dam/Data/DamProject.cs =================================================================== diff -u -r875 -r932 --- DamClients/DamUI/trunk/src/Dam/Data/DamProject.cs (.../branches/CalcualtionIncluded/src/Dam/Data/DamProject.cs) (revision 875) +++ DamClients/DamUI/trunk/src/Dam/Data/DamProject.cs (.../trunk/src/Dam/Data/DamProject.cs) (revision 932) @@ -1,18 +1,29 @@ -//----------------------------------------------------------------------- -// -// Copyright (c) 2011 Deltares. All rights reserved. -// -// J. Bokma -// j.bokma@deltares.nl -// 02-02-2011 -// n.a. -//----------------------------------------------------------------------- +// Copyright (C) Stichting Deltares 2018. All rights reserved. +// +// This file is part of the application DAM - UI. +// +// DAM - UI 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.Globalization; using System.Linq; using Deltares.Dam.Data.DataPlugins.Configuration; -using Deltares.Geotechnics; using Deltares.Soilbase; using Deltares.Standard.EventPublisher; using Deltares.Standard.IO.DtoAssembler; @@ -42,7 +53,6 @@ public static ProjectPathLocation ProjectWorkingPathLocation = ProjectPathLocation.InApplicationMap; public static string UserWorkingPath = DamProject.GetNewTempDirectory(); public static string ProjectMapWorkingPath = DamProject.GetNewTempDirectory(); - public static string ProjectMap = ""; public DamProject() { @@ -69,6 +79,8 @@ } } + public string ProjectMap = ""; + public string ProjectFileName { get { return this.projectFileName; } @@ -602,7 +614,7 @@ public void SaveXMLProject(string fileName, object project) { fileName = Path.ChangeExtension(fileName, "damx"); - string orgProjectMap = DamProject.ProjectMap; + string orgProjectMap = ProjectMap; ProjectFileName = fileName; DataEventPublisher.InvokeWithoutPublishingEvents(() => { Index: DamClients/DamUI/trunk/src/Dam/Tests/DamPipingBenchmarkTest.cs =================================================================== diff -u -r875 -r932 --- DamClients/DamUI/trunk/src/Dam/Tests/DamPipingBenchmarkTest.cs (.../DamPipingBenchmarkTest.cs) (revision 875) +++ DamClients/DamUI/trunk/src/Dam/Tests/DamPipingBenchmarkTest.cs (.../DamPipingBenchmarkTest.cs) (revision 932) @@ -52,7 +52,7 @@ Assert.AreEqual(1, dike.Locations.Count); damProjectData.DamProjectCalculationSpecification.CurrentSpecification.PipingModelType = pipingModel; - DamEngine.Io.XmlInput.Input input = FillXmlInputFromDamUi.CreateInput(damProjectData); + DamEngine.Io.XmlInput.Input input = FillXmlInputFromDamUi.CreateInput(damProjectData, ""); string inputXml = DamXmlSerialization.SaveInputAsXmlString(input); var damEnginInterface = new EngineInterface(inputXml);