Index: Core/Common/src/Core.Common.Gui/Commands/GuiExportHandler.cs =================================================================== diff -u -rb4cf71536ccc150da7fbbe1de048ee0b8a442edb -r77c945bdf8a9d69da89a86c7b943250e51f0cc39 --- Core/Common/src/Core.Common.Gui/Commands/GuiExportHandler.cs (.../GuiExportHandler.cs) (revision b4cf71536ccc150da7fbbe1de048ee0b8a442edb) +++ Core/Common/src/Core.Common.Gui/Commands/GuiExportHandler.cs (.../GuiExportHandler.cs) (revision 77c945bdf8a9d69da89a86c7b943250e51f0cc39) @@ -99,7 +99,7 @@ return supportedExportInfos[0]; } - using (var selectExportInfoDialog = new SelectItemDialog(dialogParent)) + using (var selectExportInfoDialog = new SelectItemDialog(dialogParent, Resources.GuiExportHandler_GetSupportedExportInfoUsingDialog_Select_exporter)) { foreach (var exportInfo in supportedExportInfos) { Index: Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs =================================================================== diff -u -r92ce91281efab19772bd3e2d7ecea2c0a6c8ea97 -r77c945bdf8a9d69da89a86c7b943250e51f0cc39 --- Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs (.../GuiImportHandler.cs) (revision 92ce91281efab19772bd3e2d7ecea2c0a6c8ea97) +++ Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs (.../GuiImportHandler.cs) (revision 77c945bdf8a9d69da89a86c7b943250e51f0cc39) @@ -86,7 +86,7 @@ return importers[0]; } - using (var selectImporterDialog = new SelectItemDialog(dialogParent)) + using (var selectImporterDialog = new SelectItemDialog(dialogParent, Resources.GuiImportHandler_GetSupportedImporterUsingDialog_Select_importer)) { foreach (IFileImporter importer in importers) { Index: Core/Common/src/Core.Common.Gui/Forms/SelectItemDialog.cs =================================================================== diff -u -r74b9f5cca517fbccca3fe27bac059966233e432a -r77c945bdf8a9d69da89a86c7b943250e51f0cc39 --- Core/Common/src/Core.Common.Gui/Forms/SelectItemDialog.cs (.../SelectItemDialog.cs) (revision 74b9f5cca517fbccca3fe27bac059966233e432a) +++ Core/Common/src/Core.Common.Gui/Forms/SelectItemDialog.cs (.../SelectItemDialog.cs) (revision 77c945bdf8a9d69da89a86c7b943250e51f0cc39) @@ -38,10 +38,13 @@ /// /// The dialog parent for which this dialog should be /// shown on top. - public SelectItemDialog(IWin32Window dialogParent) : base(dialogParent, Resources.plus, 320, 220) + /// The text to show in the dialog. + public SelectItemDialog(IWin32Window dialogParent, string text) : base(dialogParent, Resources.plus, 320, 220) { InitializeComponent(); + Text = text; + imageList.Images.Clear(); listViewItemTypes.Clear(); listViewItemTypes.Groups.Clear(); Index: Core/Common/src/Core.Common.Gui/Forms/SelectItemDialog.resx =================================================================== diff -u -rcb6027f953ef4d8f3dbeda8fc055796acaded855 -r77c945bdf8a9d69da89a86c7b943250e51f0cc39 --- Core/Common/src/Core.Common.Gui/Forms/SelectItemDialog.resx (.../SelectItemDialog.resx) (revision cb6027f953ef4d8f3dbeda8fc055796acaded855) +++ Core/Common/src/Core.Common.Gui/Forms/SelectItemDialog.resx (.../SelectItemDialog.resx) (revision 77c945bdf8a9d69da89a86c7b943250e51f0cc39) @@ -607,9 +607,6 @@ CenterParent - - Nieuw element toevoegen... - imageList Index: Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs =================================================================== diff -u -r92ce91281efab19772bd3e2d7ecea2c0a6c8ea97 -r77c945bdf8a9d69da89a86c7b943250e51f0cc39 --- Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 92ce91281efab19772bd3e2d7ecea2c0a6c8ea97) +++ Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 77c945bdf8a9d69da89a86c7b943250e51f0cc39) @@ -758,6 +758,15 @@ } /// + /// Looks up a localized string similar to Kies wat u wilt exporteren. + /// + public static string GuiExportHandler_GetSupportedExportInfoUsingDialog_Select_exporter { + get { + return ResourceManager.GetString("GuiExportHandler_GetSupportedExportInfoUsingDialog_Select_exporter", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Selecteer een bestand met {0} om eruit te importeren.... /// public static string GuiImportHandler_GetImportedItemsUsingFileOpenDialog_Select_a_DataType_0_file_to_import_from { @@ -815,6 +824,15 @@ } /// + /// Looks up a localized string similar to Kies wat u wilt importeren. + /// + public static string GuiImportHandler_GetSupportedImporterUsingDialog_Select_importer { + get { + return ResourceManager.GetString("GuiImportHandler_GetSupportedImporterUsingDialog_Select_importer", resourceCulture); + } + } + + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// public static System.Drawing.Bitmap icon_clear_all_messages { Index: Core/Common/src/Core.Common.Gui/Properties/Resources.resx =================================================================== diff -u -r92ce91281efab19772bd3e2d7ecea2c0a6c8ea97 -r77c945bdf8a9d69da89a86c7b943250e51f0cc39 --- Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 92ce91281efab19772bd3e2d7ecea2c0a6c8ea97) +++ Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 77c945bdf8a9d69da89a86c7b943250e51f0cc39) @@ -571,4 +571,10 @@ De map '{0}' kan niet aangemaakt worden. + + Kies wat u wilt exporteren + + + Kies wat u wilt importeren + \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/Commands/GuiExportHandlerTest.cs =================================================================== diff -u -rc0bfa19b383466c8bbe228ada239c9f094bb2c9c -r77c945bdf8a9d69da89a86c7b943250e51f0cc39 --- Core/Common/test/Core.Common.Gui.Test/Commands/GuiExportHandlerTest.cs (.../GuiExportHandlerTest.cs) (revision c0bfa19b383466c8bbe228ada239c9f094bb2c9c) +++ Core/Common/test/Core.Common.Gui.Test/Commands/GuiExportHandlerTest.cs (.../GuiExportHandlerTest.cs) (revision 77c945bdf8a9d69da89a86c7b943250e51f0cc39) @@ -231,6 +231,40 @@ } [Test] + [RequiresSTA] + public void ExportFrom_MultipleSupportedExportersAvailable_GivesSelectionDialog() + { + // Setup + var mockRepository = new MockRepository(); + var mainWindow = mockRepository.Stub(); + mockRepository.ReplayAll(); + + var dialogText = ""; + + ModalFormHandler = (name, wnd, form) => + { + var dialog = new FormTester(name); + + dialogText = dialog.Text; + + dialog.Close(); + }; + + var exportHandler = new GuiExportHandler(mainWindow, new List + { + new ExportInfo(), + new ExportInfo() + }); + + // Call + exportHandler.ExportFrom(1234); + + // Assert + Assert.AreEqual("Kies wat u wilt exporteren", dialogText); + mockRepository.VerifyAll(); + } + + [Test] public void CanExportFrom_HasNoFileExportersForTarget_ReturnFalse() { // Setup Index: Core/Common/test/Core.Common.Gui.Test/Forms/SelectItemDialogTest.cs =================================================================== diff -u -r8c97c3995795d80d531bf9415291d9734f6de054 -r77c945bdf8a9d69da89a86c7b943250e51f0cc39 --- Core/Common/test/Core.Common.Gui.Test/Forms/SelectItemDialogTest.cs (.../SelectItemDialogTest.cs) (revision 8c97c3995795d80d531bf9415291d9734f6de054) +++ Core/Common/test/Core.Common.Gui.Test/Forms/SelectItemDialogTest.cs (.../SelectItemDialogTest.cs) (revision 77c945bdf8a9d69da89a86c7b943250e51f0cc39) @@ -34,7 +34,7 @@ public void Constructor_WithoutDialogParent_ThrowsArgumentNullException() { // Call - TestDelegate test = () => new SelectItemDialog(null); + TestDelegate test = () => new SelectItemDialog(null, string.Empty); // Assert var paramName = Assert.Throws(test).ParamName; @@ -50,9 +50,10 @@ mocks.ReplayAll(); // Call - using (var dialog = new SelectItemDialog(parent)) + using (var dialog = new SelectItemDialog(parent, "Dialog text")) { // Assert + Assert.AreEqual("Dialog text", dialog.Text); Assert.IsNull(dialog.SelectedItemTag); Assert.IsNull(dialog.SelectedItemTypeName); }