/// <summary> /// /// </summary> /// <param name="e"></param> protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { e.Cancel = true; base.OnClosing(e); this.dockManager.CloseWindows(DockHelper.GetDockWindows(this.dockContainer, true, this.dockManager)); }
/// <summary> /// Constructs a new <see cref="DragDropTransaction">DragDropTransaction</see> instance. /// </summary> /// <param name="state">The target state of the transaction.</param> /// <param name="draggedWindow">The DockWindow instance that has been dragged. May be null if the drag context has been DockTabStrip instance.</param> /// <param name="panel">The SplitPanel instance that has been dragged. May be null of the drag context has been DockWindow instance.</param> /// <param name="anchor">The SplitPanel instance that is used as dock anchor.</param> /// <param name="position">The DockPosition where to dock the dragged context.</param> public DragDropTransaction(DockState state, DockWindow draggedWindow, SplitPanel panel, SplitPanel anchor, DockPosition position) : base(state, null, anchor, position) { this.associatedPanel = panel; this.draggedWindow = draggedWindow; if (this.draggedWindow != null) { this.AssociatedWindows.Add(this.draggedWindow); } else { RadDock dockManager = null; if (panel is DockTabStrip) { dockManager = (panel as DockTabStrip).DockManager; } else if (panel is RadSplitContainer) { FloatingWindow floatingParent = ControlHelper.FindAncestor <FloatingWindow>(panel); if (floatingParent != null) { dockManager = floatingParent.DockManager; } } this.AssociatedWindows.AddRange(DockHelper.GetDockWindows(panel, true, dockManager)); } }
private void RestoreAllDockWindows() { if (!this.dockManager.ShouldProcessNotification()) { return; } RedockService service = this.dockManager.GetService <RedockService>(ServiceConstants.Redock); if (service != null && service.CanOperate()) { service.Redock(DockHelper.GetDockWindows(this.dockContainer, true, this.dockManager), RedockTransactionReason.FloatingWindowCaptionDoubleClick, true); } }
private void CloseAllDocuments(DockWindow toSkip) { this.DockManager.BeginTransactionBlock(); foreach (DockWindow docWindow in DockHelper.GetDockWindows(this.DockManager.MainDocumentContainer, true, this.DockManager)) { if (docWindow == toSkip) { continue; } docWindow.Close(); } this.DockManager.EndTransactionBlock(); }