using System.Windows.Forms; using PolyTrader.Core.Modularity; namespace PolyTraderSharp.Ui { /// /// Generisches Host-Fenster für genau eine . Erzeugt das /// (designbare) Control der View und dockt es formfüllend. Die Shell öffnet je View /// höchstens eine Instanz (siehe ). /// public class ViewHostForm : Form { public string ViewId { get; } public ViewHostForm(ModuleView view) { ViewId = view.Id; Text = view.Title; Width = view.PreferredWidth; Height = view.PreferredHeight; StartPosition = FormStartPosition.CenterScreen; var control = view.CreateControl(); control.Dock = DockStyle.Fill; Controls.Add(control); } } }