private ViewportWindow CreateWindow(MapDocumentControlWindowConfiguration config) { var window = new ViewportWindow(config); window.Closed += DestroyWindow; Windows.Add(window); window.Show(_shell); return(window); }
private static void CreateViewportWindow(ViewportWindowConfiguration config) { var win = new ViewportWindow(config.Configuration); win.Text += " - Window " + config.WindowID; LoadViewports(win.TableSplitControl, config); Windows.Add(win); win.Closed += (s, e) => { Windows.Remove(win); win.Dispose(); }; win.Show(Editor.Instance); if (!config.Size.IsEmpty) { win.Location = config.Size.Location; win.Size = config.Size.Size; win.WindowState = config.Maximised ? FormWindowState.Maximized : FormWindowState.Normal; } }