/// <summary> /// Initialize a new instance of the KryptonDockingAutoHiddenGroup class. /// </summary> /// <param name="name">Initial name of the element.</param> /// <param name="edge">Docking edge being managed.</param> public KryptonDockingAutoHiddenGroup(string name, DockingEdge edge) : base(name) { Edge = edge; // Create a control that will draw tabs for auto hidden pages AutoHiddenGroupControl = new KryptonAutoHiddenGroup(edge); AutoHiddenGroupControl.StoringPage += OnAutoHiddenGroupStoringPage; AutoHiddenGroupControl.TabClicked += OnAutoHiddenGroupTabClicked; AutoHiddenGroupControl.TabMouseHoverStart += OnAutoHiddenGroupHoverStart; AutoHiddenGroupControl.TabMouseHoverEnd += OnAutoHiddenGroupHoverEnd; AutoHiddenGroupControl.TabVisibleCountChanged += OnAutoHiddenGroupTabVisibleCountChanged; AutoHiddenGroupControl.Disposed += OnAutoHiddenGroupDisposed; }
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing) { // Dispose of the timer resources if (_slideTimer != null) { _slideTimer.Stop(); _slideTimer.Dispose(); _slideTimer = null; } if (_dismissTimer != null) { _dismissTimer.Stop(); _dismissTimer.Dispose(); _dismissTimer = null; _dismissRunning = false; } // Remove cached references that might prevent those objects from being garbage collected Page = null; _group = null; // Remove ourself from the control we planted ourself into _control.Controls.Remove(this); // Remove all the pages so that the pages have palette redirection reset _dockspaceSlide.ClearAllPages(); // Unhook from events/static references to allow garbage collection SeparatorControl.SplitterMoving -= OnDockspaceSeparatorMoving; SeparatorControl.SplitterMoved -= OnDockspaceSeparatorMoved; SeparatorControl.SplitterMoveRect -= OnDockspaceSeparatorMoveRect; _dockspaceSlide.CellLosesFocus -= OnDockspaceCellLosesFocus; _dockspaceSlide.PageCloseClicked -= OnDockspacePageCloseClicked; _dockspaceSlide.PageAutoHiddenClicked -= OnDockspacePageAutoHiddenClicked; _dockspaceSlide.PageDropDownClicked -= OnDockspacePageDropDownClicked; Application.RemoveMessageFilter(this); } base.Dispose(disposing); }
/// <summary> /// Initialize a new instance of the AutoHiddenGroupEventArgs class. /// </summary> /// <param name="control">Reference to auto hidden group control instance.</param> /// <param name="element">Reference to docking auto hidden group element that is managing the control.</param> public AutoHiddenGroupEventArgs(KryptonAutoHiddenGroup control, KryptonDockingAutoHiddenGroup element) { AutoHiddenGroupControl = control; AutoHiddenGroupElement = element; }