Beispiel #1
0
        private void newPage_Click(object sender, EventArgs e)
        {
            NoFlickerPanel newFlickerPanel = new NoFlickerPanel();

            newFlickerPanel.BackColor   = board1.BackColor;
            newFlickerPanel.BorderStyle = BorderStyle.FixedSingle;
            newFlickerPanel.Size        = board1.Size;
            newFlickerPanel.Location    = new Point(pages[pages.Count - 1].Location.X, pages[pages.Count - 1].Location.Y + pages[pages.Count - 1].Height + 20);
            newFlickerPanel.Tag         = "DrawingBord";
            newFlickerPanel.MouseDown  += MouseDown;
            newFlickerPanel.MouseUp    += MouseUp;
            newFlickerPanel.MouseMove  += MouseMove;
            newFlickerPanel.MouseClick += MouseClick;
            panelContainer.Controls.Add(newFlickerPanel);
            pages.Add(newFlickerPanel);

            #region TestCode

            for (int i = 0; i < pages.Count; i++)
            {
                Label label = new Label();
                label.Font      = new Font("Verdana", 7);
                label.ForeColor = Color.White;
                label.Location  = new Point(pages[i].Location.X + (panelContainer.Width / 2) - 1, pages[i].Location.Y + pages[i].Height);
                label.Text      = i.ToString();
                panelContainer.Controls.Add(label);
            }

            #endregion

            changeSizeColorPanel.Visible = false;
        }
Beispiel #2
0
 private void Clear(NoFlickerPanel board)
 {
     g.Clear(board.BackColor);
 }