Index: DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs =================================================================== diff -u -r6540 -r6750 --- DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 6540) +++ DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 6750) @@ -133,7 +133,6 @@ private readonly LocationPropertyControl locationPropertyControl = new LocationPropertyControl(); private readonly DamSurfaceLineControl damSurfaceLineControl = new DamSurfaceLineControl(); private readonly DamProjectCalculationSpecificationPropertyControl damProjectCalculationSpecificationPropertyControl = new DamProjectCalculationSpecificationPropertyControl(); - private readonly WaterBoardPropertyControl waterBoardPropertyControl = new WaterBoardPropertyControl(); private readonly BarButtonItem showCalculationOptionsItem = new BarButtonItem(); private readonly MapEditor mapControl = new MapEditor(); private MainForm mainForm; @@ -347,7 +346,7 @@ return damProject != null && damProject.DamProjectData != null && damProject.DamProjectData.LocationJobs != null && - (damProject.DamProjectData.DamProjectType == DamProjectType.Calamity || + (damProject.DamProjectData.DamProjectType == DamProjectType.DamLiveConfiguration || damProject.DamProjectData.DamProjectType == DamProjectType.Design) && damProject.DamProjectData.LocationJobs.Count > 0; default: return true; @@ -482,9 +481,6 @@ dpc.BuildPropertyControlTabForTypes(new LocationScenariosControl(), typeof(Location), typeof(LocationJob)); dpc.BuildPropertyControlTabForTypes(damSurfaceLineControl, typeof(SurfaceLine2), typeof(CharacteristicPoint), typeof(LocationJob)); - progressDelegate = waterBoardPropertyControl.DoProgress; - dpc.BuildPropertyControlTabForTypes(waterBoardPropertyControl, - typeof(WaterBoard), typeof(WaterBoardJob), typeof(DamProjectData)); dpc.BuildPropertyControlTabForTypes(new DikePropertyControl(), typeof(Dike), typeof(DikeJob)); dpc.BuildPropertyControlTabForTypes(damProjectCalculationSpecificationPropertyControl, typeof(DamProjectData)); dpc.BuildPropertyControlTabForTypes(designCalculationPropertyControl, typeof(CsvExportData), typeof(LocationJob)); @@ -799,20 +795,7 @@ LogManager.Messages.AddRange(damProject.DamProjectData.CalculationMessages); mainForm.Invoke(new PublisherDelegate(DataEventPublisher.DataListModified), LogManager.Messages, null); } - - switch (damProject.DamProjectData.DamProjectType) - { - case DamProjectType.Calamity: - { - SetProperControlsAfterCalamityCalculation(); - break; - } - case DamProjectType.Design: - { - SetProperControlsAfterDesignCalculation(); - break; - } - } + SetProperControlsAfterDesignCalculation(); } private void SetProperControlsAfterDesignCalculation() @@ -839,29 +822,6 @@ } } - private void SetProperControlsAfterCalamityCalculation() - { - if (damProject.DamProjectData.GetFirstLocationJobWithCalamityResults() != null) - { - mainForm.SetAsActiveTable(locationsControl); - LocationResult res = - damProject.DamProjectData.GetFirstLocationJobWithCalamityResults().GetFirstLocationResultWithStabilityTimeSerie(); - if (res != null && - res.StabilityTimeSerie.GetNearestBasisFileName(locationJobSymbol.CurrentDateTime) != "") - { - // Make sure the image tab is activated to show the resulting wmf-file (if any) - mainForm.Invoke(new TaskDelegate(DataEventPublisher.SelectionChanged), res.StabilityTimeSerie); - mainForm.SetAsActiveTabOnMainPanel(mainForm.DynamicImageControl); - // Selecting the LocationJob makes sure of proper selected location - mainForm.Invoke(new TaskDelegate(DataEventPublisher.SelectionChanged), - damProject.DamProjectData.GetFirstLocationJobWithCalamityResults()); - // Set chart as active tab as this is the only control that actually displays the results next to the wmf-pictures - // displayed on the image tab - mainForm.SetAsActiveChart(locationChart); - } - } - } - [Label("Clear Results")] private void ClearResults() { @@ -1026,22 +986,9 @@ { Location location = locationJob.Location; DataEventPublisher.SelectionChanged(location, PropertyEditorReactionType.Ignore); - if (damProject.DamProjectData.DamProjectType == DamProjectType.Calamity) + if (damProject.DamProjectData.DamProjectType == DamProjectType.DamLiveConfiguration) { - lastLocationResult = locationJob.GetLocationResultWithStabilityTimeSerie(location.Name); - if (lastLocationResult == null) - { - lastLocationResult = locationJob.GetFirstLocationResultWithStabilityTimeSerie(); - } - - if (lastLocationResult != null) - { - ShowLocationImage(lastLocationResult.StabilityTimeSerie, locationJobSymbol.CurrentDateTime); - } - else - { - ShowLocationImage(null, locationJobSymbol.CurrentDateTime); - } + ShowLocationImage(null, locationJobSymbol.CurrentDateTime); } if (damProject.DamProjectData.DamProjectType == DamProjectType.Design)