Index: src/Deltares.DSoilModel.Forms/DSoilModelPlugin.cs =================================================================== diff -u -r599 -r604 --- src/Deltares.DSoilModel.Forms/DSoilModelPlugin.cs (.../DSoilModelPlugin.cs) (revision 599) +++ src/Deltares.DSoilModel.Forms/DSoilModelPlugin.cs (.../DSoilModelPlugin.cs) (revision 604) @@ -213,7 +213,7 @@ boringsTable.CanDelete = null; soilProfiles1DTable.CanDelete = null; soilProfiles2DTable.CanDelete = null; - + if (null != GeometryEditor) { GeometryEditor.Dispose(); @@ -236,7 +236,7 @@ DataEventPublisher.OnChanged -= DataEventPublisherOnChanged; DataEventPublisher.OnSelectionChanged -= DataEventPublisherOnSelectionChanged; } - + public void Configure(MainForm aMainForm) { mainForm = aMainForm; @@ -252,7 +252,7 @@ mainForm.RegisterOpenFileHandler("soil", "Soilbase files (*.soil)|*.soil", DSoilModelIO.OpenSoilDatabase); mainForm.RegisterSaveFileHandler("soil", "Soilbase files (*.soil)|*.soil", DSoilModelIO.SaveSoilDatabase); - + mainForm.UseSpatialEditor(); mainForm.UseProperties(); mainForm.UseTables(); @@ -311,7 +311,7 @@ if (modelProject != null) { project = modelProject; - project.CurrentFailureMechanism = Mechanism.None; + project.CurrentFailureMechanism = Mechanism.Everything; StochasticSoilProfile.GetProfiles = project.GetProfiles; ConePenetrationTestPerSegment.GetCpts = project.GetCpts; @@ -413,7 +413,7 @@ // NOTE: this method called with disabled DataEventPublisher. Take care of updating controls yourself. LogManager.Clear(); GeometryEditor.Clear(); - + return new DSoilModelProject(); } @@ -517,7 +517,7 @@ if (publishEventArgs.Property.Equals("CurrentFailureMechanism")) { - if (project.CurrentFailureMechanism != Mechanism.None) + if (project.CurrentFailureMechanism != Mechanism.Everything) { SetSoilUserFilterForMaterialTableToFilterAll(); EnableSoilUserFilterForMaterialTable(false); @@ -537,7 +537,7 @@ } } } - + if (sender == materialsTable) { if (publishEventArgs.Property.Equals("SelectedFilter")) @@ -612,7 +612,7 @@ { barManager.BeginUpdate(); - // Remove the "Calculation" menu. It is not required for D-Soil Model. + // Remove the "Calculation" menu. It is not required for D-Soil Model. int j = 0; while (j < menuBar.ItemLinks.Count) { @@ -1085,8 +1085,8 @@ { var formattedErrorStr = LocalizationManager.GetTranslatedText(this, "CannotDeleteObjectThatInUse"); - var msg = string.Format(formattedErrorStr, - objToDelete.Name, LocalizationManager.GetTranslatedText(objToDelete, objToDelete.GetType().Name), + var msg = string.Format(formattedErrorStr, + objToDelete.Name, LocalizationManager.GetTranslatedText(objToDelete, objToDelete.GetType().Name), objUses.Name, LocalizationManager.GetTranslatedText(objUses, objUses.GetType().Name)); LogManager.Add(new LogMessage(LogMessageType.Error, objToDelete, msg)); @@ -1102,10 +1102,10 @@ if (soil == null) { return true; - } - + } + var result = true; - // 1D profiles + // 1D profiles foreach (var sp1d in Project.SoilProfiles1D) { if (sp1d.Layers.Any(l => l.Soil == soil)) @@ -1115,7 +1115,7 @@ } } - // 2D profiles + // 2D profiles foreach (var sp2d in Project.SoilProfiles2D) { if (sp2d.Surfaces.Any(s => s.Soil == soil)) @@ -1126,7 +1126,7 @@ } // soil in the segments - foreach (var sgm in Project.SoilSegments.Where(sgm => sgm.DefaultFillMaterialName == soil)) + foreach (var sgm in Project.SoilSegments.Where(sgm => sgm.DefaultFillMaterialName == soil)) { LogErrorCannotDelete(soil, sgm); result = false; @@ -1141,7 +1141,7 @@ { return true; } - + var result = true; // cpt in lookups 1D foreach (var lookup in Project.CptLookup1Ds.Where(lookup => lookup.ConePenetrationTestData == cpt)) @@ -1218,7 +1218,7 @@ { foreach (var sp in sgm.StochasticSoilModel.StochasticSoilProfiles.Where(ssp => ssp.Profile == soilProfile)) { - LogErrorCannotDelete(soilProfile, sgm); + LogErrorCannotDelete(soilProfile, sgm); result = false; } } @@ -1261,7 +1261,7 @@ // with the selected CurrentMechanism of the project. Soil.Mechanisms = new[] { - Mechanism.None, + Mechanism.Everything, Mechanism.Piping, Mechanism.Stability, }; @@ -1274,9 +1274,9 @@ { Soil.AllowedUserColumnFilters = new[] { - UserColumnFilters.MacrostabilityWti, - UserColumnFilters.PipingWti, - UserColumnFilters.FlowSlideWti, + UserColumnFilters.MacrostabilityWti, + UserColumnFilters.PipingWti, + UserColumnFilters.FlowSlideWti, }; } @@ -1479,7 +1479,7 @@ DataEventPublisher.IsDataEventPublishStopped = false; DataEventPublisher.DataListModified(project.Soils.Soils); BindSupport.UpdateAll(); - project.CurrentFailureMechanism = Mechanism.None; + project.CurrentFailureMechanism = Mechanism.Everything; Project = project; CheckLogWarnings(countWarnings); } @@ -1511,7 +1511,7 @@ // reset project mapEditor.Project = project; - project.CurrentFailureMechanism = Mechanism.None; + project.CurrentFailureMechanism = Mechanism.Everything; // add Dam locations as background map if (!string.IsNullOrEmpty(locationsShpFile)) @@ -1578,7 +1578,7 @@ DataEventPublisher.IsDataEventPublishStopped = false; DataEventPublisher.DataListModified(project.Soils.Soils); BindSupport.UpdateAll(); - project.CurrentFailureMechanism = Mechanism.None; + project.CurrentFailureMechanism = Mechanism.Everything; mapEditor.Project = project; CheckLogWarnings(countWarnings); } @@ -1782,7 +1782,7 @@ DataEventPublisher.IsDataEventPublishStopped = false; DataEventPublisher.DataListModified(project.SurfaceLines); BindSupport.UpdateAll(); - project.CurrentFailureMechanism = Mechanism.None; + project.CurrentFailureMechanism = Mechanism.Everything; CheckLogWarnings(countWarnings); } @@ -1813,7 +1813,7 @@ if (Path.GetExtension(fileName) == ".csv") { DSoilModelIO.ReadCsvSegmentsFromFileAndAddToProject(fileName, project); - project.CurrentFailureMechanism = Mechanism.None; + project.CurrentFailureMechanism = Mechanism.Everything; } } } @@ -1833,7 +1833,7 @@ DataEventPublisher.DataListModified(project.SoilProfiles2D); DataEventPublisher.DataListModified(project.SoilSegments); BindSupport.UpdateAll(); - project.CurrentFailureMechanism = Mechanism.None; + project.CurrentFailureMechanism = Mechanism.Everything; } CheckLogWarnings(countWarnings); } @@ -1914,7 +1914,7 @@ DataEventPublisher.DataListModified(project.SoilSegments); BindSupport.UpdateAll(); - project.CurrentFailureMechanism = Mechanism.None; + project.CurrentFailureMechanism = Mechanism.Everything; mapEditor.ZoomData(); } CheckLogWarnings(countWarnings); @@ -1939,7 +1939,7 @@ finally { Cursor.Current = cuCursor; - } + } } } } @@ -2040,4 +2040,4 @@ filmStrip.Refresh(false); } } -} \ No newline at end of file +} Index: src/Deltares.DSoilModel.Data/DSoilModelIO.cs =================================================================== diff -u -r378 -r604 --- src/Deltares.DSoilModel.Data/DSoilModelIO.cs (.../DSoilModelIO.cs) (revision 378) +++ src/Deltares.DSoilModel.Data/DSoilModelIO.cs (.../DSoilModelIO.cs) (revision 604) @@ -169,7 +169,7 @@ catch (Exception ex) { string msg = String.Format(LocalizationManager.GetTranslatedText(typeof(DSoilModelIO), "ErrorSavingProject"), ex.Message); - MessageBox.Show(msg, "", MessageBoxButtons.OK, MessageBoxIcon.Warning); + MessageBox.Show(msg, "", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); } finally {