Index: DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs =================================================================== diff -u -r2235 -r2238 --- DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 2235) +++ DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 2238) @@ -25,7 +25,6 @@ using System.Drawing; using System.IO; using System.Linq; -using System.Reflection; using System.Windows.Forms; using Deltares.Dam.Data; using Deltares.Dam.Data.DamEngineIo; @@ -129,6 +128,7 @@ private readonly DesignCalculationPropertyControl designCalculationPropertyControl = new DesignCalculationPropertyControl(); 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(); @@ -277,14 +277,15 @@ private void ConfigurePropertyGrid() { - var dpc = this.mainForm.DynamicPropertyControl; + var dpc = mainForm.DynamicPropertyControl; // deregister the ugly property control provided by the Geotechnics plugin - mainForm.DynamicPropertyControl.ClearRegistrationsForType(typeof(Soil)); - mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => PropertyControlFactory.GetPropertyControl(), typeof(Soil)); + dpc.ClearRegistrationsForType(typeof(Soil)); + dpc.BuildDelayedPropertyControlForTypes(() => PropertyControlFactory.GetPropertyControl(), typeof(Soil)); dpc.BuildPropertyControlTabForTypes(locationPropertyControl, typeof(Location), typeof(LocationJob)); dpc.BuildPropertyControlTabForTypes(new LocationScenariosControl(), typeof(Location), typeof(LocationJob)); - + dpc.BuildPropertyControlTabForTypes(damSurfaceLineControl, typeof(SurfaceLine2), typeof(CharacteristicPoint), typeof(LocationJob)); + this.progressDelegate = waterBoardPropertyControl.DoProgress; dpc.BuildPropertyControlTabForTypes(waterBoardPropertyControl, typeof(WaterBoard), typeof(WaterBoardJob), typeof(DamProjectData)); @@ -719,12 +720,9 @@ catch (Exception) { // when all calculations failed but some old result lingers (which it probably shouldnt't) you trigger - // and event for a non existing designCalculationsControl. For now just ignore this error until it is clear + // an event for a non existing designCalculationsControl. For now just ignore this error until it is clear // how DAM should handle "old" results. } - - - } } } @@ -746,7 +744,8 @@ // 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 diplayed on the image tab + // 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); } } @@ -862,9 +861,7 @@ private void SelectLocationJob(LocationJob locationJob) { var location = locationJob.Location; - DataEventPublisher.SelectionChanged(location, PropertyEditorReactionType.Ignore); - if (damProject.DamProjectData.DamProjectType == DamProjectType.Calamity) { lastLocationResult = locationJob.GetLocationResultWithStabilityTimeSerie(location.Name);