public HResult CreateToolWindow(INiWindowPane windowPane, NiDockStyle dockStyle, NiToolWindowOrientation toolWindowOrientation, out INiWindowFrame toolWindow) { toolWindow = null; try { if (windowPane == null) throw new ArgumentNullException("windowPane"); var dockContent = new DockContent(windowPane, dockStyle, toolWindowOrientation) { Site = new SiteProxy(this) }; dockContent.Disposed += dockContent_Disposed; _dockContents.Add(windowPane, dockContent); toolWindow = dockContent.GetProxy(); return HResult.OK; } catch (Exception ex) { return ErrorUtil.GetHResult(ex); } }
public WindowHost(DockContent dockContent) { _dockContent = dockContent; }
public Proxy(DockContent owner) { _owner = owner; _env = (NiEnv)_owner.GetService(typeof(INiEnv)); if ((owner.DockAreas & WeifenLuo.WinFormsUI.Docking.DockAreas.Document) != 0) _properties[(int)NiFrameProperty.Type] = NiFrameType.Document; else _properties[(int)NiFrameProperty.Type] = NiFrameType.Tool; }