Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionCommentView.cs =================================================================== diff -u -r504f726111ede24adc838a345fdcd1c47227c79b -r883c1c27b5590d21a05a293a74206dc45e203cee --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionCommentView.cs (.../AssessmentSectionCommentView.cs) (revision 504f726111ede24adc838a345fdcd1c47227c79b) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionCommentView.cs (.../AssessmentSectionCommentView.cs) (revision 883c1c27b5590d21a05a293a74206dc45e203cee) @@ -19,7 +19,9 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Windows.Forms; +using Core.Common.Controls.TextEditor; using Core.Common.Controls.Views; using Ringtoets.Common.Data; @@ -30,14 +32,17 @@ /// public partial class AssessmentSectionCommentView : UserControl, IView { - private object data; + private IAssessmentSection data; + private RichTextBoxControl richTextEditor; /// /// Creates a new instance of . /// public AssessmentSectionCommentView() { InitializeComponent(); + + InitializeRichTextEditor(); } public object Data @@ -49,7 +54,28 @@ set { data = value as IAssessmentSection; + + if (data != null) + { + richTextEditor.Text = data.Comments; + } } } + + private void InitializeRichTextEditor() + { + richTextEditor = new RichTextBoxControl + { + Dock = DockStyle.Fill + }; + Controls.Add(richTextEditor); + + richTextEditor.TextBoxValueChanged += RichTextEditorOnTextChanged; + } + + private void RichTextEditorOnTextChanged(object sender, EventArgs eventArgs) + { + data.Comments = richTextEditor.Text; + } } -} +} \ No newline at end of file