Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Location.cs
===================================================================
diff -u -r6173 -r6220
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Location.cs (.../Location.cs) (revision 6173)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Location.cs (.../Location.cs) (revision 6220)
@@ -1514,11 +1514,6 @@
public void Dispose()
{
- if (surfaceLine != null)
- {
- surfaceLine.Dispose();
- }
-
if (LocalXZSurfaceLine2 != null)
{
LocalXZSurfaceLine2.Dispose();
@@ -2212,63 +2207,5 @@
}
#endregion
-
- #region Backwards compatibility
-
-#pragma warning disable CS0618 // Type or member is obsolete
- private SurfaceLine surfaceLine;
-#pragma warning restore CS0618 // Type or member is obsolete
-
- [Obsolete("Do not use this property; Only exists for backwards compatibility.", true)]
- [Browsable(false)]
- public virtual SurfaceLine LocalXZSurfaceLine
- {
- get
- {
- return null;
- }
- set
- {
- // Convert persisted 'old style surfaceline' into the new format, and discard the old one.
- LocalXZSurfaceLine2 = new OldSurfaceLineToNewConverter().Convert(value);
- value.Dispose();
- }
- }
-
- ///
- /// Gets or sets the surface line
- ///
- /// Aggregate relationship from .
- [Browsable(false)]
- [Obsolete("Do not use this property; Exists only for backwards compatibility.", true)]
- public virtual SurfaceLine SurfaceLine
- {
- get
- {
- return surfaceLine;
- }
- set
- {
- surfaceLine = value;
- }
- }
-
- ///
- /// Allows this location instance to update its
- /// property if an old-style surfaceline was persisted.
- ///
- /// The potential replacement candidate for a persisted
- /// old-style surfaceline.
- public void SetNewSurfaceLineIfMatchesWithOldPersistedSurfaceLine(SurfaceLine2 otherSurfaceline)
- {
- if (surfaceLine != null && Equals(otherSurfaceline.Name, surfaceLine.Name))
- {
- SurfaceLine2 = otherSurfaceline;
-
- surfaceLine.Dispose();
- surfaceLine = null;
- }
- }
-
- #endregion
+
}
\ No newline at end of file
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvImporters/SurfaceLineCsvColumnNames.cs
===================================================================
diff -u -r4539 -r6220
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvImporters/SurfaceLineCsvColumnNames.cs (.../SurfaceLineCsvColumnNames.cs) (revision 4539)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvImporters/SurfaceLineCsvColumnNames.cs (.../SurfaceLineCsvColumnNames.cs) (revision 6220)
@@ -22,13 +22,13 @@
namespace Deltares.Dam.Data.CsvImporters;
///
-/// Defines column name definitions used for importing csv data surfacelines
+/// Defines column name definitions used for importing csv data surface lines
///
public static class SurfaceLineCsvColumnNames
{
// The following 2 fields point to the same data
- // location_id is the preferred columnname
- // Profielnaam is used for backward compatiblity
+ // location_id is the preferred column name
+ // Profielnaam is used for backward compatibility
public const string LocationColumnName = "LocationId";
public const string ProfileNameColumnName = "Profielnaam";
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProject.cs
===================================================================
diff -u -r4931 -r6220
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProject.cs (.../DamProject.cs) (revision 4931)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProject.cs (.../DamProject.cs) (revision 6220)
@@ -297,53 +297,40 @@
if (damProjectData != null)
{
damProjectData.VersionInfo.InitVersionInfoAfterRead();
-
- if (damProjectData.DamProjectType == DamProjectType.AssessOld)
+
+ string damProjectVersion = damProjectVersionXmlHandler.GetDamProjectVersion();
+ UpdateVersionInfoForNonVersionedFiles(damProjectVersion);
+ damProjectVersion = GetMainVersion(damProjectVersion);
+ if (damProjectVersion != null)
{
- ClearProject();
- damProjectData.DamProjectType = DamProjectType.AssessOld;
- }
- else
- {
- string damProjectVersion = damProjectVersionXmlHandler.GetDamProjectVersion();
- UpdateVersionInfoForNonVersionedFiles(damProjectVersion);
- damProjectVersion = GetMainVersion(damProjectVersion);
- if (damProjectVersion != null)
+ string currentProgramVersion = About.Version;
+ if (currentProgramVersion == null)
{
- string currentProgramVersion = About.Version;
- if (currentProgramVersion == null)
+ currentProgramVersion = testProgramVersion;
+ }
+
+ currentProgramVersion = GetMainVersion(currentProgramVersion);
+ if (!currentProgramVersion.Equals(damProjectVersion))
+ {
+ if (IsOutDatedFileSupported(damProjectData))
{
- currentProgramVersion = testProgramVersion;
+ damProjectData.ClearResults();
}
-
- currentProgramVersion = GetMainVersion(currentProgramVersion);
- if (!currentProgramVersion.Equals(damProjectVersion))
+ else
{
- if (IsOutDatedFileSupported(damProjectData))
- {
- damProjectData.ClearResults();
- }
- else
- {
- ClearProject();
- string message =
- LocalizationManager.GetTranslatedText(this, "UnsupportedDamProjectFile");
- LogManager.Messages.Add(new LogMessage(LogMessageType.Error, DamProjectData,
- message));
- }
+ ClearProject();
+ string message =
+ LocalizationManager.GetTranslatedText(this, "UnsupportedDamProjectFile");
+ LogManager.Messages.Add(new LogMessage(LogMessageType.Error, DamProjectData,
+ message));
}
}
}
}
-
- // Project still needs a reference to soilmaterials database; to be resolved later.
- // This will become obsolete as soon as Delphi DGeoStability version is no longer used.
- ResolveBackwardCompatibility();
});
// Add stability as standard mechanism when not yet available.
- if (!damProjectData.DamProjectCalculationSpecification.DamCalculationSpecifications.Any()
- && damProjectData.DamProjectType != DamProjectType.AssessOld)
+ if (!damProjectData.DamProjectCalculationSpecification.DamCalculationSpecifications.Any())
{
damProjectData.DamProjectCalculationSpecification.DamCalculationSpecifications.Add(new DamFailureMechanismeCalculationSpecification());
UpdateForOlderProjects();
@@ -562,18 +549,6 @@
return true;
}
- private void ResolveBackwardCompatibility()
- {
- if (DamProjectData.VersionInfo.FileVersionAsRead < DamProjectData.VersionInfo.FileVersion)
- {
- string migrationMessage = LocalizationManager.GetTranslatedText(this, "OpenProjectWarningFileVersion");
- LogManager.Messages.Add(new LogMessage(LogMessageType.Warning, DamProjectData, migrationMessage));
- migrationMessage = LocalizationManager.GetTranslatedText(this, "ZoneTypeWarning");
- LogManager.Messages.Add(new LogMessage(LogMessageType.Warning, DamProjectData, migrationMessage));
- BackwardCompatibility.Update(DamProjectData, ProjectFileName, DamProjectData.VersionInfo.FileVersionAsRead);
- }
- }
-
///
/// Updates older projects for missing data or changed data model.
///
Index: DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs
===================================================================
diff -u -r6125 -r6220
--- DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 6125)
+++ DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 6220)
@@ -250,13 +250,6 @@
return;
}
- if (projectData.DamProjectType == DamProjectType.AssessOld)
- {
- MessageBox.Show(LocalizationManager.GetTranslatedText(projectData, "InvalidDamProjectType"),
- LocalizationManager.GetTranslatedText(projectData, "DamProjectType"), MessageBoxButtons.OK);
- projectData.ClearResults();
- }
-
initial = false;
// var args = Environment.GetCommandLineArgs();
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Segment.cs
===================================================================
diff -u -r5954 -r6220
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Segment.cs (.../Segment.cs) (revision 5954)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Segment.cs (.../Segment.cs) (revision 6220)
@@ -35,9 +35,8 @@
public virtual string SoilGeometry2DName { get; set; }
public virtual SoilProfile2D SoilProfile2D { get; set; }
public virtual FailureMechanismSystemType? SegmentFailureMechanismType { get; set; }
- public virtual double Probability { get; set; } // Probability of occurance; number between 0.0 and 100.0
+ public virtual double Probability { get; set; } // Probability of occurence; number between 0.0 and 100.0
- [XmlOldName("SoilGeometryType")]
public SoilProfileType SoilProfileType
{
get
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Translations.xml
===================================================================
diff -u -r5954 -r6220
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Translations.xml (.../Translations.xml) (revision 5954)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Translations.xml (.../Translations.xml) (revision 6220)
@@ -205,25 +205,15 @@
-
-
-
-
+
-
-
-
-
-
-
+
+
@@ -265,7 +255,6 @@
-
@@ -577,12 +566,10 @@
-
-
-
-
+
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationImportHelper.cs
===================================================================
diff -u -r4698 -r6220
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationImportHelper.cs (.../LocationImportHelper.cs) (revision 4698)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationImportHelper.cs (.../LocationImportHelper.cs) (revision 6220)
@@ -129,13 +129,10 @@
var translationTable = new Dictionary
{
{
- "nozones", MStabZonesType.NoZones
+ "NoZones", MStabZonesType.NoZones
},
{
- "zoneareas", MStabZonesType.NoZones // ZoneAreas is no longer supported, it is replaced by NoZones
- },
- {
- "forbiddenzone", MStabZonesType.ForbiddenZone
+ "ForbiddenZone", MStabZonesType.ForbiddenZone
}
};
string key = value.ToLowerInvariant();
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Dike.cs
===================================================================
diff -u -r5954 -r6220
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Dike.cs (.../Dike.cs) (revision 5954)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Dike.cs (.../Dike.cs) (revision 6220)
@@ -65,13 +65,6 @@
locations = new List();
soilProfiles = new List();
-
-#pragma warning disable CS0618 // Type or member is obsolete
- surfaceLines = new DelegatedList
-#pragma warning restore CS0618 // Type or member is obsolete
- {
- AddMethod = ConvertAddedOldSurfaceLineToNewFormat
- };
SurfaceLines2 = new List();
pl1Lines = new List();
soilList = new SoilList();
@@ -646,48 +639,4 @@
Locations = newLocations;
return logMessages;
}
-
- #region Backwards compatibility
-
-#pragma warning disable CS0618 // Type or member is obsolete
- private IList surfaceLines;
-#pragma warning restore CS0618 // Type or member is obsolete
-
- ///
- /// Gets or sets all surface lines instances associated with this dike.
- ///
- ///
- /// Composite owner of all that are part of the
- /// application that are associated with this dike.
- ///
- [Obsolete("Do not use this member; Only exists for backwards compatibility.", true)]
- public virtual IList SurfaceLines
- {
- get => surfaceLines;
- set => surfaceLines = value;
- }
-
- ///
- /// Performs backwards compatibility conversion from old-style surfaceline to new-style
- /// surfaceline, and ensures that shared references are set correctly.
- ///
- /// Persisted version of the old-style surfaceline.
-#pragma warning disable CS0618 // Type or member is obsolete
- private void ConvertAddedOldSurfaceLineToNewFormat(SurfaceLine argument)
-#pragma warning restore CS0618 // Type or member is obsolete
- {
- SurfaceLine2 surfaceLine2 = new OldSurfaceLineToNewConverter().Convert(argument);
- SurfaceLines2.Add(surfaceLine2);
-
- foreach (Location location in Locations)
- {
- location.SetNewSurfaceLineIfMatchesWithOldPersistedSurfaceLine(surfaceLine2);
- }
-
- // Remove old entry; it is no longer required.
- surfaceLines.Remove(argument);
- argument.Dispose();
- }
-
- #endregion
}
\ No newline at end of file
Fisheye: Tag 6220 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/IO/BackwardCompatibility.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DAMEnumerations.cs
===================================================================
diff -u -r6219 -r6220
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DAMEnumerations.cs (.../DAMEnumerations.cs) (revision 6219)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DAMEnumerations.cs (.../DAMEnumerations.cs) (revision 6220)
@@ -37,27 +37,21 @@
public enum DamProjectType
{
Calamity,
-
- [XmlOldName("Assessment")]
- AssessOld,
Design,
DamLiveConfiguration
}
public enum AnalysisType
{
[Label("No adaptation")]
- [XmlOldName("Normal")]
NoAdaption,
[Label("Adapt geometry")]
- [XmlOldName("Design")]
AdaptGeometry
}
public enum FailureMechanismSystemType
{
- [XmlOldName("Stability", "StabilityInsideMStab")]
StabilityInside,
StabilityOutside,
Piping
@@ -88,7 +82,6 @@
public enum SoilProfileType
{
- [XmlOldName("SoilGeometry1D")]
SoilProfile1D,
SoilProfile2D
}
@@ -198,7 +191,7 @@
public enum ProjectPathLocation
{
- // Other future possibilties: InProjectMap, InWindowsTemp
+ // Other future possibilities: InProjectMap, InWindowsTemp
InApplicationMap,
InUserMap,
InProjectMap
@@ -211,16 +204,6 @@
BackgroundShapeFiles
}
-public enum LayerType
-{
- Top,
- Dike,
- Cover,
- Aquifer1,
- Aquifer2,
- Aquitard
-}
-
public enum JobResult
{
[Label("Not calculated")]
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/SoilGeometry.cs
===================================================================
diff -u -r5954 -r6220
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/SoilGeometry.cs (.../SoilGeometry.cs) (revision 5954)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/SoilGeometry.cs (.../SoilGeometry.cs) (revision 6220)
@@ -35,7 +35,7 @@
public class SoilGeometryBase
{
- [XmlOldName("SoilGeometryType")] public virtual SoilProfileType SoilProfileType { get; set; }
+ public virtual SoilProfileType SoilProfileType { get; set; }
public virtual string SoilGeometryName { get; set; }
}
@@ -56,7 +56,6 @@
#region PublicPropteries
- [XmlOldName("SoilGeometryType")]
public override SoilProfileType SoilProfileType
{
get
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Geometry2DData.cs
===================================================================
diff -u -r4931 -r6220
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Geometry2DData.cs (.../Geometry2DData.cs) (revision 4931)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Geometry2DData.cs (.../Geometry2DData.cs) (revision 6220)
@@ -29,7 +29,6 @@
{
public Geometry2DBoundaryLine boundaryLine;
public String soilName;
- public LayerType layerType;
}
public class Geometry2DDataException : Exception
@@ -61,13 +60,6 @@
return layers[index];
}
- public void SetLayertype(int layerIndex, LayerType layerType)
- {
- Geometry2DLayer layer = layers[layerIndex];
- layer.layerType = layerType;
- layers[layerIndex] = layer;
- }
-
public void Validate()
{
if (layers.Count > 1)