using System; using System.Drawing; using System.Windows.Forms; using Core.Common.Controls.Swf.TreeViewControls; using Core.Common.Gui; using Ringtoets.Common.Forms.NodePresenters; using Ringtoets.Piping.Data; using Ringtoets.Piping.Forms.Properties; namespace Ringtoets.Piping.Forms.NodePresenters { /// /// Node presenter for data nodes in the project tree view. /// public class PipingSurfaceLineNodePresenter : RingtoetsNodePresenterBase { /// /// Creates a new instance of , which uses the /// to create and bind its . /// /// The /// to use for building a . /// Thrown when no was provided. public PipingSurfaceLineNodePresenter(IContextMenuBuilderProvider contextMenuBuilderProvider) : base(contextMenuBuilderProvider) { } protected override void UpdateNode(ITreeNode parentNode, ITreeNode node, RingtoetsPipingSurfaceLine nodeData) { node.Text = nodeData.Name; node.Image = Resources.PipingSurfaceLineIcon; node.ForegroundColor = Color.FromKnownColor(KnownColor.ControlText); } protected override ContextMenuStrip GetContextMenu(ITreeNode node, RingtoetsPipingSurfaceLine nodeData) { return contextMenuBuilderProvider .Get(node) .AddPropertiesItem() .Build(); } } }