Index: Application/Riskeer/src/Application.Riskeer/App.xaml.cs =================================================================== diff -u -r154c2f0e382dc91ef7006af73fac612a600c6bd6 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Application/Riskeer/src/Application.Riskeer/App.xaml.cs (.../App.xaml.cs) (revision 154c2f0e382dc91ef7006af73fac612a600c6bd6) +++ Application/Riskeer/src/Application.Riskeer/App.xaml.cs (.../App.xaml.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -36,6 +36,7 @@ using Core.Common.Gui; using Core.Common.Gui.Appenders; using Core.Common.Gui.Forms.MainWindow; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Settings; using Core.Common.Util; using Core.Common.Util.Settings; Index: Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs =================================================================== diff -u -rca9b8c04020e3da185b8e28c0916ce5dfeea6d13 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs (.../StorageMigrationIntegrationTest.cs) (revision ca9b8c04020e3da185b8e28c0916ce5dfeea6d13) +++ Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs (.../StorageMigrationIntegrationTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -24,6 +24,7 @@ using System.Threading; using Core.Common.Gui; using Core.Common.Gui.Forms.MainWindow; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Settings; using Core.Common.TestUtil; using NUnit.Framework; Index: Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs =================================================================== diff -u -r6cdb90fc3f89fe0c44b62d3be7266a0090a6b891 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs (.../GuiImportHandler.cs) (revision 6cdb90fc3f89fe0c44b62d3be7266a0090a6b891) +++ Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs (.../GuiImportHandler.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -27,6 +27,7 @@ using Core.Common.Base.Service; using Core.Common.Gui.Forms; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Gui.Properties; using Core.Common.Util.Reflection; Index: Core/Common/src/Core.Common.Gui/Commands/GuiUpdateHandler.cs =================================================================== diff -u -r6cdb90fc3f89fe0c44b62d3be7266a0090a6b891 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Core/Common/src/Core.Common.Gui/Commands/GuiUpdateHandler.cs (.../GuiUpdateHandler.cs) (revision 6cdb90fc3f89fe0c44b62d3be7266a0090a6b891) +++ Core/Common/src/Core.Common.Gui/Commands/GuiUpdateHandler.cs (.../GuiUpdateHandler.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -28,6 +28,7 @@ using Core.Common.Base.Service; using Core.Common.Gui.Forms; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Gui.Properties; using Core.Common.Util.Reflection; Index: Core/Common/src/Core.Common.Gui/Commands/StorageCommandHandler.cs =================================================================== diff -u -r444796880375992cac66719b2e542a26cbb5edfe -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Core/Common/src/Core.Common.Gui/Commands/StorageCommandHandler.cs (.../StorageCommandHandler.cs) (revision 444796880375992cac66719b2e542a26cbb5edfe) +++ Core/Common/src/Core.Common.Gui/Commands/StorageCommandHandler.cs (.../StorageCommandHandler.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -28,6 +28,7 @@ using Core.Common.Base.Service; using Core.Common.Base.Storage; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Properties; using log4net; Fisheye: Tag e9b8aa3e972b9f07a3201f143c26de0e3f082d49 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/DialogBasedInquiryHelper.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Gui/GuiCore.cs =================================================================== diff -u -r7749811b0fd3f71505aee46d6ab26592c787f04c -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision 7749811b0fd3f71505aee46d6ab26592c787f04c) +++ Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -40,6 +40,7 @@ using Core.Common.Gui.Forms.MessageWindow; using Core.Common.Gui.Forms.PropertyGridView; using Core.Common.Gui.Forms.ViewHost; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Gui.Properties; using Core.Common.Gui.Settings; Index: Core/Common/src/Core.Common.Gui/Helpers/DialogBasedInquiryHelper.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Gui/Helpers/DialogBasedInquiryHelper.cs (revision 0) +++ Core/Common/src/Core.Common.Gui/Helpers/DialogBasedInquiryHelper.cs (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -0,0 +1,142 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.ComponentModel; +using System.Windows.Forms; +using Core.Common.Gui.Properties; +using Core.Common.Util; +using CoreCommonBaseResources = Core.Common.Base.Properties.Resources; + +namespace Core.Common.Gui.Helpers +{ + /// + /// Class which inquires the user for application inputs based on dialogs. + /// + public class DialogBasedInquiryHelper : IInquiryHelper + { + private readonly IWin32Window dialogParent; + + /// + /// Creates a new instance of . + /// + /// The parent window to provide to the created + /// dialogs. + /// Thrown when + /// is null. + public DialogBasedInquiryHelper(IWin32Window dialogParent) + { + if (dialogParent == null) + { + throw new ArgumentNullException(nameof(dialogParent)); + } + + this.dialogParent = dialogParent; + } + + public string GetSourceFileLocation() + { + return GetSourceFileLocation(new FileFilterGenerator().Filter); + } + + public string GetSourceFileLocation(string fileFilter) + { + string filePath = null; + using (var dialog = new OpenFileDialog + { + Multiselect = false, + Title = Resources.OpenFileDialog_Title, + Filter = fileFilter + }) + { + DialogResult result = dialog.ShowDialog(dialogParent); + if (result == DialogResult.OK) + { + filePath = dialog.FileName; + } + } + + return filePath; + } + + public string GetTargetFileLocation() + { + return GetTargetFileLocation(new FileFilterGenerator().Filter, null); + } + + public string GetTargetFileLocation(string fileFilter, string suggestedFileName) + { + string filePath = null; + using (var dialog = new SaveFileDialog + { + Title = Resources.SaveFileDialog_Title, + Filter = fileFilter, + FileName = suggestedFileName + }) + { + DialogResult result = dialog.ShowDialog(dialogParent); + if (result == DialogResult.OK) + { + filePath = dialog.FileName; + } + } + + return filePath; + } + + public bool InquireContinuation(string query) + { + DialogResult dialog = MessageBox.Show( + dialogParent, + query, + CoreCommonBaseResources.Confirm, + MessageBoxButtons.OKCancel); + return dialog == DialogResult.OK; + } + + public OptionalStepResult InquirePerformOptionalStep(string workflowDescription, string query) + { + DialogResult confirmation = MessageBox.Show(dialogParent, + query, + workflowDescription, + MessageBoxButtons.YesNoCancel); + + if (!Enum.IsDefined(typeof(DialogResult), confirmation)) + { + throw new InvalidEnumArgumentException(nameof(confirmation), + (int) confirmation, + typeof(DialogResult)); + } + + switch (confirmation) + { + case DialogResult.Cancel: + return OptionalStepResult.Cancel; + case DialogResult.Yes: + return OptionalStepResult.PerformOptionalStep; + case DialogResult.No: + return OptionalStepResult.SkipOptionalStep; + default: + throw new NotSupportedException("Dialogbox should only return the above values."); + } + } + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/Helpers/IInquiryHelper.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Gui/Helpers/IInquiryHelper.cs (revision 0) +++ Core/Common/src/Core.Common.Gui/Helpers/IInquiryHelper.cs (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -0,0 +1,76 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +namespace Core.Common.Gui.Helpers +{ + /// + /// Specifies the interface for classes that can be used to inquire information from + /// the user. + /// + public interface IInquiryHelper + { + /// + /// Returns the path of an existing file that the user has chosen. + /// + /// A file location, or null if no location was chosen. + string GetSourceFileLocation(); + + /// + /// Returns the path of an existing file that the user has chosen. + /// + /// A filter to which the path returned complies. + /// A file location, or null if no location was chosen. + string GetSourceFileLocation(string fileFilter); + + /// + /// Returns the path to a file, which may or may not exist yet, that the user has chosen. + /// + /// A path to a file, which may or may not exist yet, or null if no location + /// was chosen. + string GetTargetFileLocation(); + + /// + /// Returns the path to a file, which may or may not exist yet, that the user has chosen. + /// + /// A filter to which the path returned complies. + /// The initial file name the user can choose. + /// A path to a file, which may or may not exist yet, or null if no location + /// was chosen. + string GetTargetFileLocation(string fileFilter, string suggestedFileName); + + /// + /// Gets the confirmation of a user. + /// + /// The query to which the user needs to answer. + /// true if the user confirmed, false otherwise. + bool InquireContinuation(string query); + + /// + /// Checks with the user if a certain optional step in some workflow should be + /// performed or not. + /// + /// The short descriptive text on the workflow + /// currently being performed. + /// The query to which the user needs to answer. + /// How the workflow should continue. + OptionalStepResult InquirePerformOptionalStep(string workflowDescription, string query); + } +} \ No newline at end of file Fisheye: Tag e9b8aa3e972b9f07a3201f143c26de0e3f082d49 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IInquiryHelper.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/test/Core.Common.Gui.Test/Commands/GuiImportHandlerTest.cs =================================================================== diff -u -r56d072b8342f3e54ba89124ab918bd1529e257a3 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Core/Common/test/Core.Common.Gui.Test/Commands/GuiImportHandlerTest.cs (.../GuiImportHandlerTest.cs) (revision 56d072b8342f3e54ba89124ab918bd1529e257a3) +++ Core/Common/test/Core.Common.Gui.Test/Commands/GuiImportHandlerTest.cs (.../GuiImportHandlerTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -25,6 +25,7 @@ using Core.Common.Base.IO; using Core.Common.Gui.Commands; using Core.Common.Gui.Forms.MainWindow; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.TestUtil; using Core.Common.Util; Index: Core/Common/test/Core.Common.Gui.Test/Commands/GuiUpdateHandlerTest.cs =================================================================== diff -u -r56d072b8342f3e54ba89124ab918bd1529e257a3 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Core/Common/test/Core.Common.Gui.Test/Commands/GuiUpdateHandlerTest.cs (.../GuiUpdateHandlerTest.cs) (revision 56d072b8342f3e54ba89124ab918bd1529e257a3) +++ Core/Common/test/Core.Common.Gui.Test/Commands/GuiUpdateHandlerTest.cs (.../GuiUpdateHandlerTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -25,6 +25,7 @@ using Core.Common.Base.IO; using Core.Common.Gui.Commands; using Core.Common.Gui.Forms.MainWindow; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.TestUtil; using Core.Common.Util; Index: Core/Common/test/Core.Common.Gui.Test/Commands/StorageCommandHandlerTest.cs =================================================================== diff -u -r56d072b8342f3e54ba89124ab918bd1529e257a3 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Core/Common/test/Core.Common.Gui.Test/Commands/StorageCommandHandlerTest.cs (.../StorageCommandHandlerTest.cs) (revision 56d072b8342f3e54ba89124ab918bd1529e257a3) +++ Core/Common/test/Core.Common.Gui.Test/Commands/StorageCommandHandlerTest.cs (.../StorageCommandHandlerTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -27,6 +27,7 @@ using Core.Common.Base.IO; using Core.Common.Base.Storage; using Core.Common.Gui.Commands; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Selection; using Core.Common.TestUtil; using NUnit.Extensions.Forms; Index: Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj =================================================================== diff -u -rfdcad55802f3fc8091d69f70c6aa1a16a0ffc2f9 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision fdcad55802f3fc8091d69f70c6aa1a16a0ffc2f9) +++ Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -16,12 +16,12 @@ - - - - - - + + + + + + Fisheye: Tag e9b8aa3e972b9f07a3201f143c26de0e3f082d49 refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Gui.Test/DialogBasedInquiryHelperTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/test/Core.Common.Gui.Test/Helpers/DialogBasedInquiryHelperTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Gui.Test/Helpers/DialogBasedInquiryHelperTest.cs (revision 0) +++ Core/Common/test/Core.Common.Gui.Test/Helpers/DialogBasedInquiryHelperTest.cs (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -0,0 +1,316 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.IO; +using System.Threading; +using System.Windows.Forms; +using Core.Common.Gui.Helpers; +using Core.Common.TestUtil; +using NUnit.Extensions.Forms; +using NUnit.Framework; +using Rhino.Mocks; + +namespace Core.Common.Gui.Test.Helpers +{ + [TestFixture] + public class DialogBasedInquiryHelperTest : NUnitFormTest + { + private IWin32Window dialogParent; + private MockRepository mocks; + + [Test] + public void Constructor_WithoutDialogParent_ThrowsArgumentNullException() + { + // Setup + mocks.ReplayAll(); + + // Call + TestDelegate test = () => new DialogBasedInquiryHelper(null); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("dialogParent", exception.ParamName); + } + + [Test] + public void Constructor_WithParent_CreatesNewInquiryHelper() + { + // Setup + mocks.ReplayAll(); + + // Call + var helper = new DialogBasedInquiryHelper(dialogParent); + + // Assert + Assert.IsInstanceOf(helper); + } + + [Test] + [Apartment(ApartmentState.STA)] + public void GetSourceFileLocation_Always_ShowsOpenFileDialog() + { + // Setup + dialogParent.Expect(d => d.Handle).Repeat.AtLeastOnce().Return(default(IntPtr)); + mocks.ReplayAll(); + + var helper = new DialogBasedInquiryHelper(dialogParent); + + string windowName = null; + DialogBoxHandler = (name, wnd) => + { + var tester = new OpenFileDialogTester(wnd); + windowName = name; + tester.ClickCancel(); + }; + + // Call + helper.GetSourceFileLocation(); + + // Assert + Assert.AreEqual("Openen", windowName); + } + + [Test] + [Apartment(ApartmentState.STA)] + public void GetSourceFileLocation_CancelClicked_ResultFileSelectedIsFalse() + { + // Setup + dialogParent.Expect(d => d.Handle).Repeat.AtLeastOnce().Return(default(IntPtr)); + mocks.ReplayAll(); + + var helper = new DialogBasedInquiryHelper(dialogParent); + + DialogBoxHandler = (name, wnd) => + { + var tester = new OpenFileDialogTester(wnd); + tester.ClickCancel(); + }; + + // Call + string result = helper.GetSourceFileLocation(); + + // Assert + Assert.IsNull(result); + } + + [Test] + [Apartment(ApartmentState.STA)] + public void GetSourceFileLocation_ExistingFileSelected_ResultFileSelectedIsTrueFileNameSet() + { + // Setup + dialogParent.Expect(d => d.Handle).Repeat.AtLeastOnce().Return(default(IntPtr)); + mocks.ReplayAll(); + + var helper = new DialogBasedInquiryHelper(dialogParent); + string expectedFilePath = Path.GetFullPath(Path.GetRandomFileName()); + + DialogBoxHandler = (name, wnd) => + { + var tester = new OpenFileDialogTester(wnd); + tester.OpenFile(expectedFilePath); + }; + + using (new FileDisposeHelper(expectedFilePath)) + { + // Call + string result = helper.GetSourceFileLocation(); + + // Assert + Assert.AreEqual(expectedFilePath, result); + } + } + + [Test] + [Apartment(ApartmentState.STA)] + public void GetTargetFileLocation_Always_ShowsOpenFileDialog() + { + // Setup + dialogParent.Expect(d => d.Handle).Repeat.AtLeastOnce().Return(default(IntPtr)); + mocks.ReplayAll(); + + var helper = new DialogBasedInquiryHelper(dialogParent); + + string windowName = null; + DialogBoxHandler = (name, wnd) => + { + var tester = new OpenFileDialogTester(wnd); + windowName = name; + tester.ClickCancel(); + }; + + // Call + helper.GetTargetFileLocation(); + + // Assert + Assert.AreEqual("Opslaan als", windowName); + } + + [Test] + [Apartment(ApartmentState.STA)] + public void GetTargetFileLocation_CancelClicked_ResultFileSelectedIsFalse() + { + // Setup + dialogParent.Expect(d => d.Handle).Repeat.AtLeastOnce().Return(default(IntPtr)); + mocks.ReplayAll(); + + var helper = new DialogBasedInquiryHelper(dialogParent); + + DialogBoxHandler = (name, wnd) => + { + var tester = new SaveFileDialogTester(wnd); + tester.ClickCancel(); + }; + + // Call + string result = helper.GetTargetFileLocation(); + + // Assert + Assert.IsNull(result); + } + + [Test] + [Apartment(ApartmentState.STA)] + public void GetTargetFileLocation_FileSelected_ResultFileSelectedIsTrueFileNameSet() + { + // Setup + dialogParent.Expect(d => d.Handle).Repeat.AtLeastOnce().Return(default(IntPtr)); + mocks.ReplayAll(); + + var helper = new DialogBasedInquiryHelper(dialogParent); + string expectedFilePath = Path.GetFullPath(Path.GetRandomFileName()); + + DialogBoxHandler = (name, wnd) => + { + var tester = new SaveFileDialogTester(wnd); + tester.SaveFile(expectedFilePath); + }; + + // Call + string result = helper.GetTargetFileLocation(); + + // Assert + Assert.AreEqual(expectedFilePath, result); + } + + [Test] + [Apartment(ApartmentState.STA)] + [TestCase(true)] + [TestCase(false)] + public void InquireContinuation_OkOrCancelClicked_ReturnExpectedResult(bool confirm) + { + // Setup + dialogParent.Expect(d => d.Handle).Repeat.AtLeastOnce().Return(default(IntPtr)); + mocks.ReplayAll(); + + var helper = new DialogBasedInquiryHelper(dialogParent); + + const string expectedQuery = "Are you sure you want to do this?"; + const string expectedTitle = "Bevestigen"; + string query = null; + string title = null; + + DialogBoxHandler = (name, wnd) => + { + var tester = new MessageBoxTester(wnd); + query = tester.Text; + title = tester.Title; + if (confirm) + { + tester.ClickOk(); + } + else + { + tester.ClickCancel(); + } + }; + + // Call + bool result = helper.InquireContinuation(expectedQuery); + + // Assert + Assert.AreEqual(expectedQuery, query); + Assert.AreEqual(expectedTitle, title); + Assert.AreEqual(confirm, result); + } + + [Test] + [TestCase(DialogResult.Cancel, OptionalStepResult.Cancel)] + [TestCase(DialogResult.Yes, OptionalStepResult.PerformOptionalStep)] + [TestCase(DialogResult.No, OptionalStepResult.SkipOptionalStep)] + public void InquirePerformOptionalStep_VariousScenarios_ReturnExpectedValue(DialogResult clickedResult, + OptionalStepResult expectedResult) + { + // Setup + dialogParent.Expect(d => d.Handle).Repeat.AtLeastOnce().Return(default(IntPtr)); + mocks.ReplayAll(); + + var helper = new DialogBasedInquiryHelper(dialogParent); + + string actualQuery = null; + string title = null; + + DialogBoxHandler = (name, wnd) => + { + var tester = new MessageBoxTester(wnd); + actualQuery = tester.Text; + title = tester.Title; + + switch (clickedResult) + { + case DialogResult.Yes: + tester.SendCommand(MessageBoxTester.Command.Yes); + break; + case DialogResult.No: + tester.SendCommand(MessageBoxTester.Command.No); + break; + case DialogResult.Cancel: + tester.SendCommand(MessageBoxTester.Command.Cancel); + break; + } + }; + + const string description = "A"; + const string query = "B"; + + // Call + OptionalStepResult result = helper.InquirePerformOptionalStep(description, query); + + // Assert + Assert.AreEqual(expectedResult, result); + + Assert.AreEqual(description, title); + Assert.AreEqual(query, actualQuery); + mocks.VerifyAll(); + } + + public override void Setup() + { + mocks = new MockRepository(); + dialogParent = mocks.StrictMock(); + } + + public override void TearDown() + { + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs =================================================================== diff -u -r0c01d00c000b40e935b430fcb9195e95462e76fc -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 0c01d00c000b40e935b430fcb9195e95462e76fc) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -29,6 +29,7 @@ using Core.Common.Gui; using Core.Common.Gui.ContextMenu; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Util; using Riskeer.ClosingStructures.Data; Index: Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/CalculationChangeHandler.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/CalculationChangeHandler.cs (.../CalculationChangeHandler.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/CalculationChangeHandler.cs (.../CalculationChangeHandler.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; using System.Linq; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Riskeer.Common.Data.Calculation; using Riskeer.Common.IO; Index: Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfCalculationChangeHandlerBase.cs =================================================================== diff -u -ra68f144ae66e3c768759bf16cc26dfca2e2aed49 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfCalculationChangeHandlerBase.cs (.../ClearIllustrationPointsOfCalculationChangeHandlerBase.cs) (revision a68f144ae66e3c768759bf16cc26dfca2e2aed49) +++ Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfCalculationChangeHandlerBase.cs (.../ClearIllustrationPointsOfCalculationChangeHandlerBase.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -20,7 +20,7 @@ // All rights reserved. using System; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Riskeer.Common.Data.Calculation; using Riskeer.Common.Forms.Properties; Index: Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfCalculationCollectionChangeHandlerBase.cs =================================================================== diff -u -r1c916a9fcd406aa21e10941d8ff819c60d027221 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfCalculationCollectionChangeHandlerBase.cs (.../ClearIllustrationPointsOfCalculationCollectionChangeHandlerBase.cs) (revision 1c916a9fcd406aa21e10941d8ff819c60d027221) +++ Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfCalculationCollectionChangeHandlerBase.cs (.../ClearIllustrationPointsOfCalculationCollectionChangeHandlerBase.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; using Core.Common.Base; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; namespace Riskeer.Common.Forms.ChangeHandlers { Index: Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfHydraulicBoundaryLocationCalculationCollectionChangeHandler.cs =================================================================== diff -u -re8ef88fcdd082e97681b264d849c1faf9b86457b -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfHydraulicBoundaryLocationCalculationCollectionChangeHandler.cs (.../ClearIllustrationPointsOfHydraulicBoundaryLocationCalculationCollectionChangeHandler.cs) (revision e8ef88fcdd082e97681b264d849c1faf9b86457b) +++ Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfHydraulicBoundaryLocationCalculationCollectionChangeHandler.cs (.../ClearIllustrationPointsOfHydraulicBoundaryLocationCalculationCollectionChangeHandler.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; using Core.Common.Base; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Riskeer.Common.Forms.Properties; namespace Riskeer.Common.Forms.ChangeHandlers Index: Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler.cs =================================================================== diff -u -re8ef88fcdd082e97681b264d849c1faf9b86457b -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler.cs (.../ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler.cs) (revision e8ef88fcdd082e97681b264d849c1faf9b86457b) +++ Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler.cs (.../ClearIllustrationPointsOfStructureCalculationCollectionChangeHandler.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; using Core.Common.Base; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Riskeer.Common.Data.Structures; using Riskeer.Common.Forms.Properties; using Riskeer.Common.Service; Index: Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfStructuresCalculationHandler.cs =================================================================== diff -u -r810d2a004a428a8da86879af41a54b5d985cbd61 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfStructuresCalculationHandler.cs (.../ClearIllustrationPointsOfStructuresCalculationHandler.cs) (revision 810d2a004a428a8da86879af41a54b5d985cbd61) +++ Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/ClearIllustrationPointsOfStructuresCalculationHandler.cs (.../ClearIllustrationPointsOfStructuresCalculationHandler.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -20,7 +20,7 @@ // All rights reserved. using System; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Riskeer.Common.Data.Structures; namespace Riskeer.Common.Forms.ChangeHandlers Index: Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/FailureMechanismCalculationChangeHandler.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/FailureMechanismCalculationChangeHandler.cs (.../FailureMechanismCalculationChangeHandler.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/FailureMechanismCalculationChangeHandler.cs (.../FailureMechanismCalculationChangeHandler.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -21,7 +21,7 @@ using System; using System.Linq; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Riskeer.Common.Data.FailureMechanism; using Riskeer.Common.IO; Index: Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerContextMenuBuilder.cs =================================================================== diff -u -rb70c5fe23fc35933af143bba669d3e2239377307 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerContextMenuBuilder.cs (.../RiskeerContextMenuBuilder.cs) (revision b70c5fe23fc35933af143bba669d3e2239377307) +++ Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerContextMenuBuilder.cs (.../RiskeerContextMenuBuilder.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -23,8 +23,8 @@ using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; -using Core.Common.Gui; using Core.Common.Gui.ContextMenu; +using Core.Common.Gui.Helpers; using Riskeer.Common.Data.Calculation; using Riskeer.Common.Data.DikeProfiles; using Riskeer.Common.Data.FailureMechanism; Index: Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerContextMenuItemFactory.cs =================================================================== diff -u -r5095e75dfdee79905bb911c714daae4982cb772e -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerContextMenuItemFactory.cs (.../RiskeerContextMenuItemFactory.cs) (revision 5095e75dfdee79905bb911c714daae4982cb772e) +++ Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerContextMenuItemFactory.cs (.../RiskeerContextMenuItemFactory.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -25,8 +25,8 @@ using System.Linq; using System.Windows.Forms; using Core.Common.Base; -using Core.Common.Gui; using Core.Common.Gui.ContextMenu; +using Core.Common.Gui.Helpers; using Core.Common.Util.Extensions; using Riskeer.Common.Data.Calculation; using Riskeer.Common.Data.DikeProfiles; Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/CalculationChangeHandlerTest.cs =================================================================== diff -u -rc4311504aa83ba59c5a7e80c0e9bc26650986c05 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/CalculationChangeHandlerTest.cs (.../CalculationChangeHandlerTest.cs) (revision c4311504aa83ba59c5a7e80c0e9bc26650986c05) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/CalculationChangeHandlerTest.cs (.../CalculationChangeHandlerTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -21,7 +21,7 @@ using System; using System.Linq; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using NUnit.Framework; using Rhino.Mocks; using Riskeer.Common.Data.Calculation; Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfCalculationChangeHandlerBaseTest.cs =================================================================== diff -u -r43cf20905f2808ce0ac0b0408d8cf0017bd9efca -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfCalculationChangeHandlerBaseTest.cs (.../ClearIllustrationPointsOfCalculationChangeHandlerBaseTest.cs) (revision 43cf20905f2808ce0ac0b0408d8cf0017bd9efca) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfCalculationChangeHandlerBaseTest.cs (.../ClearIllustrationPointsOfCalculationChangeHandlerBaseTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -21,7 +21,7 @@ using System; using Core.Common.Base; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using NUnit.Framework; using Rhino.Mocks; using Riskeer.Common.Data.TestUtil; Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfCalculationCollectionChangeHandlerBaseTest.cs =================================================================== diff -u -re8ef88fcdd082e97681b264d849c1faf9b86457b -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfCalculationCollectionChangeHandlerBaseTest.cs (.../ClearIllustrationPointsOfCalculationCollectionChangeHandlerBaseTest.cs) (revision e8ef88fcdd082e97681b264d849c1faf9b86457b) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfCalculationCollectionChangeHandlerBaseTest.cs (.../ClearIllustrationPointsOfCalculationCollectionChangeHandlerBaseTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; using Core.Common.Base; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using NUnit.Framework; using Rhino.Mocks; using Riskeer.Common.Forms.ChangeHandlers; Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfHydraulicBoundaryLocationCalculationCollectionChangeHandlerTest.cs =================================================================== diff -u -re8ef88fcdd082e97681b264d849c1faf9b86457b -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfHydraulicBoundaryLocationCalculationCollectionChangeHandlerTest.cs (.../ClearIllustrationPointsOfHydraulicBoundaryLocationCalculationCollectionChangeHandlerTest.cs) (revision e8ef88fcdd082e97681b264d849c1faf9b86457b) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfHydraulicBoundaryLocationCalculationCollectionChangeHandlerTest.cs (.../ClearIllustrationPointsOfHydraulicBoundaryLocationCalculationCollectionChangeHandlerTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Linq; using Core.Common.Base; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using NUnit.Framework; using Rhino.Mocks; using Riskeer.Common.Forms.ChangeHandlers; Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandlerTest.cs =================================================================== diff -u -rd4fb475f3f6e36b919118b6c1ed100ce45dbf356 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandlerTest.cs (.../ClearIllustrationPointsOfStructureCalculationCollectionChangeHandlerTest.cs) (revision d4fb475f3f6e36b919118b6c1ed100ce45dbf356) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfStructureCalculationCollectionChangeHandlerTest.cs (.../ClearIllustrationPointsOfStructureCalculationCollectionChangeHandlerTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Linq; using Core.Common.Base; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfStructuresCalculationHandlerTest.cs =================================================================== diff -u -re8ef88fcdd082e97681b264d849c1faf9b86457b -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfStructuresCalculationHandlerTest.cs (.../ClearIllustrationPointsOfStructuresCalculationHandlerTest.cs) (revision e8ef88fcdd082e97681b264d849c1faf9b86457b) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfStructuresCalculationHandlerTest.cs (.../ClearIllustrationPointsOfStructuresCalculationHandlerTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -20,7 +20,7 @@ // All rights reserved. using System.Collections.Generic; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using NUnit.Framework; using Rhino.Mocks; using Riskeer.Common.Data.Structures; Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/FailureMechanismCalculationChangeHandlerTest.cs =================================================================== diff -u -rc4311504aa83ba59c5a7e80c0e9bc26650986c05 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/FailureMechanismCalculationChangeHandlerTest.cs (.../FailureMechanismCalculationChangeHandlerTest.cs) (revision c4311504aa83ba59c5a7e80c0e9bc26650986c05) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/ChangeHandlers/FailureMechanismCalculationChangeHandlerTest.cs (.../FailureMechanismCalculationChangeHandlerTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -21,7 +21,7 @@ using System; using System.Linq; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using NUnit.Framework; using Rhino.Mocks; using Riskeer.Common.Data.Calculation; Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/TreeNodeInfos/RiskeerContextMenuBuilderTest.cs =================================================================== diff -u -rc3f21a2e7e9922ff7e466ddaf6dbdddb0b6f0342 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/TreeNodeInfos/RiskeerContextMenuBuilderTest.cs (.../RiskeerContextMenuBuilderTest.cs) (revision c3f21a2e7e9922ff7e466ddaf6dbdddb0b6f0342) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/TreeNodeInfos/RiskeerContextMenuBuilderTest.cs (.../RiskeerContextMenuBuilderTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -25,9 +25,9 @@ using System.Windows.Forms; using Core.Common.Base; using Core.Common.Controls.TreeView; -using Core.Common.Gui; using Core.Common.Gui.Commands; using Core.Common.Gui.ContextMenu; +using Core.Common.Gui.Helpers; using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/TreeNodeInfos/RiskeerContextMenuItemFactoryTest.cs =================================================================== diff -u -r56d072b8342f3e54ba89124ab918bd1529e257a3 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/TreeNodeInfos/RiskeerContextMenuItemFactoryTest.cs (.../RiskeerContextMenuItemFactoryTest.cs) (revision 56d072b8342f3e54ba89124ab918bd1529e257a3) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/TreeNodeInfos/RiskeerContextMenuItemFactoryTest.cs (.../RiskeerContextMenuItemFactoryTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -24,8 +24,8 @@ using System.Drawing; using System.Linq; using Core.Common.Base; -using Core.Common.Gui; using Core.Common.Gui.ContextMenu; +using Core.Common.Gui.Helpers; using Core.Common.TestUtil; using NUnit.Extensions.Forms; using NUnit.Framework; Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationChangeHandler.cs =================================================================== diff -u -ra68f144ae66e3c768759bf16cc26dfca2e2aed49 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationChangeHandler.cs (.../ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationChangeHandler.cs) (revision a68f144ae66e3c768759bf16cc26dfca2e2aed49) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationChangeHandler.cs (.../ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationChangeHandler.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -20,7 +20,7 @@ // All rights reserved. using System; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Riskeer.Common.Forms.ChangeHandlers; using Riskeer.GrassCoverErosionInwards.Data; using Riskeer.GrassCoverErosionInwards.Util; Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationCollectionChangeHandler.cs =================================================================== diff -u -re8ef88fcdd082e97681b264d849c1faf9b86457b -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationCollectionChangeHandler.cs (.../ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationCollectionChangeHandler.cs) (revision e8ef88fcdd082e97681b264d849c1faf9b86457b) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationCollectionChangeHandler.cs (.../ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationCollectionChangeHandler.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -22,7 +22,7 @@ using System; using System.Collections.Generic; using Core.Common.Base; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Riskeer.Common.Forms.ChangeHandlers; using Riskeer.GrassCoverErosionInwards.Data; using Riskeer.GrassCoverErosionInwards.Service; Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs =================================================================== diff -u -ra18e53d04e45ca6c15c921e1d6441be82388d9be -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision a18e53d04e45ca6c15c921e1d6441be82388d9be) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -25,9 +25,9 @@ using System.Windows.Forms; using Core.Common.Base; using Core.Common.Controls.TreeView; -using Core.Common.Gui; using Core.Common.Gui.ContextMenu; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Util; using Riskeer.Common.Data.AssessmentSection; Index: Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationChangeHandlerTest.cs =================================================================== diff -u -rbb831b80442c0389546ce12572e24c795e0f6df6 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationChangeHandlerTest.cs (.../ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationChangeHandlerTest.cs) (revision bb831b80442c0389546ce12572e24c795e0f6df6) +++ Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationChangeHandlerTest.cs (.../ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationChangeHandlerTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -21,7 +21,7 @@ using System; using System.Collections.Generic; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using NUnit.Framework; using Rhino.Mocks; using Riskeer.Common.Data.TestUtil.IllustrationPoints; Index: Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationCollectionChangeHandlerTest.cs =================================================================== diff -u -rbb831b80442c0389546ce12572e24c795e0f6df6 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationCollectionChangeHandlerTest.cs (.../ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationCollectionChangeHandlerTest.cs) (revision bb831b80442c0389546ce12572e24c795e0f6df6) +++ Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/ChangeHandlers/ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationCollectionChangeHandlerTest.cs (.../ClearIllustrationPointsOfGrassCoverErosionInwardsCalculationCollectionChangeHandlerTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Linq; using Core.Common.Base; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; Index: Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs =================================================================== diff -u -r0c01d00c000b40e935b430fcb9195e95462e76fc -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 0c01d00c000b40e935b430fcb9195e95462e76fc) +++ Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -26,10 +26,10 @@ using System.Windows.Forms; using Core.Common.Base; using Core.Common.Controls.TreeView; -using Core.Common.Gui; using Core.Common.Gui.ContextMenu; using Core.Common.Gui.Forms.MainWindow; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Util; using Riskeer.Common.Data.AssessmentSection; Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -ra18e53d04e45ca6c15c921e1d6441be82388d9be -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision a18e53d04e45ca6c15c921e1d6441be82388d9be) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -29,6 +29,7 @@ using Core.Common.Gui; using Core.Common.Gui.ContextMenu; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Util; using Riskeer.Common.Data; Index: Riskeer/Integration/src/Riskeer.Integration.Forms/Merge/AssessmentSectionMergeFilePathProvider.cs =================================================================== diff -u -r444796880375992cac66719b2e542a26cbb5edfe -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Integration/src/Riskeer.Integration.Forms/Merge/AssessmentSectionMergeFilePathProvider.cs (.../AssessmentSectionMergeFilePathProvider.cs) (revision 444796880375992cac66719b2e542a26cbb5edfe) +++ Riskeer/Integration/src/Riskeer.Integration.Forms/Merge/AssessmentSectionMergeFilePathProvider.cs (.../AssessmentSectionMergeFilePathProvider.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -20,7 +20,7 @@ // All rights reserved. using System; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using RiskeerStorageResources = Riskeer.Storage.Core.Properties.Resources; namespace Riskeer.Integration.Forms.Merge Index: Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs =================================================================== diff -u -r61fba30061819e93d79682d4c85367790267c79a -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs (.../RiskeerPlugin.cs) (revision 61fba30061819e93d79682d4c85367790267c79a) +++ Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs (.../RiskeerPlugin.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -33,6 +33,7 @@ using Core.Common.Gui.Forms; using Core.Common.Gui.Forms.MainWindow; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Util; using Core.Common.Util.Extensions; Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Merge/AssessmentSectionMergeFilePathProviderTest.cs =================================================================== diff -u -rc1732a2d9814ba6e9e27d5df17721923716c1c26 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Merge/AssessmentSectionMergeFilePathProviderTest.cs (.../AssessmentSectionMergeFilePathProviderTest.cs) (revision c1732a2d9814ba6e9e27d5df17721923716c1c26) +++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Merge/AssessmentSectionMergeFilePathProviderTest.cs (.../AssessmentSectionMergeFilePathProviderTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -20,7 +20,7 @@ // All rights reserved. using System; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using NUnit.Framework; using Rhino.Mocks; using Riskeer.Integration.Forms.Merge; Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs =================================================================== diff -u -r824300c8334af59592df1efcfdff772318db561a -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs (.../MacroStabilityInwardsPlugin.cs) (revision 824300c8334af59592df1efcfdff772318db561a) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Plugin/MacroStabilityInwardsPlugin.cs (.../MacroStabilityInwardsPlugin.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -26,9 +26,9 @@ using Core.Common.Base; using Core.Common.Base.Data; using Core.Common.Controls.TreeView; -using Core.Common.Gui; using Core.Common.Gui.ContextMenu; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Util; using Riskeer.Common.Data.AssessmentSection; Index: Riskeer/Migration/src/Riskeer.Migration/ProjectMigrator.cs =================================================================== diff -u -r083ff8710fe2b75d2c141855a1abd11834b1a8e6 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Migration/src/Riskeer.Migration/ProjectMigrator.cs (.../ProjectMigrator.cs) (revision 083ff8710fe2b75d2c141855a1abd11834b1a8e6) +++ Riskeer/Migration/src/Riskeer.Migration/ProjectMigrator.cs (.../ProjectMigrator.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -25,7 +25,7 @@ using System.Linq; using System.Text; using Core.Common.Base.Storage; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Core.Common.Util; using Core.Common.Util.Settings; using log4net; Index: Riskeer/Migration/test/Riskeer.Migration.Test/ProjectMigratorTest.cs =================================================================== diff -u -r852da94031c1de463cdd55865cb788ba7ced0e69 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Migration/test/Riskeer.Migration.Test/ProjectMigratorTest.cs (.../ProjectMigratorTest.cs) (revision 852da94031c1de463cdd55865cb788ba7ced0e69) +++ Riskeer/Migration/test/Riskeer.Migration.Test/ProjectMigratorTest.cs (.../ProjectMigratorTest.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -25,7 +25,7 @@ using System.Linq; using System.Text; using Core.Common.Base.Storage; -using Core.Common.Gui; +using Core.Common.Gui.Helpers; using Core.Common.TestUtil; using Core.Common.Util; using Core.Common.Util.TestUtil.Settings; Index: Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs =================================================================== diff -u -rab8b1dc5e605134dd97ac2297303d2f334050856 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision ab8b1dc5e605134dd97ac2297303d2f334050856) +++ Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -26,9 +26,9 @@ using Core.Common.Base; using Core.Common.Base.Data; using Core.Common.Controls.TreeView; -using Core.Common.Gui; using Core.Common.Gui.ContextMenu; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Util; using Riskeer.Common.Data.AssessmentSection; Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -rab8b1dc5e605134dd97ac2297303d2f334050856 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision ab8b1dc5e605134dd97ac2297303d2f334050856) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -28,6 +28,7 @@ using Core.Common.Gui; using Core.Common.Gui.ContextMenu; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Util; using Riskeer.Common.Data; Index: Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs =================================================================== diff -u -rab8b1dc5e605134dd97ac2297303d2f334050856 -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs (.../StabilityStoneCoverPlugin.cs) (revision ab8b1dc5e605134dd97ac2297303d2f334050856) +++ Riskeer/StabilityStoneCover/src/Riskeer.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs (.../StabilityStoneCoverPlugin.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -25,9 +25,9 @@ using System.Windows.Forms; using Core.Common.Base; using Core.Common.Controls.TreeView; -using Core.Common.Gui; using Core.Common.Gui.ContextMenu; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Util; using Riskeer.Common.Data.AssessmentSection; Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs =================================================================== diff -u -rbac0c99f41bec77f2479bface44072d5506fa51e -re9b8aa3e972b9f07a3201f143c26de0e3f082d49 --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision bac0c99f41bec77f2479bface44072d5506fa51e) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision e9b8aa3e972b9f07a3201f143c26de0e3f082d49) @@ -25,9 +25,9 @@ using System.Windows.Forms; using Core.Common.Base; using Core.Common.Controls.TreeView; -using Core.Common.Gui; using Core.Common.Gui.ContextMenu; using Core.Common.Gui.Forms.ProgressDialog; +using Core.Common.Gui.Helpers; using Core.Common.Gui.Plugin; using Core.Common.Util; using Riskeer.Common.Data.AssessmentSection;