Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs =================================================================== diff -u -r7e73b46787b05288e766f041ba935e20edf1eb93 -r2d65ef2d76be3732554f992581e092755dd5195b --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 7e73b46787b05288e766f041ba935e20edf1eb93) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 2d65ef2d76be3732554f992581e092755dd5195b) @@ -46,6 +46,7 @@ using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionOutwards.Forms.PropertyClasses; using Ringtoets.GrassCoverErosionOutwards.Forms.Views; +using Ringtoets.GrassCoverErosionOutwards.IO; using Ringtoets.GrassCoverErosionOutwards.Plugin.Properties; using Ringtoets.GrassCoverErosionOutwards.Service; using Ringtoets.GrassCoverErosionOutwards.Service.MessageProviders; @@ -194,12 +195,50 @@ { yield return new ExportInfo { + Name = RingtoetsCommonFormsResources.HydraulicBoundaryLocationsExporter_DisplayName, + Category = RingtoetsCommonFormsResources.Ringtoets_Category, + Image = RingtoetsCommonFormsResources.PointShapefileIcon, CreateFileExporter = (context, filePath) => new HydraulicBoundaryLocationsExporter(context.WrappedData.HydraulicBoundaryLocations, filePath, Resources.DesignWaterLevel_Description, Resources.WaveHeight_Description), IsEnabled = context => context.WrappedData.HydraulicBoundaryLocations.Count > 0, FileFilter = RingtoetsCommonIoResources.DataTypeDisplayName_shape_file_filter }; + + yield return new ExportInfo + { + Name = RingtoetsCommonFormsResources.WaveConditionsExporter_DisplayName, + Category = RingtoetsCommonFormsResources.Ringtoets_Category, + Image = RingtoetsCommonFormsResources.CsvFileIcon, + CreateFileExporter = (context, filePath) => + { + var calculations = context.WrappedData.WaveConditionsCalculationGroup.GetCalculations().Cast(); + return new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath); + }, + IsEnabled = context => context.WrappedData.WaveConditionsCalculationGroup.GetCalculations().Cast().Any(c => c.HasOutput), + FileFilter = RingtoetsCommonFormsResources.DataTypeDisplayName_csv_file_filter + }; + + yield return new ExportInfo + { + CreateFileExporter = (context, filePath) => + { + var calculations = context.WrappedData.GetCalculations().Cast(); + return new GrassCoverErosionOutwardsWaveConditionsExporter(calculations, filePath); + }, + IsEnabled = context => context.WrappedData.GetCalculations().Cast().Any(c => c.HasOutput), + FileFilter = RingtoetsCommonFormsResources.DataTypeDisplayName_csv_file_filter + }; + + yield return new ExportInfo + { + CreateFileExporter = (context, filePath) => new GrassCoverErosionOutwardsWaveConditionsExporter(new[] + { + context.WrappedData + }, filePath), + IsEnabled = context => context.WrappedData.HasOutput, + FileFilter = RingtoetsCommonFormsResources.DataTypeDisplayName_csv_file_filter + }; } public override void Activate()