Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj =================================================================== diff -u -r3525 -r3533 --- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 3525) +++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 3533) @@ -171,7 +171,6 @@ - Index: DamClients/DamUI/trunk/src/Dam/Forms/DesignCalculationPropertyControl.cs =================================================================== diff -u -r3526 -r3533 --- DamClients/DamUI/trunk/src/Dam/Forms/DesignCalculationPropertyControl.cs (.../DesignCalculationPropertyControl.cs) (revision 3526) +++ DamClients/DamUI/trunk/src/Dam/Forms/DesignCalculationPropertyControl.cs (.../DesignCalculationPropertyControl.cs) (revision 3533) @@ -59,7 +59,7 @@ BindSupport.BindTextAndValue(this, this.NotesLabel, this.NotesEdit, a => a.Notes); - OpenFileButton.Hide(); + BindSupport.Bind(this, OpenFileButton, typeof(CsvExportData), "OpenCalculationFile"); BindSupport.Assign(this.EvaluationGroupControl, this); Fisheye: Tag 3533 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportDataException.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs =================================================================== diff -u -r3526 -r3533 --- DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 3526) +++ DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 3533) @@ -215,7 +215,7 @@ try { var icon = new Icon(typeof(DamPlugin).Assembly.GetManifestResourceStream( - "Deltares.Dam.Forms.Resources.DAM_icon.ico")); + "Deltares.Dam.Forms.Resources.DAM_icon.ico")); this.mainForm.UseIcon(icon); } catch (Exception) @@ -846,8 +846,16 @@ private void DataEventPublisher_OnAfterChange(object sender, PublishEventArgs e) { - if (sender == this.locationJobSymbol) + if (sender is CsvExportData) { + if (e.Property != null && e.Property.Equals("ExceptionMessage")) + { + var exceptionMessage = ((CsvExportData)sender).ExceptionMessage; + LocalizedMessageBox.ShowError(this, exceptionMessage); + } + } + else if (sender == this.locationJobSymbol) + { if (e.Property != null && e.Property.Equals("CurrentScenarioType")) { DataEventPublisher.AfterChange(this); @@ -899,7 +907,6 @@ } } } - } private void UpdatePropertyControl() Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportData.cs =================================================================== diff -u -r3526 -r3533 --- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportData.cs (.../CsvExportData.cs) (revision 3526) +++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportData.cs (.../CsvExportData.cs) (revision 3533) @@ -111,6 +111,8 @@ private SurfaceLine2 redesignedSurfaceLine; // redesigned Global surfaceline in use for this result (either piping or stability) private SurfaceLine2 redesignedSurfaceLineGlobal; + + public string ExceptionMessage { get; set; } public CsvExportData() { @@ -2078,10 +2080,10 @@ } catch (Exception) { - var exceptionMessage = string.Format( + ExceptionMessage = string.Format( "The file {0} could not be opened with D-Stability. Make sure files with the extension {1} are associated with D-Stability.", InputFile, Path.GetExtension(InputFile)); - throw new CsvExporterException(exceptionMessage); + DataEventPublisher.AfterChange(this, "ExceptionMessage"); } } else