Index: Riskeer/Common/src/Riskeer.Common.Forms/Controls/AssemblyResultControl.Designer.cs =================================================================== diff -u -r96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a -r6cd178a9e075fe86c45cf420d0625e05a2bbd312 --- Riskeer/Common/src/Riskeer.Common.Forms/Controls/AssemblyResultControl.Designer.cs (.../AssemblyResultControl.Designer.cs) (revision 96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a) +++ Riskeer/Common/src/Riskeer.Common.Forms/Controls/AssemblyResultControl.Designer.cs (.../AssemblyResultControl.Designer.cs) (revision 6cd178a9e075fe86c45cf420d0625e05a2bbd312) @@ -56,7 +56,6 @@ this.GroupPanel = new System.Windows.Forms.TableLayoutPanel(); this.GroupLabel = new Core.Common.Controls.BorderedLabel(); this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); - this.manualAssemblyWarningProvider = new System.Windows.Forms.ErrorProvider(this.components); this.GroupPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); this.SuspendLayout(); @@ -95,12 +94,6 @@ this.errorProvider.ContainerControl = this; this.errorProvider.Icon = global::Riskeer.Common.Forms.Properties.Resources.ErrorIcon; // - // warningProvider - // - this.manualAssemblyWarningProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink; - this.manualAssemblyWarningProvider.ContainerControl = this; - this.manualAssemblyWarningProvider.Icon = global::Riskeer.Common.Forms.Properties.Resources.PencilWarning; - // // AssemblyResultControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -112,7 +105,6 @@ this.GroupPanel.ResumeLayout(false); this.GroupPanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.manualAssemblyWarningProvider)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -121,7 +113,6 @@ #endregion protected System.Windows.Forms.TableLayoutPanel GroupPanel; private System.Windows.Forms.ErrorProvider errorProvider; - private System.Windows.Forms.ErrorProvider manualAssemblyWarningProvider; protected BorderedLabel GroupLabel; } } Index: Riskeer/Common/src/Riskeer.Common.Forms/Controls/AssemblyResultControl.cs =================================================================== diff -u -r96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a -r6cd178a9e075fe86c45cf420d0625e05a2bbd312 --- Riskeer/Common/src/Riskeer.Common.Forms/Controls/AssemblyResultControl.cs (.../AssemblyResultControl.cs) (revision 96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a) +++ Riskeer/Common/src/Riskeer.Common.Forms/Controls/AssemblyResultControl.cs (.../AssemblyResultControl.cs) (revision 6cd178a9e075fe86c45cf420d0625e05a2bbd312) @@ -22,7 +22,6 @@ using System; using System.Drawing; using System.Windows.Forms; -using Riskeer.Common.Forms.Properties; namespace Riskeer.Common.Forms.Controls { @@ -54,23 +53,13 @@ errorProvider.SetError(this, errorMessage); } - + /// - /// Sets a manual assembly warning message on the control. - /// - public void SetManualAssemblyWarning() - { - manualAssemblyWarningProvider.SetIconPadding(this, string.IsNullOrEmpty(errorProvider.GetError(this)) ? 4 : 24); - manualAssemblyWarningProvider.SetError(this, Resources.ManualAssemblyWarning_FailureMechanismAssemblyResult_is_based_on_manual_assemblies); - } - - /// /// Clears the messages of the control. /// public void ClearMessages() { errorProvider.SetError(this, string.Empty); - manualAssemblyWarningProvider.SetError(this, string.Empty); } /// Index: Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -rc08ab9a9934129758efbef975c69d54f927720c3 -r6cd178a9e075fe86c45cf420d0625e05a2bbd312 --- Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision c08ab9a9934129758efbef975c69d54f927720c3) +++ Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6cd178a9e075fe86c45cf420d0625e05a2bbd312) @@ -2558,16 +2558,6 @@ } /// - /// Looks up a localized string similar to Toetsoordeel is (deels) gebaseerd op handmatig overschreven toetsoordelen.. - /// - public static string ManualAssemblyWarning_FailureMechanismAssemblyResult_is_based_on_manual_assemblies { - get { - return ResourceManager.GetString("ManualAssemblyWarning_FailureMechanismAssemblyResult_is_based_on_manual_assemblie" + - "s", resourceCulture); - } - } - - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// public static System.Drawing.Bitmap MapsIcon { Index: Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.resx =================================================================== diff -u -rc08ab9a9934129758efbef975c69d54f927720c3 -r6cd178a9e075fe86c45cf420d0625e05a2bbd312 --- Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision c08ab9a9934129758efbef975c69d54f927720c3) +++ Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision 6cd178a9e075fe86c45cf420d0625e05a2bbd312) @@ -1376,10 +1376,6 @@ Modelfactor voor een lange overlaat. - - Toetsoordeel is (deels) gebaseerd op handmatig overschreven toetsoordelen. - ..\Resources\pencil--exclamation.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Controls/AssemblyResultControlTest.cs =================================================================== diff -u -r96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a -r6cd178a9e075fe86c45cf420d0625e05a2bbd312 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Controls/AssemblyResultControlTest.cs (.../AssemblyResultControlTest.cs) (revision 96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Controls/AssemblyResultControlTest.cs (.../AssemblyResultControlTest.cs) (revision 6cd178a9e075fe86c45cf420d0625e05a2bbd312) @@ -64,11 +64,6 @@ TestHelper.AssertImagesAreEqual(Resources.ErrorIcon.ToBitmap(), errorProvider.Icon.ToBitmap()); Assert.AreEqual(ErrorBlinkStyle.NeverBlink, errorProvider.BlinkStyle); Assert.IsEmpty(errorProvider.GetError(resultControl)); - - ErrorProvider manualAssemblyWarningProvider = GetManualAssemblyWarningProvider(resultControl); - TestHelper.AssertImagesAreEqual(Resources.PencilWarning.ToBitmap(), manualAssemblyWarningProvider.Icon.ToBitmap()); - Assert.AreEqual(ErrorBlinkStyle.NeverBlink, manualAssemblyWarningProvider.BlinkStyle); - Assert.IsEmpty(manualAssemblyWarningProvider.GetError(resultControl)); } } @@ -104,65 +99,22 @@ } } - [Test] - public void SetManualAssemblyWarning_Always_SetsWarningMessageOnControl() - { - // Setup - using (var resultControl = new TestAssemblyResultControl()) - { - // Call - resultControl.SetManualAssemblyWarning(); - // Assert - ErrorProvider manualAssemblyWarningProvider = GetManualAssemblyWarningProvider(resultControl); - Assert.AreEqual("Toetsoordeel is (deels) gebaseerd op handmatig overschreven toetsoordelen.", manualAssemblyWarningProvider.GetError(resultControl)); - } - } [Test] - [TestCase(true, 24)] - [TestCase(false, 4)] - public void GivenControlWithOrWithoutErrorMessage_WhenManualAssemblyWarningSet_ThenWarningSetWithExpectedPadding(bool hasError, int expectedPadding) - { - // Given - using (var resultControl = new TestAssemblyResultControl()) - { - if (hasError) - { - resultControl.SetError("Error"); - } - - // Precondition - ErrorProvider errorProvider = GetErrorProvider(resultControl); - Assert.AreEqual(hasError, !string.IsNullOrEmpty(errorProvider.GetError(resultControl))); - - // When - resultControl.SetManualAssemblyWarning(); - - // Then - ErrorProvider manualAssemblyWarningProvider = GetManualAssemblyWarningProvider(resultControl); - Assert.AreEqual(expectedPadding, manualAssemblyWarningProvider.GetIconPadding(resultControl)); - } - } - - [Test] public void GivenControlWithMessages_WhenMessagesCleared_ThenMessagesCleared() { // Given using (var resultControl = new TestAssemblyResultControl()) { resultControl.SetError("Error"); - resultControl.SetManualAssemblyWarning(); // When resultControl.ClearMessages(); // Then ErrorProvider errorProvider = GetErrorProvider(resultControl); Assert.IsEmpty(errorProvider.GetError(resultControl)); - - ErrorProvider manualAssemblyWarningProvider = GetManualAssemblyWarningProvider(resultControl); - Assert.IsEmpty(manualAssemblyWarningProvider.GetError(resultControl)); } } @@ -189,12 +141,7 @@ { return TypeUtils.GetField(resultControl, "errorProvider"); } - - private static ErrorProvider GetManualAssemblyWarningProvider(AssemblyResultControl resultControl) - { - return TypeUtils.GetField(resultControl, "manualAssemblyWarningProvider"); - } - + private static TableLayoutPanel GetGroupPanel(AssemblyResultControl resultControl) { return (TableLayoutPanel) resultControl.Controls["GroupPanel"];