Example #1
0
        public SymFigures Remove()
        {
            SymFigures temp = figureList.Last();

            figureList.Remove(figureList.Last());
            return(temp);
        }
Example #2
0
        private void pictureBox1_MouseClick(object sender, MouseEventArgs e)
        {
            if (creator != null)
            {
                if (creator.manyClick)
                {
                    if (e.Button == MouseButtons.Left)
                    {
                        start.X = e.X;
                        start.Y = e.Y;

                        if (!drow)
                        {
                            figure            = creator.Create(thickness, color, colorFill);
                            figure.StartPoint = start;

                            drow = !drow;
                        }
                        else
                        {
                            figure.StartPoint = start;
                        }
                    }
                    else if (e.Button == MouseButtons.Right)
                    {
                        drow = !drow;
                        figList.Add(figure);
                        figStack.CleanStack();
                    }
                }
            }
        }
Example #3
0
        private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
        {
            if (creator != null)
            {
                if (!drow && !creator.manyClick)
                {
                    figure = creator.Create(thickness, color, colorFill);
                    if (creator.manyAng)
                    {
                        (figure as Polygon).cornersNum = ang;
                    }

                    drow    = !drow;
                    start.X = e.X;
                    start.Y = e.Y;

                    figure.StartPoint = start;
                }
            }
        }
Example #4
0
 public void Add(SymFigures sym)
 {
     figureList.Add(sym);
 }
Example #5
0
 public void Push(SymFigures symFigures)
 {
     reStack.Push(symFigures);
 }