void RecreateRenderPanel() { renderContainer.Controls.Clear(); render.Dispose(); render = new NoScrollPanel(); render.Painting = true; render.BackColor = Color.Black; render.Dock = DockStyle.Fill; render.Paint += new PaintEventHandler(this.render_Paint); render.Layout += new LayoutEventHandler(this.render_Layout); render.MouseClick += new MouseEventHandler(this.render_MouseClick); render.MouseDown += new MouseEventHandler(this.render_MouseClick); render.MouseLeave += new EventHandler(this.render_MouseLeave); render.MouseMove += new MouseEventHandler(this.render_MouseMove); render.MouseUp += new MouseEventHandler(this.render_MouseUp); render.MouseWheel += render_MouseWheel; render.KeyHandler = render_KeyDown; renderContainer.Controls.Add(render); }
void RecreateContextPanel() { pixelContextPanel.Controls.Clear(); pixelContext.Dispose(); pixelContext = new NoScrollPanel(); pixelContext.Painting = true; pixelContext.BackColor = Color.Transparent; pixelContext.Dock = DockStyle.Fill; pixelContext.Paint += new PaintEventHandler(pixelContext_Paint); pixelContext.MouseClick += new MouseEventHandler(pixelContext_MouseClick); pixelContext.KeyHandler = render_KeyDown; pixelContextPanel.Controls.Add(pixelContext, 0, 0); pixelContextPanel.Controls.Add(debugPixelContext, 1, 1); pixelContextPanel.Controls.Add(pixelHistory, 0, 1); pixelContextPanel.SetColumnSpan(pixelContext, 2); }