private void objItmPopOut_Click(object sender, EventArgs e) { if (objItmPopOutBtn.Tag.ToString() == "out") { Forms.popOutForm pop = new Forms.popOutForm(this); pop.Height = Height; pop.Location = new Point(Location.X + Width, Location.Y); pop.Text = "Blocks and Items"; SuspendLayout(); blocksItemsPanel.Parent = pop; blocksItemsPanelHost.Visible = mainSplitter.Visible = false; ResumeLayout(); pop.FormClosing += new FormClosingEventHandler(objItmPop_FormClosing); pop.Show(this); objItmPopOutBtn.Tag = "right"; objItmPopOutBtn.Image = Properties.Resources.dock_right; popOutBlocksItemsToolStripMenuItem.Text = "Pop In Objects/Items Panel"; popOutBlocksItemsToolStripMenuItem.Image = Properties.Resources.dock_right_highlight; } else { SuspendLayout(); blocksItemsPanelHost.Visible = blocksItemsSplitter.Visible = mainSplitter.Visible = true; Forms.popOutForm pop = blocksItemsPanel.Parent as Forms.popOutForm; blocksItemsPanel.Parent = blocksItemsPanelHost; ResumeLayout(); pop.Close(); objItmPopOutBtn.Tag = "out"; objItmPopOutBtn.Image = Properties.Resources.pop_out; popOutBlocksItemsToolStripMenuItem.Text = "Pop Out Objects/Items Panel"; popOutBlocksItemsToolStripMenuItem.Image = Properties.Resources.pop_out_highlight; } }
private void NavMapPopOutBtn_Click(object sender, EventArgs e) { if (navMapPopOutBtn.Tag.ToString() == "out") { Forms.popOutForm pop = new Forms.popOutForm(this); pop.Height = Height; pop.Location = new Point(Location.X - pop.Width, Location.Y); pop.Text = "Navigation Map"; SuspendLayout(); mapPanel.Parent = pop; mapPanelHost.Visible = mapSplitter.Visible = false; ResumeLayout(); pop.FormClosing += new FormClosingEventHandler(mappop_FormClosing); pop.Show(this); navMapPopOutBtn.Tag = "left"; popOutNavigationMapToolStripMenuItem.Text = "Pop In Navigation Map"; navMapPopOutBtn.Image = Properties.Resources.dock_left; popOutNavigationMapToolStripMenuItem.Image = Properties.Resources.dock_left_highlight; } else { SuspendLayout(); mapPanelHost.Visible = mapSplitter.Visible = true; Forms.popOutForm pop = mapPanel.Parent as Forms.popOutForm; mapPanel.Parent = mapPanelHost; ResumeLayout(); pop.Close(); navMapPopOutBtn.Tag = "out"; popOutNavigationMapToolStripMenuItem.Text = "Pop Out Navigation Map"; navMapPopOutBtn.Image = Properties.Resources.pop_out; popOutNavigationMapToolStripMenuItem.Image = Properties.Resources.pop_out_highlight; } }