Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamHelperFunctions.cs
===================================================================
diff -u -r2089 -r3525
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamHelperFunctions.cs (.../DamHelperFunctions.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamHelperFunctions.cs (.../DamHelperFunctions.cs) (revision 3525)
@@ -91,20 +91,5 @@
// assemble the target project file name
return Path.Combine(stabilityWorkingPath, calculationName + ".sti");
}
-
- ///
- /// Gets the D-GeoStability executable path.
- ///
- ///
- /// The m stab executable path.
- ///
- public static string MStabExePath
- {
- get
- {
- return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
- @"DGeoStability.exe");
- }
- }
}
}
Index: DamClients/DamUI/trunk/lib/DamEngine/Deltares.DamEngine.Interface.pdb
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/Deltares.DamEngine.Version.dll
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/nl-NL/Deltares.DamEngine.Interface.resources.dll
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/Deltares.DamEngine.Data.dll
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/Deltares.DamEngine.Io.pdb
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/nl-NL/Deltares.DamEngine.Data.resources.dll
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/DGeoStability.exe
===================================================================
diff -u -r3028 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/Deltares.DamEngine.Calculators.dll
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/Deltares.DamEngine.Interface.dll
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/nl-NL/Deltares.DamEngine.Calculators.resources.dll
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/Deltares.DamEngine.Io.dll
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportDataException.cs
===================================================================
diff -u
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportDataException.cs (revision 0)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportDataException.cs (revision 3525)
@@ -0,0 +1,38 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of the application DAM - Clients Library.
+//
+// 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.Runtime.Serialization;
+
+namespace Deltares.Dam.Data
+{
+
+ [Serializable]
+ public class CsvExportDataException : Exception
+ {
+ public static string ExceptionMessage { get; set; }
+
+ public CsvExportDataException(string message) : base(message)
+ {
+ ExceptionMessage = message;
+ }
+ }
+}
\ No newline at end of file
Index: DamClients/DamUI/trunk/lib/DamEngine/Deltares.DamEngine.Version.pdb
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/DGSMStabDAM.dll
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/lib/DamEngine/Deltares.DamEngine.Data.pdb
===================================================================
diff -u -r3456 -r3525
Binary files differ
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj
===================================================================
diff -u -r3445 -r3525
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 3445)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 3525)
@@ -171,6 +171,7 @@
+
@@ -408,10 +409,6 @@
-
- DGeoStability.exe
- PreserveNewest
-
DGSMStabDAM.dll
PreserveNewest
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportData.cs
===================================================================
diff -u -r3459 -r3525
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportData.cs (.../CsvExportData.cs) (revision 3459)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportData.cs (.../CsvExportData.cs) (revision 3525)
@@ -207,7 +207,7 @@
{
if (!String.IsNullOrEmpty(BaseFileName))
{
- const string fileExtension = ".sti";
+ const string fileExtension = ".stix";
string fullBaseFilename = DamProject.ProjectWorkingPath;
if (CalculationSubDir != "")
@@ -1688,7 +1688,7 @@
break;
case FailureMechanismSystemType.Piping:
res = PipingFactor;
- break;
+ break;
}
return res;
}
@@ -1717,7 +1717,7 @@
break;
}
return res;
- }
+ }
}
[Format("F3")]
@@ -1799,7 +1799,7 @@
{
if (damFailureMechanismeCalculationSpecification.FailureMechanismSystemType == FailureMechanismSystemType.Piping)
{
- return damFailureMechanismeCalculationSpecification.PipingModelType;
+ return damFailureMechanismeCalculationSpecification.PipingModelType;
}
return null;
}
@@ -2043,50 +2043,46 @@
/// The extension.
private void CopyResultFile(string extension)
{
- string copyResFile = Path.GetDirectoryName(InputFile) + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(InputFile) + " (copy)" + extension;
+ string copyResFile = Path.GetDirectoryName(InputFile) + Path.DirectorySeparatorChar +
+ Path.GetFileNameWithoutExtension(InputFile) + " (copy)" + extension;
var resFile = Path.ChangeExtension(InputFile, extension);
if (resFile != null)
{
File.Copy(resFile, copyResFile, true);
}
}
- private string GetCurrentExeForOpenCalculationFile()
- {
- return DamHelperFunctions.MStabExePath;
- }
-
///
/// Opens the calculation file.
///
public void OpenCalculationFile()
{
if (File.Exists(InputFile))
{
- string copyFile = Path.GetDirectoryName(InputFile) + Path.DirectorySeparatorChar +
- Path.GetFileNameWithoutExtension(InputFile) + " (copy)" + Path.GetExtension(InputFile);
+ string copyFile = Path.GetDirectoryName(InputFile) + Path.DirectorySeparatorChar +
+ Path.GetFileNameWithoutExtension(InputFile) + " (copy)" +
+ Path.GetExtension(InputFile);
File.Copy(InputFile, copyFile, true);
- var exeName = GetCurrentExeForOpenCalculationFile();
- const string stdExtension = ".std";
- CopyResultFile(stdExtension);
-
- const string stoExtension = ".sto";
- CopyResultFile(stoExtension);
-
var process = new Process
{
- StartInfo =
+ StartInfo = new ProcessStartInfo(copyFile)
{
- RedirectStandardOutput = false,
- FileName = exeName
+ UseShellExecute = true,
+ WindowStyle = ProcessWindowStyle.Normal
}
};
-
- process.StartInfo.Arguments = " \"" + copyFile + "\"";
- process.StartInfo.UseShellExecute = false;
- process.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
- process.Start();
+ try
+ {
+ process.Start();
+ }
+ catch (Exception)
+ {
+ var exceptionMessage = string.Format(
+ "The file {0} could not be opened with D-Stability. Make sure files with the extension {1} are associated with D-Stability.",
+ InputFile, Path.GetExtension(InputFile));
+ throw new CsvExporterException(exceptionMessage);
+ }
}
else
{
@@ -2109,7 +2105,9 @@
public bool IsVisible(string property)
{
if (damFailureMechanismeCalculationSpecification == null)
+ {
return false;
+ }
switch (property)
{
case "StabilityModel":
@@ -2118,18 +2116,20 @@
damFailureMechanismeCalculationSpecification.FailureMechanismSystemType ==
FailureMechanismSystemType.StabilityOutside;
case "PipingModel":
- return damFailureMechanismeCalculationSpecification.FailureMechanismSystemType == FailureMechanismSystemType.Piping;
+ return damFailureMechanismeCalculationSpecification.FailureMechanismSystemType ==
+ FailureMechanismSystemType.Piping;
case "PipingFactor":
- return damFailureMechanismeCalculationSpecification.FailureMechanismSystemType == FailureMechanismSystemType.Piping;
+ return damFailureMechanismeCalculationSpecification.FailureMechanismSystemType ==
+ FailureMechanismSystemType.Piping;
case "HCritical":
- return damFailureMechanismeCalculationSpecification.FailureMechanismSystemType == FailureMechanismSystemType.Piping;
+ return damFailureMechanismeCalculationSpecification.FailureMechanismSystemType ==
+ FailureMechanismSystemType.Piping;
case "OpenCalculationFile":
- return damFailureMechanismeCalculationSpecification.FailureMechanismSystemType != FailureMechanismSystemType.Piping &&
- File.Exists(GetCurrentExeForOpenCalculationFile());
+ return damFailureMechanismeCalculationSpecification.FailureMechanismSystemType !=
+ FailureMechanismSystemType.Piping;
default:
return true;
}
-
- }
+ }
}
}
\ No newline at end of file
Index: DamClients/DamUI/trunk/lib/DamEngine/Deltares.DamEngine.Calculators.pdb
===================================================================
diff -u -r3456 -r3525
Binary files differ