Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -re3ec2032dae80920c5e0d524de0f10387caf00c3 -rbfd888d1102f04ff8d56e2e90c0d4ebea559f2e3 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision e3ec2032dae80920c5e0d524de0f10387caf00c3) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision bfd888d1102f04ff8d56e2e90c0d4ebea559f2e3) @@ -1590,6 +1590,15 @@ } /// + /// Looks up a localized string similar to Assemblageresultaat voor dit toetsspoor:. + /// + public static string FailureMechanismResultView_FailureMechanismAssemblyLabel { + get { + return ResourceManager.GetString("FailureMechanismResultView_FailureMechanismAssemblyLabel", resourceCulture); + } + } + + /// /// Looks up a localized string similar to NVT - Niet Van Toepassing ///WVT - Wel Van Toepassing ///FV - Faalkans Verwaarloosbaar Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx =================================================================== diff -u -re3ec2032dae80920c5e0d524de0f10387caf00c3 -rbfd888d1102f04ff8d56e2e90c0d4ebea559f2e3 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision e3ec2032dae80920c5e0d524de0f10387caf00c3) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision bfd888d1102f04ff8d56e2e90c0d4ebea559f2e3) @@ -1389,4 +1389,7 @@ ..\Resources\error.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Assemblageresultaat voor dit toetsspoor: + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj =================================================================== diff -u -r5140bb73fc70fbcb1064fa63171fde340e3f2e6d -rbfd888d1102f04ff8d56e2e90c0d4ebea559f2e3 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 5140bb73fc70fbcb1064fa63171fde340e3f2e6d) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision bfd888d1102f04ff8d56e2e90c0d4ebea559f2e3) @@ -14,6 +14,7 @@ + @@ -26,6 +27,21 @@ + + UserControl + + + AssemblyResultControl.cs + + + UserControl + + + FailureMechanismAssemblyControl.cs + + + UserControl + @@ -135,18 +151,6 @@ Component - - UserControl - - - FailureMechanismAssemblyResultWithProbabilityControl.cs - - - UserControl - - - FailureMechanismAssemblyResultControl.cs - @@ -240,6 +244,12 @@ + + AssemblyResultControl.cs + + + FailureMechanismAssemblyControl.cs + PublicResXFileCodeGenerator Designer @@ -248,13 +258,6 @@ ScenarioSelectionControl.cs - - FailureMechanismAssemblyResultWithProbabilityControl.cs - Designer - - - FailureMechanismAssemblyResultControl.cs - FailureMechanismSectionsView.cs Designer Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.Designer.cs =================================================================== diff -u -r5f7d2664694d3a9350f70b530268d1d755605e06 -rbfd888d1102f04ff8d56e2e90c0d4ebea559f2e3 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.Designer.cs (.../FailureMechanismResultView.Designer.cs) (revision 5f7d2664694d3a9350f70b530268d1d755605e06) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.Designer.cs (.../FailureMechanismResultView.Designer.cs) (revision bfd888d1102f04ff8d56e2e90c0d4ebea559f2e3) @@ -39,6 +39,7 @@ this.components = new System.ComponentModel.Container(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.TableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.failureMechanismAssemblyLabel = new System.Windows.Forms.Label(); this.infoIcon = new System.Windows.Forms.PictureBox(); this.DataGridViewControl = new Core.Common.Controls.DataGrid.DataGridViewControl(); this.TableLayoutPanel.SuspendLayout(); @@ -53,22 +54,36 @@ // // TableLayoutPanel // - this.TableLayoutPanel.ColumnCount = 2; + this.TableLayoutPanel.ColumnCount = 3; + this.TableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.TableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.TableLayoutPanel.Controls.Add(this.infoIcon, 1, 0); + this.TableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.TableLayoutPanel.Controls.Add(this.failureMechanismAssemblyLabel, 0, 0); + this.TableLayoutPanel.Controls.Add(this.infoIcon, 2, 0); this.TableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Top; this.TableLayoutPanel.Location = new System.Drawing.Point(0, 0); this.TableLayoutPanel.Name = "TableLayoutPanel"; this.TableLayoutPanel.RowCount = 1; this.TableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.TableLayoutPanel.Size = new System.Drawing.Size(500, 30); + this.TableLayoutPanel.Size = new System.Drawing.Size(764, 30); this.TableLayoutPanel.TabIndex = 1; // + // failureMechanismAssemblyLabel + // + this.failureMechanismAssemblyLabel.AutoSize = true; + this.failureMechanismAssemblyLabel.Dock = System.Windows.Forms.DockStyle.Fill; + this.failureMechanismAssemblyLabel.Location = new System.Drawing.Point(3, 0); + this.failureMechanismAssemblyLabel.Name = "failureMechanismAssemblyLabel"; + this.failureMechanismAssemblyLabel.Size = new System.Drawing.Size(57, 30); + this.failureMechanismAssemblyLabel.TabIndex = 2; + this.failureMechanismAssemblyLabel.Text = "Label Text"; + this.failureMechanismAssemblyLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // infoIcon // this.infoIcon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.infoIcon.Dock = System.Windows.Forms.DockStyle.Right; - this.infoIcon.Location = new System.Drawing.Point(477, 7); + this.infoIcon.Location = new System.Drawing.Point(741, 7); this.infoIcon.Margin = new System.Windows.Forms.Padding(7); this.infoIcon.Name = "infoIcon"; this.infoIcon.Size = new System.Drawing.Size(16, 16); @@ -82,7 +97,7 @@ this.DataGridViewControl.MultiSelect = true; this.DataGridViewControl.Name = "DataGridViewControl"; this.DataGridViewControl.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.RowHeaderSelect; - this.DataGridViewControl.Size = new System.Drawing.Size(500, 69); + this.DataGridViewControl.Size = new System.Drawing.Size(764, 52); this.DataGridViewControl.TabIndex = 0; // // FailureMechanismResultView @@ -94,8 +109,9 @@ this.Controls.Add(this.DataGridViewControl); this.Controls.Add(this.TableLayoutPanel); this.Name = "FailureMechanismResultView"; - this.Size = new System.Drawing.Size(150, 99); + this.Size = new System.Drawing.Size(764, 82); this.TableLayoutPanel.ResumeLayout(false); + this.TableLayoutPanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.infoIcon)).EndInit(); this.ResumeLayout(false); @@ -107,5 +123,6 @@ private System.Windows.Forms.ToolTip toolTip; protected System.Windows.Forms.TableLayoutPanel TableLayoutPanel; private System.Windows.Forms.PictureBox infoIcon; + private System.Windows.Forms.Label failureMechanismAssemblyLabel; } } Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs =================================================================== diff -u -r641147134a5785ec9a090a1a9966a0b15e74999b -rbfd888d1102f04ff8d56e2e90c0d4ebea559f2e3 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs (.../FailureMechanismResultView.cs) (revision 641147134a5785ec9a090a1a9966a0b15e74999b) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs (.../FailureMechanismResultView.cs) (revision bfd888d1102f04ff8d56e2e90c0d4ebea559f2e3) @@ -50,7 +50,7 @@ private readonly Observer failureMechanismObserver; private readonly Observer failureMechanismSectionResultObserver; private readonly RecursiveObserver, TSectionResult> failureMechanismSectionResultsObserver; - private FailureMechanismAssemblyResultControl failureMechanismAssemblyResultControl; + private AssemblyResultControl failureMechanismAssemblyResultControl; private Action setFailureMechanismAssemblyResultAction; private IEnumerable sectionResultRows; @@ -76,7 +76,7 @@ } InitializeComponent(); - InitializeInfoIcon(); + InitializeFailureMechanismAssemblyComponents(); FailureMechanism = failureMechanism; this.failureMechanismSectionResults = failureMechanismSectionResults; @@ -175,12 +175,12 @@ /// /// The control to set on the view. /// The action to perform to update the data of the control. - protected void SetFailureMechanismAssemblyResultControl(FailureMechanismAssemblyResultControl control, + protected void SetFailureMechanismAssemblyResultControl(AssemblyResultControl control, Action setResultAction) { failureMechanismAssemblyResultControl = control; setFailureMechanismAssemblyResultAction = setResultAction; - TableLayoutPanel.Controls.Add(failureMechanismAssemblyResultControl, 0, 0); + TableLayoutPanel.Controls.Add(failureMechanismAssemblyResultControl, 1, 0); } /// @@ -208,10 +208,11 @@ } } - private void InitializeInfoIcon() + private void InitializeFailureMechanismAssemblyComponents() { infoIcon.BackgroundImage = CoreCommonGuiResources.information; toolTip.SetToolTip(infoIcon, Resources.FailureMechanismResultView_InfoToolTip); + failureMechanismAssemblyLabel.Text = Resources.FailureMechanismResultView_FailureMechanismAssemblyLabel; } private void RemoveSectionResultRowEvents() Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj =================================================================== diff -u -r5140bb73fc70fbcb1064fa63171fde340e3f2e6d -rbfd888d1102f04ff8d56e2e90c0d4ebea559f2e3 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision 5140bb73fc70fbcb1064fa63171fde340e3f2e6d) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision bfd888d1102f04ff8d56e2e90c0d4ebea559f2e3) @@ -50,8 +50,9 @@ - - + + + Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs =================================================================== diff -u -r5140bb73fc70fbcb1064fa63171fde340e3f2e6d -rbfd888d1102f04ff8d56e2e90c0d4ebea559f2e3 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs (.../FailureMechanismResultViewTest.cs) (revision 5140bb73fc70fbcb1064fa63171fde340e3f2e6d) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs (.../FailureMechanismResultViewTest.cs) (revision bfd888d1102f04ff8d56e2e90c0d4ebea559f2e3) @@ -82,10 +82,17 @@ Assert.AreEqual(2, view.Controls.Count); var tableLayoutPanel = (TableLayoutPanel) new ControlTester("TableLayoutPanel").TheObject; - Assert.AreEqual(2, tableLayoutPanel.ColumnCount); + Assert.AreEqual(3, tableLayoutPanel.ColumnCount); Assert.AreEqual(1, tableLayoutPanel.RowCount); - Assert.IsInstanceOf(tableLayoutPanel.GetControlFromPosition(1, 0)); + var assemblyResultLabel = (Label) tableLayoutPanel.GetControlFromPosition(0, 0); + Assert.IsTrue(assemblyResultLabel.AutoSize); + Assert.AreEqual(DockStyle.Fill, assemblyResultLabel.Dock); + Assert.AreEqual(ContentAlignment.MiddleLeft, assemblyResultLabel.TextAlign); + Assert.AreEqual("Assemblageresultaat voor dit toetsspoor:", assemblyResultLabel.Text); + + Assert.IsInstanceOf(tableLayoutPanel.GetControlFromPosition(2, 0)); + Assert.IsInstanceOf(view); Assert.IsInstanceOf(view); Assert.IsNull(view.Data); @@ -335,7 +342,7 @@ { // Precondition BorderedLabel assemblyGroupLabel = GetGroupLabel(); - FailureMechanismAssemblyResultControl resultControl = GetFailureMechanismAssemblyResultControl(); + FailureMechanismAssemblyCategoryGroupControl resultControl = GetFailureMechanismAssemblyCategoryGroupControl(); ErrorProvider errorProvider = GetErrorProvider(resultControl); Assert.AreEqual(Color.FromArgb(255, 255, 0), assemblyGroupLabel.BackColor); Assert.IsEmpty(errorProvider.GetError(resultControl)); @@ -369,7 +376,7 @@ // Precondition BorderedLabel assemblyGroupLabel = GetGroupLabel(); - FailureMechanismAssemblyResultControl resultControl = GetFailureMechanismAssemblyResultControl(); + FailureMechanismAssemblyCategoryGroupControl resultControl = GetFailureMechanismAssemblyCategoryGroupControl(); ErrorProvider errorProvider = GetErrorProvider(resultControl); Assert.AreEqual(Color.White, assemblyGroupLabel.BackColor); Assert.AreEqual("Message", errorProvider.GetError(resultControl)); @@ -455,14 +462,14 @@ return (DataGridView) new ControlTester("dataGridView").TheObject; } - private static ErrorProvider GetErrorProvider(FailureMechanismAssemblyResultControl resultControl) + private static ErrorProvider GetErrorProvider(FailureMechanismAssemblyCategoryGroupControl resultControl) { return TypeUtils.GetField(resultControl, "ErrorProvider"); } - private static FailureMechanismAssemblyResultControl GetFailureMechanismAssemblyResultControl() + private static FailureMechanismAssemblyCategoryGroupControl GetFailureMechanismAssemblyCategoryGroupControl() { - return (FailureMechanismAssemblyResultControl) new ControlTester("FailureMechanismAssemblyResultControl").TheObject; + return (FailureMechanismAssemblyCategoryGroupControl) new ControlTester("AssemblyResultControl").TheObject; } private TestFailureMechanismResultView ShowFailureMechanismResultsView(IObservableEnumerable sectionResults) @@ -484,7 +491,7 @@ public TestFailureMechanismResultView(IObservableEnumerable failureMechanismSectionResults, TestFailureMechanism failureMechanism) : base(failureMechanismSectionResults, failureMechanism) { - var failureMechanismAssemblyResultControl = new FailureMechanismAssemblyResultControl(); + var failureMechanismAssemblyResultControl = new FailureMechanismAssemblyCategoryGroupControl(); SetFailureMechanismAssemblyResultControl( failureMechanismAssemblyResultControl, () => Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyCategoryGroupControlTester.cs =================================================================== diff -u -r96e729865d3978156ee7d869c1f45f51dae51bcd -rbfd888d1102f04ff8d56e2e90c0d4ebea559f2e3 --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyCategoryGroupControlTester.cs (.../FailureMechanismAssemblyCategoryGroupControlTester.cs) (revision 96e729865d3978156ee7d869c1f45f51dae51bcd) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyCategoryGroupControlTester.cs (.../FailureMechanismAssemblyCategoryGroupControlTester.cs) (revision bfd888d1102f04ff8d56e2e90c0d4ebea559f2e3) @@ -75,7 +75,7 @@ { // Assert var assemblyResultPanel = (TableLayoutPanel) new ControlTester("TableLayoutPanel").TheObject; - var assemblyResultControl = (FailureMechanismAssemblyCategoryGroupControl) assemblyResultPanel.GetControlFromPosition(0, 0); + var assemblyResultControl = (FailureMechanismAssemblyCategoryGroupControl) assemblyResultPanel.GetControlFromPosition(1, 0); Assert.IsInstanceOf(assemblyResultControl); Assert.AreEqual(DockStyle.Left, assemblyResultControl.Dock); Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyResultWithProbabilityControlTester.cs =================================================================== diff -u -r5140bb73fc70fbcb1064fa63171fde340e3f2e6d -rbfd888d1102f04ff8d56e2e90c0d4ebea559f2e3 --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyResultWithProbabilityControlTester.cs (.../FailureMechanismAssemblyResultWithProbabilityControlTester.cs) (revision 5140bb73fc70fbcb1064fa63171fde340e3f2e6d) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyResultWithProbabilityControlTester.cs (.../FailureMechanismAssemblyResultWithProbabilityControlTester.cs) (revision bfd888d1102f04ff8d56e2e90c0d4ebea559f2e3) @@ -37,15 +37,15 @@ namespace Ringtoets.Common.Forms.TestUtil { /// - /// Class for testing data and styling in a view with a . + /// Class for testing data and styling in a view with a . /// /// The type of the view to test. /// The type of the failure mechanism the view belongs to. /// The type of the section results shown in the view. /// The type of the presentation objects used in the view. /// The type of calculations to get the input from. /// The type of the input of a calculation. - public abstract class FailureMechanismAssemblyResultWithProbabilityControlTester + public abstract class FailureMechanismAssemblyControlTester where TView : FailureMechanismResultView where TFailureMechanism : IFailureMechanism, IHasSectionResults, ICalculatableFailureMechanism, new() where TSectionResult : FailureMechanismSectionResult @@ -80,9 +80,9 @@ { // Assert var assemblyResultPanel = (TableLayoutPanel) new ControlTester("TableLayoutPanel").TheObject; - var assemblyResultControl = (FailureMechanismAssemblyResultWithProbabilityControl) assemblyResultPanel.GetControlFromPosition(0, 0); + var assemblyResultControl = (FailureMechanismAssemblyControl) assemblyResultPanel.GetControlFromPosition(1, 0); - Assert.IsInstanceOf(assemblyResultControl); + Assert.IsInstanceOf(assemblyResultControl); Assert.AreEqual(DockStyle.Left, assemblyResultControl.Dock); } } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Ringtoets.Common.Forms.TestUtil.csproj =================================================================== diff -u -r5e48139fe1e5e5a7b54530bc42fcb1e0c0a3b9da -rbfd888d1102f04ff8d56e2e90c0d4ebea559f2e3 --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Ringtoets.Common.Forms.TestUtil.csproj (.../Ringtoets.Common.Forms.TestUtil.csproj) (revision 5e48139fe1e5e5a7b54530bc42fcb1e0c0a3b9da) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Ringtoets.Common.Forms.TestUtil.csproj (.../Ringtoets.Common.Forms.TestUtil.csproj) (revision bfd888d1102f04ff8d56e2e90c0d4ebea559f2e3) @@ -22,7 +22,7 @@ - +