internal void ShowNfp() { if (nfp == null) { nfp = new NFPOperationsDockPanel(); nfp.Show(this, DockState.DockBottom); } }
public Pad2DMainPanel() { Theme = new VS2015LightTheme(); bool loaded = false; if (File.Exists("layout2d.xml")) { try { LoadFromXml("layout2d.xml", (x) => { var tps = Assembly.GetExecutingAssembly().GetTypes(); var fr = tps.First(z => z.FullName.Contains(x)); var ret = Activator.CreateInstance(fr) as IDockContent; if (ret is Viewer2DDockPanel vv) { view = vv; } if (ret is OtherOperationsDockPanel oo) { other = oo; } if (ret is PropertiesListDockPanel p1) { prop = p1; } if (ret is NFPOperationsDockPanel _nfp) { nfp = _nfp; } if (ret is PointsListDockPanel pll) { points = pll; } if (ret is PolyBoolListDockPanel pbb) { pbPanel = pbb; } if (ret is ClipperOperationsDockPanel clp) { clipper = clp; } if (ret is DebugDockPanel dbg) { debug = dbg; } if (ret is HelpersListDockPanel hlp) { helpersListPanel = hlp; } return(ret); }); loaded = true; } catch (Exception ex) { } } if (!loaded) { pbPanel = new PolyBoolListDockPanel(); other = new OtherOperationsDockPanel(); clipper = new ClipperOperationsDockPanel(); nfp = new NFPOperationsDockPanel(); debug = new DebugDockPanel(); points = new PointsListDockPanel(); pbPanel.Show(this, DockState.DockBottom); clipper.Show(this, DockState.DockBottom); nfp.Show(this, DockState.DockBottom); debug.Show(this, DockState.DockBottom); points.Show(this, DockState.DockBottom); helpersListPanel = new HelpersListDockPanel(); view = new Viewer2DDockPanel(); view.Show(this, DockState.Document); helpersListPanel.Show(this, DockState.DockRight); prop = new PropertiesListDockPanel(); prop.Show(this, DockState.DockBottom); other.Show(this, DockState.DockBottom); } }