/// <summary> /// Collapses the GroupBox</summary> public void Collapse() { if (IsCollapsed) { return; } Collapsing.Raise(this, EventArgs.Empty); foreach (Control child in Controls) { if (ReferenceEquals(child, m_btn)) { continue; } child.Hide(); } m_prevMinSize = new Size(MinimumSize.Width, MinimumSize.Height); MinimumSize = new Size(MinimumSize.Width, CollapseHeight); LastHeight = base.Height; base.Height = CollapseHeight; IsCollapsed = true; Invalidate(); m_btn.Invalidate(); Collapsed.Raise(this, EventArgs.Empty); }
/// <summary> /// Opens the collapsing module. /// </summary> private void Collapsing() { Collapsing collapsing = new Collapsing(); collapsing.ShowDialog(); }