//---------------------------------------------------------------------- private void AnnuleFullScreen() { m_pageZoom.SuspendDrawing(); m_pageZoom.SuspendLayout(); m_panelControles.SuspendDrawing(); List <Control> lst = new List <Control>(); foreach (Control ctrl in m_panelControles.Controls) { lst.Add(ctrl); } foreach (Control ctrl in lst) { Point pt; Size sz; if (m_dicSaveLocations.TryGetValue(ctrl, out pt) && m_dicSaveSizes.TryGetValue(ctrl, out sz)) { ctrl.Parent = m_pageZoom; ctrl.Location = pt; ctrl.Size = sz; } } m_dicSaveSizes.Clear(); m_dicSaveLocations.Clear(); m_pageZoom.ResumeLayout(); m_pageZoom.ResumeDrawing(); m_panelControles.ResumeDrawing(); Visible = false; m_tabControl.Visible = true; m_btnFullScreen.Visible = true; m_btnFullScreen.Size = m_sizeButtonPetit; CalculPositionBouton(); m_pageZoom = null; }
private void ShowFullScreen(Crownwood.Magic.Controls.TabPage page) { m_pageZoom = page; page.SuspendDrawing(); m_panelControles.SuspendDrawing(); m_panelControles.SuspendLayout(); m_panelControles.BackColor = page.BackColor; List <Control> lst = new List <Control>(); foreach (Control ctrl in page.Controls) { lst.Add(ctrl); } foreach (Control ctrl in lst) { m_dicSaveLocations[ctrl] = ctrl.Location; m_dicSaveSizes[ctrl] = ctrl.Size; ctrl.Parent = m_panelControles; } m_lblTitle.Text = page.Title; m_btnFullScreen.Visible = false; m_panelControles.ResumeLayout(); m_panelControles.ResumeDrawing(); page.ResumeDrawing(); m_tabControl.Visible = false; Visible = true; BringToFront(); }