Index: Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs =================================================================== diff -u -rd4e29a7ce2a255384b32daf61303c4f895a97001 -ra5a1a727ccd295ebb9f22e661eaba874e025718c --- Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision d4e29a7ce2a255384b32daf61303c4f895a97001) +++ Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision a5a1a727ccd295ebb9f22e661eaba874e025718c) @@ -135,8 +135,6 @@ { SupportEmailAddress = "www.helpdeskwater.nl", SupportPhoneNumber = "+31 (0)88-797 7102", - Copyright = "© Deltares 2016", - LicenseDescription = "Gratis", MainWindowTitle = "Ringtoets", ManualFilePath = "Ringtoets_Manual.pdf" }; Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs =================================================================== diff -u -rb6d263f3f919ce64e84f4031b94a19e0995f202c -ra5a1a727ccd295ebb9f22e661eaba874e025718c --- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision b6d263f3f919ce64e84f4031b94a19e0995f202c) +++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision a5a1a727ccd295ebb9f22e661eaba874e025718c) @@ -631,10 +631,7 @@ { var aboutDialog = new SplashScreen.SplashScreen { - HasProgress = false, VersionText = SettingsHelper.ApplicationVersion, - CopyrightText = settings.FixedSettings.Copyright, - LicenseText = settings.FixedSettings.LicenseDescription, SupportEmail = settings.FixedSettings.SupportEmailAddress, SupportPhoneNumber = settings.FixedSettings.SupportPhoneNumber, AllowsTransparency = false, Index: Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml =================================================================== diff -u -rc2ea25a7c137c0b98a51734ca53674ddabb5164f -ra5a1a727ccd295ebb9f22e661eaba874e025718c --- Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml (.../SplashScreen.xaml) (revision c2ea25a7c137c0b98a51734ca53674ddabb5164f) +++ Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml (.../SplashScreen.xaml) (revision a5a1a727ccd295ebb9f22e661eaba874e025718c) @@ -1,36 +1,21 @@  - + - - - Index: Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml.cs =================================================================== diff -u -rb743d495d10779d51c8f75b7cb04b5babb4b226f -ra5a1a727ccd295ebb9f22e661eaba874e025718c --- Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml.cs (.../SplashScreen.xaml.cs) (revision b743d495d10779d51c8f75b7cb04b5babb4b226f) +++ Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml.cs (.../SplashScreen.xaml.cs) (revision a5a1a727ccd295ebb9f22e661eaba874e025718c) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Windows; using System.Windows.Media; @@ -30,57 +29,26 @@ /// public partial class SplashScreen { - private string progressText; - private int progressValuePercent; - private string licenseText; - private string copyrightText; private string versionText; - private bool hasProgress; - private string supportPhoneNumber; private string supportEmailAddress; /// - /// Initializes a new instance of the class with a progress - /// bar from 0 to 100%. + /// Initializes a new instance of the class. /// public SplashScreen() { InitializeComponent(); - ProgressBar.Maximum = 100; // classic percentage approach, there is no need for the splash screen to be more precise - - HasProgress = true; - ProgressValuePercent = 0; - ProgressText = ""; - CopyrightText = ""; - LicenseText = ""; VersionText = ""; } /// - /// Gets or sets a value indicating whether or not the progress bar and progress - /// label are visible in the window. - /// - public bool HasProgress - { - get - { - return hasProgress; - } - set - { - hasProgress = value; - InvalidateVisual(); - } - } - - /// /// Gets or sets the version to be shown. /// public string VersionText { - get + private get { return versionText; } @@ -92,70 +60,6 @@ } /// - /// Gets or sets the copyright owner to be shown. - /// - public string CopyrightText - { - get - { - return copyrightText; - } - set - { - copyrightText = value; - InvalidateVisual(); - } - } - - /// - /// Gets or sets the type of the license, plain text. - /// - public string LicenseText - { - get - { - return licenseText; - } - set - { - licenseText = value; - InvalidateVisual(); - } - } - - /// - /// Gets or sets the percentage value (in the range [0, 100]) to be set as progress indication. - /// - public int ProgressValuePercent - { - get - { - return progressValuePercent; - } - set - { - progressValuePercent = value; - InvalidateVisual(); - } - } - - /// - /// Gets or sets the descriptive text for current status of the progress. - /// - public string ProgressText - { - get - { - return progressText; - } - set - { - progressText = value; - InvalidateVisual(); - } - } - - /// /// Gets or sets the support e-mail. /// public string SupportEmail @@ -200,49 +104,17 @@ { base.OnRender(drawingContext); - if (LabelLicense.Content.ToString() != LicenseText) - { - LabelLicense.Content = LicenseText; - } - - if (LabelCopyright.Content.ToString() != CopyrightText) - { - LabelCopyright.Content = CopyrightText; - } - if (LabelVersion.Content.ToString() != VersionText) { LabelVersion.Content = VersionText; } SetSupportValues(); - - var progressVisibility = HasProgress ? Visibility.Visible : Visibility.Hidden; - - ProgressBar.Visibility = progressVisibility; - LabelProgressBar.Visibility = progressVisibility; - LabelProgressMessage.Visibility = progressVisibility; - - if (!HasProgress) - { - return; // no need to update progress related labels below - } - - if (ProgressBar.Value != ProgressValuePercent) - { - ProgressBar.Value = ProgressValuePercent; - LabelProgressBar.Content = string.Format("{0} %", ProgressValuePercent); - } - - if (LabelProgressMessage.Content.ToString() != ProgressText) - { - LabelProgressMessage.Content = ProgressText; - } } private void SetSupportValues() { - var supportVisibility = (String.IsNullOrWhiteSpace(SupportPhoneNumber) || String.IsNullOrWhiteSpace(SupportEmail)) ? Visibility.Collapsed : Visibility.Visible; + var supportVisibility = (string.IsNullOrWhiteSpace(SupportPhoneNumber) || string.IsNullOrWhiteSpace(SupportEmail)) ? Visibility.Collapsed : Visibility.Visible; LabelSupportTitle.Visibility = supportVisibility; LabelSupportPhoneNumberTitle.Visibility = supportVisibility; Index: Core/Common/src/Core.Common.Gui/GuiCore.cs =================================================================== diff -u -ra32bbe3919b6babd74ae4867e8337662aed0dad2 -ra5a1a727ccd295ebb9f22e661eaba874e025718c --- Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision a32bbe3919b6babd74ae4867e8337662aed0dad2) +++ Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision a5a1a727ccd295ebb9f22e661eaba874e025718c) @@ -414,8 +414,6 @@ splashScreen = new SplashScreen { VersionText = SettingsHelper.ApplicationVersion, - CopyrightText = FixedSettings.Copyright, - LicenseText = FixedSettings.LicenseDescription }; splashScreen.IsVisibleChanged += delegate Index: Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs =================================================================== diff -u -rb6d263f3f919ce64e84f4031b94a19e0995f202c -ra5a1a727ccd295ebb9f22e661eaba874e025718c --- Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision b6d263f3f919ce64e84f4031b94a19e0995f202c) +++ Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a5a1a727ccd295ebb9f22e661eaba874e025718c) @@ -1299,42 +1299,6 @@ } /// - /// Looks up a localized string similar to Copyright. - /// - public static string SplashScreen_CopyRights { - get { - return ResourceManager.GetString("SplashScreen_CopyRights", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Gratis. - /// - public static string SplashScreen_Free { - get { - return ResourceManager.GetString("SplashScreen_Free", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Licentie. - /// - public static string SplashScreen_License { - get { - return ResourceManager.GetString("SplashScreen_License", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Opstarten.... - /// - public static string SplashScreen_Starting { - get { - return ResourceManager.GetString("SplashScreen_Starting", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Website. /// public static string SplashScreen_SupportEmail { @@ -1344,7 +1308,7 @@ } /// - /// Looks up a localized string similar to Telefoonnummer. + /// Looks up a localized string similar to Telefoon. /// public static string SplashScreen_SupportPhoneNumber { get { @@ -1353,7 +1317,7 @@ } /// - /// Looks up a localized string similar to Heeft u vragen of opmerkingen, neem dan contact op met Helpdesk Water.. + /// Looks up a localized string similar to Voor vragen, Helpdesk Water.. /// public static string SplashScreen_SupportTitle { get { Index: Core/Common/src/Core.Common.Gui/Properties/Resources.resx =================================================================== diff -u -rb6d263f3f919ce64e84f4031b94a19e0995f202c -ra5a1a727ccd295ebb9f22e661eaba874e025718c --- Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision b6d263f3f919ce64e84f4031b94a19e0995f202c) +++ Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision a5a1a727ccd295ebb9f22e661eaba874e025718c) @@ -349,18 +349,6 @@ Ringtoets kan de huidige selectie ({0}) niet exporteren. - - Copyright - - - Gratis - - - Licentie - - - Opstarten... - Versie @@ -545,10 +533,10 @@ Website - Telefoonnummer + Telefoon - Heeft u vragen of opmerkingen, neem dan contact op met Helpdesk Water. + Voor vragen, Helpdesk Water. Onbekend Index: Core/Common/src/Core.Common.Gui/Resources/SplashScreenBackground.png =================================================================== diff -u -r333dade0cdeaee761e0070129286120ffec849a6 -ra5a1a727ccd295ebb9f22e661eaba874e025718c Binary files differ Index: Core/Common/src/Core.Common.Gui/Settings/GuiCoreSettings.cs =================================================================== diff -u -rd4e29a7ce2a255384b32daf61303c4f895a97001 -ra5a1a727ccd295ebb9f22e661eaba874e025718c --- Core/Common/src/Core.Common.Gui/Settings/GuiCoreSettings.cs (.../GuiCoreSettings.cs) (revision d4e29a7ce2a255384b32daf61303c4f895a97001) +++ Core/Common/src/Core.Common.Gui/Settings/GuiCoreSettings.cs (.../GuiCoreSettings.cs) (revision a5a1a727ccd295ebb9f22e661eaba874e025718c) @@ -37,16 +37,6 @@ public string SupportPhoneNumber { get; set; } /// - /// Gets or sets the copyright to show in the graphical user interface. - /// - public string Copyright { get; set; } - - /// - /// Gets or sets the license description to show in the graphical user interface. - /// - public string LicenseDescription { get; set; } - - /// /// Gets or sets the title to show in the main window of the graphical user interface. /// public string MainWindowTitle { get; set; } Index: Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreen/SplashScreenTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -ra5a1a727ccd295ebb9f22e661eaba874e025718c --- Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreen/SplashScreenTest.cs (.../SplashScreenTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreen/SplashScreenTest.cs (.../SplashScreenTest.cs) (revision a5a1a727ccd295ebb9f22e661eaba874e025718c) @@ -23,7 +23,6 @@ using System.Windows.Controls; using System.Windows.Media; using NUnit.Framework; -using Application = System.Windows.Forms.Application; namespace Core.Common.Gui.Test.Forms.SplashScreen { @@ -53,30 +52,21 @@ public void ViewProperties_SetNewValues_ShouldSetLabelTextOfUserInterfaceElements() { // Setup - const string strCopyright = "Copy1"; - const string strLicense = "License1"; const string strVersion = "Version1"; - const string strProgressText = "SomeProgress1"; const string supportEmail = ""; const string supportPhone = ""; // Call var screen = new Gui.Forms.SplashScreen.SplashScreen { - CopyrightText = strCopyright, - LicenseText = strLicense, VersionText = strVersion, - ProgressText = strProgressText, SupportEmail = supportEmail, SupportPhoneNumber = supportPhone }; screen.Show(); // Assert Assert.AreEqual(strVersion, GetLabelText(screen, "LabelVersion")); - Assert.AreEqual(strLicense, GetLabelText(screen, "LabelLicense")); - Assert.AreEqual(strCopyright, GetLabelText(screen, "LabelCopyright")); - Assert.AreEqual(strProgressText, GetLabelText(screen, "LabelProgressMessage")); Assert.AreEqual(supportEmail, GetLabelText(screen, "LabelSupportEmailAddress")); Assert.AreEqual(supportPhone, GetLabelText(screen, "LabelSupportPhoneNumber")); @@ -117,36 +107,8 @@ screen.Close(); } - [Test] - [RequiresSTA] - public void HasProgress_SetToFalse_HideProgressBarRelatedUserInterfaceElements() + private static FrameworkElement FindControlRecursively(FrameworkElement parent, string name) { - // Setup - var screen = new Gui.Forms.SplashScreen.SplashScreen(); - screen.Show(); - - // Precondition: - Assert.IsTrue(screen.HasProgress, "Initially, the progress should be visible"); - Assert.IsTrue(GetIsControlVisible(screen, "ProgressBar")); - Assert.IsTrue(GetIsControlVisible(screen, "LabelProgressMessage")); - Assert.IsTrue(GetIsControlVisible(screen, "LabelProgressBar")); - - // Call - screen.HasProgress = false; - Application.DoEvents(); // creating space for lazy-updating to do its work - - // Assert - Assert.IsFalse(screen.HasProgress, "HasProgress is changed to FALSE by now"); - Assert.IsFalse(GetIsControlVisible(screen, "ProgressBar")); - Assert.IsFalse(GetIsControlVisible(screen, "LabelProgressMessage")); - Assert.IsFalse(GetIsControlVisible(screen, "LabelProgressBar")); - - // Teardown - screen.Close(); - } - - private FrameworkElement FindControlRecursively(FrameworkElement parent, string name) - { var childrenCount = VisualTreeHelper.GetChildrenCount(parent); FrameworkElement foundChild = null; for (var childIndex = 0; childIndex < childrenCount; childIndex++) @@ -163,13 +125,13 @@ return foundChild; } - private string GetLabelText(FrameworkElement parent, string labelName) + private static string GetLabelText(FrameworkElement parent, string labelName) { var label = FindControlRecursively(parent, labelName) as Label; return (label != null) ? label.Content.ToString() : ""; } - private bool GetIsControlVisible(FrameworkElement parent, string ctrlName) + private static bool GetIsControlVisible(FrameworkElement parent, string ctrlName) { var ctrl = FindControlRecursively(parent, ctrlName) as Control; return ctrl != null && ctrl.IsVisible;